mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-29 21:46:02 +00:00
add xmlrpc-c 1.03.14 to in tree libs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3772 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
6d9679b164
commit
3abb7730b2
@ -78,9 +78,11 @@
|
|||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
#undef const
|
#undef const
|
||||||
|
|
||||||
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
|
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||||
if it is not supported. */
|
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||||
|
#ifndef __cplusplus
|
||||||
#undef inline
|
#undef inline
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||||
#undef size_t
|
#undef size_t
|
||||||
|
18
libs/xmlrpc-c/.cvsignore
Normal file
18
libs/xmlrpc-c/.cvsignore
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
Makefile.config
|
||||||
|
autogen.sh
|
||||||
|
autom4te.cache
|
||||||
|
configure
|
||||||
|
config.log
|
||||||
|
stamp-h
|
||||||
|
stamp-h1
|
||||||
|
config.cache
|
||||||
|
libtool
|
||||||
|
config.status
|
||||||
|
xmlrpc_config.h
|
||||||
|
xmlrpc_amconfig.h
|
||||||
|
xmlrpc-c-config
|
||||||
|
xmlrpc-c-config.test
|
||||||
|
xmlrpc-c-*.tar.gz
|
||||||
|
xmlrpc-c.spec
|
||||||
|
transport_config.h
|
||||||
|
|
110
libs/xmlrpc-c/GNUmakefile
Normal file
110
libs/xmlrpc-c/GNUmakefile
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
ifeq ($(SRCDIR)x,x)
|
||||||
|
SRCDIR = $(CURDIR)
|
||||||
|
endif
|
||||||
|
SUBDIR = .
|
||||||
|
BUILDDIR = $(SRCDIR)
|
||||||
|
VPATH = .:$(SRCDIR)
|
||||||
|
|
||||||
|
include $(SRCDIR)/Makefile.config
|
||||||
|
|
||||||
|
SUBDIRS = include src lib tools examples
|
||||||
|
|
||||||
|
PROGRAMS_TO_INSTALL = xmlrpc-c-config
|
||||||
|
|
||||||
|
# We're in a transition between the bloated, complex GNU
|
||||||
|
# Autoconf/Automake style of build, in which 'configure' creates all
|
||||||
|
# the make files, to simpler static make files. Some directories have
|
||||||
|
# been converted; some haven't. So we have the hack of putting
|
||||||
|
# 'xmlrpc_config.h' as the first dependency of 'all' to make sure
|
||||||
|
# 'configure runs before anything in the case that the user neglects
|
||||||
|
# to run 'configure' before doing 'make'.
|
||||||
|
|
||||||
|
default: xmlrpc_config.h all
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: xmlrpc-c-config xmlrpc-c-config.test $(SUBDIRS:%=%/all)
|
||||||
|
|
||||||
|
# We don't want the transport_config.h rule in Makefile.common:
|
||||||
|
OMIT_TRANSPORT_CONFIG_H = Y
|
||||||
|
transport_config.h: $(BUILDDIR)/Makefile.config
|
||||||
|
rm -f $@
|
||||||
|
echo '/* This file was generated by a make rule */' >>$@
|
||||||
|
ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
|
||||||
|
echo '#define MUST_BUILD_WININET_CLIENT 1' >>$@
|
||||||
|
else
|
||||||
|
echo '#define MUST_BUILD_WININET_CLIENT 0' >>$@
|
||||||
|
endif
|
||||||
|
ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
|
||||||
|
echo '#define MUST_BUILD_CURL_CLIENT 1' >>$@
|
||||||
|
else
|
||||||
|
echo '#define MUST_BUILD_CURL_CLIENT 0' >>$@
|
||||||
|
endif
|
||||||
|
ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
|
||||||
|
echo '#define MUST_BUILD_LIBWWW_CLIENT 1' >>$@
|
||||||
|
else
|
||||||
|
echo '#define MUST_BUILD_LIBWWW_CLIENT 0' >>$@
|
||||||
|
endif
|
||||||
|
echo "static const char * const XMLRPC_DEFAULT_TRANSPORT =" >>$@
|
||||||
|
ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
|
||||||
|
echo '"libwww";' >>$@
|
||||||
|
else
|
||||||
|
ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
|
||||||
|
echo '"curl";' >>$@
|
||||||
|
else
|
||||||
|
ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
|
||||||
|
echo '"wininet";' >>$@
|
||||||
|
else
|
||||||
|
@echo 'ERROR: no client XML transport configured'; rm $@; false
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: clean clean-local
|
||||||
|
clean: $(SUBDIRS:%=%/clean) clean-common clean-local
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
rm -f transport_config.h
|
||||||
|
|
||||||
|
.PHONY: distclean distclean-local
|
||||||
|
distclean: $(SUBDIRS:%=%/distclean) distclean-common distclean-local
|
||||||
|
|
||||||
|
distclean-local: clean-local
|
||||||
|
rm -f config.log config.status Makefile.config libtool
|
||||||
|
rm -f xmlrpc_config.h xmlrpc_amconfig.h stamp-h xmlrpc-c.spec
|
||||||
|
rm -f xmlrpc-c-config xmlrpc-c-config.test
|
||||||
|
|
||||||
|
.PHONY: tags
|
||||||
|
tags: $(SUBDIRS:%=%/tags) TAGS
|
||||||
|
|
||||||
|
DISTFILES =
|
||||||
|
|
||||||
|
.PHONY: distdir
|
||||||
|
distdir: distdir-common
|
||||||
|
|
||||||
|
.PHONY: install
|
||||||
|
install: $(SUBDIRS:%=%/install) install-common install-compat-hdr
|
||||||
|
|
||||||
|
.PHONY: install-compat-hdr
|
||||||
|
install-compat-hdr:
|
||||||
|
# Install old names of header files for backward compatibility
|
||||||
|
cd $(DESTDIR)$(HEADERINST_DIR); \
|
||||||
|
rm -f xmlrpc.h xmlrpc_client.h xmlrpc_server.h xmlrpc_cgi.h \
|
||||||
|
xmlrpc_server_abyss.h xmlrpc_server_w32httpsys.h \
|
||||||
|
XmlRpcCpp.h; \
|
||||||
|
$(LN_S) xmlrpc-c/oldxmlrpc.h xmlrpc.h; \
|
||||||
|
$(LN_S) xmlrpc-c/client.h xmlrpc_client.h; \
|
||||||
|
$(LN_S) xmlrpc-c/server.h xmlrpc_server.h; \
|
||||||
|
$(LN_S) xmlrpc-c/server_cgi.h xmlrpc_cgi.h; \
|
||||||
|
$(LN_S) xmlrpc-c/server_abyss.h xmlrpc_server_abyss.h; \
|
||||||
|
$(LN_S) xmlrpc-c/server_w32httpsys.h xmlrpc_server_w32httpsys.h; \
|
||||||
|
$(LN_S) xmlrpc-c/oldcppwrapper.hpp XmlRpcCpp.h ;\
|
||||||
|
|
||||||
|
.PHONY: dep
|
||||||
|
dep: $(SUBDIRS:%=%/dep)
|
||||||
|
|
||||||
|
xmlrpc-c-config xmlrpc-c-config.test xmlrpc_config.h xmlrpc_amconfig.h \
|
||||||
|
:%:%.in $(SRCDIR)/configure
|
||||||
|
$(SRCDIR)/configure
|
||||||
|
|
||||||
|
include $(SRCDIR)/Makefile.common
|
||||||
|
|
14
libs/xmlrpc-c/Makefile
Normal file
14
libs/xmlrpc-c/Makefile
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# The make files for this package exploit features of GNU Make that
|
||||||
|
# other Makes do not have. Because it is a common mistake for users
|
||||||
|
# to try to build with a different Make, we have this make file that
|
||||||
|
# does nothing but tell the user to use GNU Make.
|
||||||
|
|
||||||
|
# If the user were using GNU Make now, this file would not get used because
|
||||||
|
# GNU Make uses a make file named "GNUmakefile" in preference to "Makefile"
|
||||||
|
# if it exists. This package contains a "GNUmakefile".
|
||||||
|
|
||||||
|
all install clean dep depend:
|
||||||
|
@echo "You must use GNU Make to build this. You are running some "
|
||||||
|
@echo "other Make. GNU Make may be installed on your system with "
|
||||||
|
@echo "the name 'gmake'. If not, see http://www.gnu.org/software ."
|
||||||
|
@echo
|
268
libs/xmlrpc-c/Makefile.common
Normal file
268
libs/xmlrpc-c/Makefile.common
Normal file
@ -0,0 +1,268 @@
|
|||||||
|
# -*-makefile-*- <-- an Emacs control
|
||||||
|
|
||||||
|
# This file contains rules and variable settings for the convenience
|
||||||
|
# of every other make file in the package.
|
||||||
|
|
||||||
|
# No make file is required to use this file, but it usually saves a lot
|
||||||
|
# of duplication.
|
||||||
|
|
||||||
|
# The following make variables are meaningful as input to this file:
|
||||||
|
#
|
||||||
|
# SRCDIR: Name of directory which is the top of the Xmlrpc-c source tree.
|
||||||
|
# BUILDDIR: Name of directory which is the top of the Xmlrpc-c build tree.
|
||||||
|
|
||||||
|
LIBTOOL = $(SRCDIR)/libtool
|
||||||
|
LINK = $(LIBTOOL) --mode=link $(CCLD)
|
||||||
|
|
||||||
|
GCC_WARNINGS = -Wall -Wundef -Wimplicit -W -Winline
|
||||||
|
# We need -Wwrite-strings after we fix all the missing consts
|
||||||
|
|
||||||
|
GCC_C_WARNINGS = $(GCC_WARNINGS) \
|
||||||
|
-Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes
|
||||||
|
|
||||||
|
GCC_CXX_WARNINGS = $(GCC_WARNINGS) -Woverloaded-virtual -Wsynth
|
||||||
|
|
||||||
|
ifeq ($(C_COMPILER_GNU),yes)
|
||||||
|
CFLAGS_COMMON = $(GCC_C_WARNINGS) -fno-common -g
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CXX_COMPILER_GNU),yes)
|
||||||
|
CXXFLAGS_COMMON = $(GCC_CXX_WARNINGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
DISTDIR = $(BUILDDIR)/$(PACKAGE)-$(VERSION)/$(SUBDIR)
|
||||||
|
|
||||||
|
LDFLAGS_VERSINFO = -version-info 7:0:4
|
||||||
|
|
||||||
|
# CURDIR was introduced in GNU Make 3.77.
|
||||||
|
ifeq ($(CURDIR)x,x)
|
||||||
|
CURDIR := $(shell /bin/pwd)
|
||||||
|
endif
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# RULES #
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
$(SUBDIRS:%=%/all): %/all: $(CURDIR)/%
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(SUBDIRS:%=%/install): %/install: $(CURDIR)/%
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(SUBDIRS:%=%/clean): %/clean: $(CURDIR)/%
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(SUBDIRS:%=%/distclean): %/distclean: $(CURDIR)/%
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(SUBDIRS:%=%/distdir): %/distdir: $(CURDIR)/%
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(SUBDIRS:%=%/dep): %/dep: $(CURDIR)/%
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(BUILDDIR)/lib/util/casprintf.lo: FORCE
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/util/Makefile $(notdir $@)
|
||||||
|
|
||||||
|
$(BUILDDIR)/lib/expat/xmlparse/libxmlrpc_xmlparse.la: FORCE
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/expat/xmlparse/Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(BUILDDIR)/lib/expat/xmltok/libxmlrpc_xmltok.la: FORCE
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/expat/xmltok/Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(BUILDDIR)/lib/wininet_transport/xmlrpc_wininet_transport.lo: FORCE
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/wininet_transport/Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(BUILDDIR)/lib/curl_transport/xmlrpc_curl_transport.lo: FORCE
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/curl_transport/Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(BUILDDIR)/lib/libwww_transport/xmlrpc_libwww_transport.lo: FORCE
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/libwww_transport/Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(BUILDDIR)/src/libxmlrpc.la: FORCE
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/src/Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(BUILDDIR)/src/libxmlrpc_client.la: FORCE
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/src/Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
$(BUILDDIR)/src/libxmlrpc_server.la: FORCE
|
||||||
|
$(MAKE) -C $(dir $@) -f $(SRCDIR)/src/Makefile \
|
||||||
|
$(notdir $@)
|
||||||
|
|
||||||
|
ifneq ($(OMIT_TRANSPORT_CONFIG_H),Y)
|
||||||
|
$(BUILDDIR)/transport_config.h:
|
||||||
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
||||||
|
endif
|
||||||
|
|
||||||
|
MKINSTALLDIRS = $(SHELL) $(SRCDIR)/mkinstalldirs
|
||||||
|
|
||||||
|
.PHONY: install-common install-libraries install-headers install-bin
|
||||||
|
install-common: \
|
||||||
|
install-ltlibraries install-libraries install-headers install-bin
|
||||||
|
|
||||||
|
INSTALL_LIB_CMD = $(INSTALL_DATA) $$p $(DESTDIR)$(LIBINST_DIR)/$$p
|
||||||
|
RANLIB_CMD = $(RANLIB) $(DESTDIR)$(LIBINST_DIR)/$$p
|
||||||
|
|
||||||
|
install-libraries: $(LIBRARIES_TO_INSTALL)
|
||||||
|
$(MKINSTALLDIRS) $(DESTDIR)$(LIBINST_DIR)
|
||||||
|
@list='$(LIBRARIES_TO_INSTALL)'; for p in $$list; do \
|
||||||
|
if test -f $$p; then \
|
||||||
|
echo " $(INSTALL_LIB_CMD)"; \
|
||||||
|
$(INSTALL_LIB_CMD); \
|
||||||
|
else :; fi; \
|
||||||
|
done
|
||||||
|
@$(POST_INSTALL)
|
||||||
|
@list='$(LIBRARIES_TO_INSTALL)'; for p in $$list; do \
|
||||||
|
if test -f $$p; then \
|
||||||
|
echo " $(RANLIB_CMD)"; \
|
||||||
|
$(RANLIB_CMD); \
|
||||||
|
else :; fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
LIBTOOL_INSTALL_CMD = $(LIBTOOL) --mode=install \
|
||||||
|
$(INSTALL) $$p $(DESTDIR)$(LIBINST_DIR)/$$p
|
||||||
|
|
||||||
|
install-ltlibraries: $(LTLIBRARIES_TO_INSTALL)
|
||||||
|
$(MKINSTALLDIRS) $(DESTDIR)$(LIBINST_DIR)
|
||||||
|
@list='$(LTLIBRARIES_TO_INSTALL)'; for p in $$list; do \
|
||||||
|
if test -f $$p; then \
|
||||||
|
echo " $(LIBTOOL_INSTALL_CMD)"; \
|
||||||
|
$(LIBTOOL_INSTALL_CMD); \
|
||||||
|
else :; fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
HEADERDESTDIR = $(DESTDIR)$(HEADERINST_DIR)
|
||||||
|
INSTALL_HDR_CMD = $(INSTALL_DATA) $$d$$p $(HEADERDESTDIR)/$$p
|
||||||
|
|
||||||
|
install-headers: $(HEADERS_TO_INSTALL)
|
||||||
|
$(MKINSTALLDIRS) $(HEADERDESTDIR)
|
||||||
|
$(MKINSTALLDIRS) $(HEADERDESTDIR)/xmlrpc-c
|
||||||
|
@list='$(HEADERS_TO_INSTALL)'; for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
|
||||||
|
echo " $(INSTALL_HDR_CMD)"; \
|
||||||
|
$(INSTALL_HDR_CMD); \
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
INSTALL_PROGRAM_CMD = $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p \
|
||||||
|
$(DESTDIR)$(PROGRAMINST_DIR)/$$p
|
||||||
|
|
||||||
|
install-bin: $(PROGRAMS_TO_INSTALL) $(DESTDIR)$(PROGRAMINST_DIR)
|
||||||
|
@list='$(PROGRAMS_TO_INSTALL)'; \
|
||||||
|
for p in $$list; do \
|
||||||
|
echo "$(INSTALL_PROGRAM_CMD)"; \
|
||||||
|
$(INSTALL_PROGRAM_CMD); \
|
||||||
|
done
|
||||||
|
|
||||||
|
$(DESTDIR)$(PROGRAMINST_DIR):
|
||||||
|
$(MKINSTALLDIRS) $@
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: clean-common
|
||||||
|
clean-common:
|
||||||
|
rm -f *.o *.a *.s *.i *.la *.lo
|
||||||
|
rm -rf .libs
|
||||||
|
|
||||||
|
.PHONY: distclean-common
|
||||||
|
distclean-common:
|
||||||
|
# Makefile.depend is generated by 'make dep' and contains only dependencies
|
||||||
|
# that make parts get _rebuilt_ when parts upon which they depend change.
|
||||||
|
# It does not contain dependencies that are necessary to cause a part to
|
||||||
|
# get built in the first place. E.g. if foo.c uses bar.h and bar.h gets built
|
||||||
|
# by a make rule, you must put the dependency of foo.c on bar.h somewhere
|
||||||
|
# besides Makefile.depend.
|
||||||
|
#
|
||||||
|
# Because of this, a user doesn't need Makefile.depend, because he
|
||||||
|
# doesn't modify source files. A developer, on the other hand, must make his
|
||||||
|
# own Makefile.depend, because 'make dep' creates Makefile.depend with
|
||||||
|
# absolute pathnames, specific to the developer's system.
|
||||||
|
#
|
||||||
|
# So we empty out Makefile.depend here. The developer must do 'make dep' if
|
||||||
|
# he wants to edit and rebuild.
|
||||||
|
#
|
||||||
|
# Other projects have 'make distclean' _remove_ Makefile.depend and then
|
||||||
|
# have 'make' automatically build Makefile.depend. We have
|
||||||
|
# found that to be an utter disaster -- it's way too complicated and prone
|
||||||
|
# to failure, especially with built .h files. Better not to burden the user,
|
||||||
|
# who gains nothing from it, with that.
|
||||||
|
#
|
||||||
|
cat /dev/null >Makefile.depend
|
||||||
|
rm -f TAGS
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: distdir-common
|
||||||
|
distdir-common:
|
||||||
|
@for file in $(DISTFILES); do \
|
||||||
|
d=$(SRCDIR); \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
cp -pr $$d/$$file $(DISTDIR)/$$file; \
|
||||||
|
else \
|
||||||
|
test -f $(DISTDIR)/$$file \
|
||||||
|
|| ln $$d/$$file $(DISTDIR)/$$file 2> /dev/null \
|
||||||
|
|| cp -p $$d/$$file $(DISTDIR)/$$file || :; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||||
|
tags=; \
|
||||||
|
here=`pwd`; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
list='$(SOURCES) $(HEADERS)'; \
|
||||||
|
unique=`for i in $$list; do echo $$i; done | \
|
||||||
|
awk ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||||
|
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||||
|
|
||||||
|
DEP_SOURCES = $(wildcard *.c *.cpp)
|
||||||
|
|
||||||
|
# This is a filter to turn "foo.o:" rules into "foo.o foo.lo:" because Libtool
|
||||||
|
# uses .lo for object files. I'd like to purge the build of Libtool some day
|
||||||
|
# and eliminate this complication.
|
||||||
|
|
||||||
|
LIBTOOL_DEPEND_MASSAGER = perl -walnpe's{^(.*)\.o:}{$$1.o $$1.lo:}'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: dep-common
|
||||||
|
dep-common: FORCE
|
||||||
|
ifneq ($(DEP_SOURCES)x,x)
|
||||||
|
-$(CC) -MM -MG -I. $(INCLUDES) $(DEP_SOURCES) | \
|
||||||
|
$(LIBTOOL_DEPEND_MASSAGER) \
|
||||||
|
>Makefile.depend
|
||||||
|
endif
|
||||||
|
|
||||||
|
Makefile.depend:
|
||||||
|
cat /dev/null >$@
|
||||||
|
|
||||||
|
# The automatic dependency generation is a pain in the butt and
|
||||||
|
# totally unnecessary for people just installing the distributed code,
|
||||||
|
# so to avoid needless failures in the field and a complex build, the
|
||||||
|
# 'distclean' target simply makes Makefile.depend an empty file. A
|
||||||
|
# developer may do 'make dep' to create a Makefile.depend full of real
|
||||||
|
# dependencies.
|
||||||
|
|
||||||
|
# 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:
|
||||||
|
|
||||||
|
|
||||||
|
# Use the FORCE target as a dependency to force a target to get remade
|
||||||
|
FORCE:
|
77
libs/xmlrpc-c/Makefile.config.in
Normal file
77
libs/xmlrpc-c/Makefile.config.in
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
# Makefile.config is generated by 'configure' using Makefile.config.in
|
||||||
|
# as a template and information that 'configure' gathers from the build
|
||||||
|
# system and from user options.
|
||||||
|
|
||||||
|
# Makefile.config should someday replace most of the other files that
|
||||||
|
# 'configure' generates, thus simplifying development and customization.
|
||||||
|
# Makefile.config is intended to contain information specific to the
|
||||||
|
# particular build environment or user build choices.
|
||||||
|
|
||||||
|
# Furthermore, most of the logic in 'configure', and thus 'configure.in',
|
||||||
|
# should go into the make files to simplify the build. Makefile.config
|
||||||
|
# should just pass raw configure variables through to the make file.
|
||||||
|
|
||||||
|
# Tokens of the form @TOKEN@ in the template file get replaced by
|
||||||
|
# 'configure' with the values of variables of the same name within
|
||||||
|
# 'configure', because of a AC_SUBST(TOKEN) statement in the
|
||||||
|
# 'configure.in' from which 'configure' was built.
|
||||||
|
|
||||||
|
# Here are the options the user chose on 'configure':
|
||||||
|
|
||||||
|
ENABLE_ABYSS_SERVER = @ENABLE_ABYSS_SERVER@
|
||||||
|
ENABLE_ABYSS_THREADS = @ENABLE_ABYSS_THREADS@
|
||||||
|
ENABLE_CPLUSPLUS = @ENABLE_CPLUSPLUS@
|
||||||
|
ENABLE_CGI_SERVER = @ENABLE_CGI_SERVER@
|
||||||
|
ENABLE_LIBXML2_BACKEND = @ENABLE_LIBXML2_BACKEND@
|
||||||
|
ENABLE_EFENCE = @ENABLE_EFENCE@
|
||||||
|
|
||||||
|
MUST_BUILD_WININET_CLIENT = @MUST_BUILD_WININET_CLIENT@
|
||||||
|
MUST_BUILD_CURL_CLIENT = @MUST_BUILD_CURL_CLIENT@
|
||||||
|
MUST_BUILD_LIBWWW_CLIENT = @MUST_BUILD_LIBWWW_CLIENT@
|
||||||
|
|
||||||
|
LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
|
||||||
|
LIBXML2_LIBS = @LIBXML2_LIBS@
|
||||||
|
|
||||||
|
MUST_BUILD_CLIENT = no
|
||||||
|
ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
|
||||||
|
MUST_BUILD_CLIENT = yes
|
||||||
|
endif
|
||||||
|
ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
|
||||||
|
MUST_BUILD_CLIENT = yes
|
||||||
|
endif
|
||||||
|
ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
|
||||||
|
MUST_BUILD_CLIENT = yes
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Stuff 'configure' figured out about our build platform:
|
||||||
|
|
||||||
|
SHELL = @SHELL@
|
||||||
|
CC = @CC@
|
||||||
|
CXX = @CXX@
|
||||||
|
CCLD = $(CC)
|
||||||
|
CXXLD = $(CXX)
|
||||||
|
AR = ar
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
|
||||||
|
C_COMPILER_GNU = @C_COMPILER_GNU@
|
||||||
|
CXX_COMPILER_GNU = @CXX_COMPILER_GNU@
|
||||||
|
|
||||||
|
# Here are the commands 'make install' uses to install various kinds of files:
|
||||||
|
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
|
||||||
|
# Here are the locations at which 'make install' puts files:
|
||||||
|
|
||||||
|
# DESTDIR is designed to be overriden at make time in order to relocate
|
||||||
|
# the entire install into a subdirectory.
|
||||||
|
DESTDIR =
|
||||||
|
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
prefix = @prefix@
|
||||||
|
LIBINST_DIR = @libdir@
|
||||||
|
HEADERINST_DIR = @includedir@
|
||||||
|
PROGRAMINST_DIR = @bindir@
|
0
libs/xmlrpc-c/Makefile.depend
Normal file
0
libs/xmlrpc-c/Makefile.depend
Normal file
89
libs/xmlrpc-c/README
Normal file
89
libs/xmlrpc-c/README
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
This is the source code for XML-RPC for C/C++, called Xmlrpc-c for short.
|
||||||
|
|
||||||
|
XML-RPC for C/C++ is programming libraries and related tools to help you
|
||||||
|
write an XML-RPC server or client in C or C++.
|
||||||
|
|
||||||
|
Documentation for the package is at
|
||||||
|
|
||||||
|
http://xmlrpc-c.sourceforge.net/doc
|
||||||
|
|
||||||
|
See the Xmlrpc-c website at:
|
||||||
|
|
||||||
|
http://xmlrpc-c.sourceforge.net/
|
||||||
|
|
||||||
|
|
||||||
|
PREREQUISITES
|
||||||
|
-------------
|
||||||
|
|
||||||
|
To build a useful Xmlrpc-c client library, you'll need to have at
|
||||||
|
least one HTTP library. Xmlrpc-c knows how to use W3C Libwww (Version
|
||||||
|
5.3.2 or newer), Curl, and Wininet. The configurator gives you the
|
||||||
|
option of building libraries that use any or all of these, and
|
||||||
|
defaults to every one you appear to have installed. If you don't
|
||||||
|
appear to have any installed, the configurator causes the build to
|
||||||
|
omit client facilities altogether.
|
||||||
|
|
||||||
|
Information about W3C Libwww, including how to get it are at
|
||||||
|
<http://www.w3.org/Library>.
|
||||||
|
|
||||||
|
For Curl, see <http://curl.haxx.se>.
|
||||||
|
|
||||||
|
Wininet comes with Windows, and isn't available for any other platform.
|
||||||
|
|
||||||
|
You also need an XML parser/builder library. An old version of Expat
|
||||||
|
is included in the package and used by default, so there's no actual
|
||||||
|
prerequisite here. But if you separately obtain Libxml2, you can
|
||||||
|
configure the build to use that instead. There's no really pressing
|
||||||
|
reason to do that, though.
|
||||||
|
|
||||||
|
Once you have the prerequisite libraries installed, you can issue
|
||||||
|
these commands:
|
||||||
|
|
||||||
|
$ ./configure
|
||||||
|
$ make
|
||||||
|
$ make install
|
||||||
|
|
||||||
|
(There's supposed to be a 'make check' step in there too, to validate
|
||||||
|
that everything built OK, but it's broken right now - 2005.01.07).
|
||||||
|
|
||||||
|
To see it work, run a simple server like this:
|
||||||
|
|
||||||
|
$ examples/xmlrpc_sample_add_server 8080
|
||||||
|
|
||||||
|
Then run a client that does an RPC to this server:
|
||||||
|
|
||||||
|
$ examples/xmlrpc_sample_add_client
|
||||||
|
|
||||||
|
(I don't mean to imply that the above are consecutive shell commands;
|
||||||
|
They can't be, because the server program runs indefinitely).
|
||||||
|
|
||||||
|
Also try other sample servers and clients, described in examples/README.
|
||||||
|
|
||||||
|
|
||||||
|
You may want to pass a '--prefix' argument to 'configure'. See
|
||||||
|
'./configure --help' for details.
|
||||||
|
|
||||||
|
You may also want to disable client XML transports that you won't be
|
||||||
|
using. In particular, the Libwww transport can be inconvenient, because
|
||||||
|
it typically uses about 20 shared libraries. Any XML-RPC client
|
||||||
|
program that uses Xmlrpc-c, whether or not the program uses any of the
|
||||||
|
libwww facilities, must attach all those libraries, and that can take
|
||||||
|
a significant amount of time.
|
||||||
|
|
||||||
|
See './configure --help' for the options that disable certain transports.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
WINDOWS
|
||||||
|
-------
|
||||||
|
|
||||||
|
All of the above is essentially for Unix-type operating systems. To
|
||||||
|
build and use Xmlrpc-c on Windows, see the file
|
||||||
|
Windows/ReadMeWin32.txt.
|
||||||
|
|
||||||
|
|
||||||
|
ADDITIONAL INFORMATION
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
See the doc/ directory of the source tree for information about the
|
||||||
|
source code. User documentation is on the web, as described above.
|
7
libs/xmlrpc-c/Windows/ConfigureWin32.bat
Normal file
7
libs/xmlrpc-c/Windows/ConfigureWin32.bat
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
@echo off
|
||||||
|
echo creating Win32 header files...
|
||||||
|
copy .\xmlrpc_win32_config.h ..\config.h
|
||||||
|
copy .\xmlrpc_win32_config.h ..\xmlrpc_config.h
|
||||||
|
copy .\transport_config_win32.h ..\transport_config.h
|
||||||
|
echo completed creating win32 header files.
|
||||||
|
pause
|
116
libs/xmlrpc-c/Windows/ReadMeWin32.txt
Normal file
116
libs/xmlrpc-c/Windows/ReadMeWin32.txt
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
Build Instructions For XML-RPC For C/C++ On Windows
|
||||||
|
---------------------------------------------------
|
||||||
|
|
||||||
|
The following instructions do not fully work in this release. There
|
||||||
|
is no trivial way to build this release for Windows. The last release
|
||||||
|
that was known to build without special effort on the part of the user
|
||||||
|
is 1.02.
|
||||||
|
|
||||||
|
Since then, nobody has maintained the code for Windows, and changes that
|
||||||
|
were made for other platforms broke some things for Windows. Most likely,
|
||||||
|
anyone with a passing knowledge of building C code on Windows could
|
||||||
|
update this code to work on Windows without any in-depth study of it. If
|
||||||
|
you do so, please contribute your work to save other users the trouble.
|
||||||
|
|
||||||
|
The majority of the work that needs to be done to make the code build on
|
||||||
|
Windows is simply adjusting project files to reflect the fact that files
|
||||||
|
have been created, deleted, and moved since they were written.
|
||||||
|
|
||||||
|
|
||||||
|
This release includes the option to compile the "http.sys" version of the
|
||||||
|
XMLRPC-C server. If you do not wish to build in the http.sys server,
|
||||||
|
set the MUST_BUILD_HTTP_SYS_SERVER to 0 in the transport_config_win32.h and/or
|
||||||
|
the transport_config.h file. Successful conpilation requires installation
|
||||||
|
of the Microsoft Platform SDK for Windows XP SP2 (or later) to get the latest
|
||||||
|
header and link libraries required to support this functionality. After
|
||||||
|
installation, be sure to properly register the directories as documented
|
||||||
|
in the Platform SDK help file topic "Installing the Platform SDK with
|
||||||
|
Visual Studio". Download the Platform SDK from:
|
||||||
|
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
|
||||||
|
|
||||||
|
To create the three headers required for Win32 WinInet compilation, run the
|
||||||
|
ConfigureWin32.bat found in the Windows directory. If you wish to alter the
|
||||||
|
transports that are built to include curl or libwww, adjust the preprocessor
|
||||||
|
definitions at the top of the transport_config_win32.h and/or
|
||||||
|
the transport_config.h files. See the file UsingCURLinWin32.txt for
|
||||||
|
more information on using the curl transport.
|
||||||
|
|
||||||
|
To compile, open the xmlrpc.dsw file in Visual Studio 6 or greater. The
|
||||||
|
project will convert and work fine in Visual Studio 2003 as well -
|
||||||
|
other versions of Visual Studio were not tested.
|
||||||
|
NOTE: If you get an error while opening or converting the project files,
|
||||||
|
it is likely due to using WinRar or similar to decompress the distribution
|
||||||
|
tarball. You can use WinZip or another utility to correctly decompress the
|
||||||
|
.tgz file.
|
||||||
|
|
||||||
|
Suggested testing for evaluation of the library involves a few projects.
|
||||||
|
Here is a quick getting started guide:
|
||||||
|
|
||||||
|
1) Set the Active Project to query_meerkat and build it in release or debug
|
||||||
|
modes. The dependent projects will be built automatically. In the
|
||||||
|
project settings dialog, add the argument for what you wish to query
|
||||||
|
meerkat for - "Windows" is a good query. Run the project. This will
|
||||||
|
query the meerkat server for articles related to windows and output the
|
||||||
|
results to the console.
|
||||||
|
|
||||||
|
2) Set the Active Project to xmlrpc_sample_add_server and build it in
|
||||||
|
release or debug modes. The dependent projects will be built
|
||||||
|
automatically. In the project settings dialog, add the argument for
|
||||||
|
the port to 8080. This will run the server sample which adds two
|
||||||
|
numbers and returns a result. You should run this from a command
|
||||||
|
prompt instead of through Visual Studio so you may run the sample
|
||||||
|
client as well.
|
||||||
|
|
||||||
|
3) Set the Active Project to xmlrpc_sample_add_sync_client or
|
||||||
|
xmlrpc_sample_add_async_client and build it in release or debug modes.
|
||||||
|
The dependent projects will be built automatically. This will run
|
||||||
|
the client sample which submits two numbers to be added to the server
|
||||||
|
application as described above and displays the result. Note that the
|
||||||
|
client example comes in the sync and async varieties.
|
||||||
|
|
||||||
|
Steven Bone
|
||||||
|
July 27, 2005
|
||||||
|
sbone@pobox.com
|
||||||
|
|
||||||
|
WIN32 CHANGES
|
||||||
|
|
||||||
|
Changes from the 1.02 release for Win32:
|
||||||
|
1) Option to easily disable the http.sys server for those who do not need
|
||||||
|
it or wish to download the Platform SDK.
|
||||||
|
|
||||||
|
Changes from the 1.01 -> 1.02 release for Win32:
|
||||||
|
1) Project files for gennmtab, xmlparse, and xmltok updated to include the
|
||||||
|
path to the xmlrpc_config.h file.
|
||||||
|
2) Bugfix for WinInet authentication.
|
||||||
|
3) Supports xmlrpc_xportparms, xmlrpc_wininet_xportparms added
|
||||||
|
*potential breaking change* - now by default we fail on invalid
|
||||||
|
SSL certs, use the xmlrpc_wininet_xportparms option to enable old
|
||||||
|
behavior.
|
||||||
|
4) Added project file for xmlrpc_sample_auth_client
|
||||||
|
5) Added project and src for a http.sys based xmlrpc-c server. See comments
|
||||||
|
in the source files. This supports Windows XP SP2 and Windows Server
|
||||||
|
2003 and allows other http.sys based applications to bind to the same
|
||||||
|
port. In Server 2003, IIS uses http.sys and thus the XML-RPC server
|
||||||
|
can be run on the standard port 80 along with IIS. The sample also
|
||||||
|
supports https and basic authentication. It tested OK with
|
||||||
|
http://validator.xmlrpc.com/ Note that the Platform SDK headers and
|
||||||
|
link libraries for Windows XP SP2 or newer are required to compile
|
||||||
|
xmlrpc-c for this module. If you are not using this server, it is
|
||||||
|
safe to exclude the xmlrpc_server_w32httpsys.c file from the xmlrpc
|
||||||
|
project and these dependencies will not be required. You can get the
|
||||||
|
latest platform SDK at
|
||||||
|
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
|
||||||
|
Be sure after installation to choose the program to "register the PSDK
|
||||||
|
directories with Visual Studio" so the newer headers are found.
|
||||||
|
6) Better support for libcurl. Updated project files, transport_config_win32.h,
|
||||||
|
added documentation UsingCURLinWin32.txt.
|
||||||
|
|
||||||
|
Changes from the 1.00 -> 1.01 release for Win32:
|
||||||
|
1) Project files now reflect static linking for the expat XML library.
|
||||||
|
2) Example projects were created/updated to keep them in sync with the
|
||||||
|
distribution. The project files were moved into the .\Windows
|
||||||
|
directory
|
||||||
|
3) Projects for the rpc and cpp tests were created. The
|
||||||
|
xmlrpc_win32_config.h defines the directory for the test files relative
|
||||||
|
to the output directory
|
||||||
|
4) Major refactoring of the Wininet Transport.
|
64
libs/xmlrpc-c/Windows/UsingCURLinWin32.txt
Normal file
64
libs/xmlrpc-c/Windows/UsingCURLinWin32.txt
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
Background:
|
||||||
|
Let’s say you need to support a xmlrpc-c client running as a service. In this
|
||||||
|
situation you cannot use WinInet. Details of the restriction can be found on
|
||||||
|
the libcurl website or various Microsoft KB articles. The alternative is to use
|
||||||
|
libcurl. This document describes the steps required to use libcurl as your
|
||||||
|
transport mechanism as supported by the latest files and projects provided in
|
||||||
|
the xmlrpc-c distribution. The assumption is that you can successfully compile
|
||||||
|
the distribution of xmlrpc-c.
|
||||||
|
|
||||||
|
Overview:
|
||||||
|
The default projects in xmlrpc-c create standalone executables that do not
|
||||||
|
require other DLL’s (release mode). While the case can be made for this
|
||||||
|
behavior pro and con, it is beyond this document to justify it. Therefore, we
|
||||||
|
need to create static link libraries for libcurl that mimics this behavior.
|
||||||
|
Once the link libraries are created, we can then add them (plus the requisite
|
||||||
|
curl headers) into the xmlrpc-c project. Finally, we enable the compilation of
|
||||||
|
the curl transport file and tell xmlrpc-c that we will be using curl. Lastly,
|
||||||
|
we build and test the project.
|
||||||
|
|
||||||
|
Steps to use CURL with Win32 xmlrpc-c:
|
||||||
|
1. Download the CURL source. In the “include” folder of the CURL distribution,
|
||||||
|
copy the curl directory to the “lib” directory of xmlbpc-c. When you are done
|
||||||
|
with this step, you should have a curl.h file located in the directory
|
||||||
|
xmlrpc-c\lib\curl\. The xmlrpc project looks in this relative path for the
|
||||||
|
necessary headers.
|
||||||
|
|
||||||
|
2. In the CURL distribution, lib directory, is a file called Makefile.vc6. Edit
|
||||||
|
this file. The line starting with CCNODBG should be changed to:
|
||||||
|
CCNODBG = cl.exe /MT /O2 /DNDEBUG
|
||||||
|
The /MT option links with the Multithreaded non-dll version of the c runtime.
|
||||||
|
If this change is not made, the project will not link, as this is the default
|
||||||
|
setting for the xmlrpc-c projects. In debug mode, we use the dll version of the
|
||||||
|
c runtime as it makes memory leak checking tools work better.
|
||||||
|
|
||||||
|
3. Open a command prompt window and run the vcvars32.bat file in your Visual C++
|
||||||
|
distribution. If you are using Studio 2002 or 2003, use the “Visual Studio
|
||||||
|
Command Prompt” from the Start menu to open the console.
|
||||||
|
|
||||||
|
4. Compile release and debug mode libraries. For the purposes of this tutorial,
|
||||||
|
we are going to build only the curl library without ssl or zlib support. In the
|
||||||
|
command prompt, navigate to the curl\lib directory and execute the following
|
||||||
|
commands:
|
||||||
|
nmake -f Makefile.vc6 CFG=debug
|
||||||
|
nmake -f Makefile.vc6 CFG=release
|
||||||
|
|
||||||
|
5. The above step should have generated two static link libraries in the
|
||||||
|
curl\lib directory: libcurl.lib and libcurld.lib. Copy these files into the
|
||||||
|
root of the xmlrpc-c\lib\ directory. This step ends our involvement with the
|
||||||
|
actual CURL distribution. The remainder of the steps are for XMLRPC-C.
|
||||||
|
|
||||||
|
6. Open the xmlrpc-c Visual Studio workspace (Instructions for VC++ 6, other
|
||||||
|
versions are slightly different). In File View, expand the xmlrpc project.
|
||||||
|
Under “Source Files” there is an entry for xmlrpc_curl_transport.c This is not
|
||||||
|
included in any build paths by default. To enable it for compilation, right
|
||||||
|
click the file to change the settings. In the dropdown, select “All
|
||||||
|
Configurations.” Pick the General tab and uncheck the “Exclude File From Build”
|
||||||
|
setting. Press OK to save your changes to the project.
|
||||||
|
|
||||||
|
7. In the “Header Files” section of the xmlrpc project is a file called
|
||||||
|
“transport_config.h”. Edit this file to set the MUST_BUILD_CURL_CLIENT to 1,
|
||||||
|
and if you wish to change the default transport to curl, change the
|
||||||
|
XMLRPC_DEFAULT_TRANSPORT to “curl”.
|
||||||
|
|
||||||
|
8. Compile and test one or more of the sample client projects.
|
102
libs/xmlrpc-c/Windows/cpptest.dsp
Normal file
102
libs/xmlrpc-c/Windows/cpptest.dsp
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="cpptest" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
|
CFG=cpptest - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "cpptest.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "cpptest.mak" CFG="cpptest - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "cpptest - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "cpptest - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName "cpptest"
|
||||||
|
# PROP Scc_LocalPath ".."
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "cpptest - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir "Release\cpptest"
|
||||||
|
# PROP Intermediate_Dir "Release\cpptest"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\\" /I "..\src" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\lib\xmlrpc.lib /nologo /subsystem:console /machine:I386 /out:"..\bin\cpptest.exe"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "cpptest - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir "Debug\cpptest"
|
||||||
|
# PROP Intermediate_Dir "Debug\cpptest"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\\" /I "..\src" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\lib\xmlrpcD.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\bin\cpptest.exe" /pdbtype:sept
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "cpptest - Win32 Release"
|
||||||
|
# Name "cpptest - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\cpptest.cpp
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
100
libs/xmlrpc-c/Windows/query_meerkat.dsp
Normal file
100
libs/xmlrpc-c/Windows/query_meerkat.dsp
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="query_meerkat" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
|
CFG=query_meerkat - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "query_meerkat.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "query_meerkat.mak" CFG="query_meerkat - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "query_meerkat - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "query_meerkat - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName "query_meerkat"
|
||||||
|
# PROP Scc_LocalPath ".."
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "query_meerkat - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir "Release\query_meerkat"
|
||||||
|
# PROP Intermediate_Dir "Release\query_meerkat"
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\\" /I "..\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
|
# ADD LINK32 ..\lib\xmlrpc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib WinInet.lib /nologo /subsystem:console /machine:I386 /out:"..\bin\query_meerkat.exe"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "query_meerkat - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir "Debug\query_meerkat"
|
||||||
|
# PROP Intermediate_Dir "Debug\query_meerkat"
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\\" /I "..\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
|
# ADD LINK32 ..\lib\xmlrpcD.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib WinInet.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\bin\query_meerkatD.exe" /pdbtype:sept
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "query_meerkat - Win32 Release"
|
||||||
|
# Name "query_meerkat - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\examples\query-meerkat.c"
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
236
libs/xmlrpc-c/Windows/rpctest.dsp
Normal file
236
libs/xmlrpc-c/Windows/rpctest.dsp
Normal file
@ -0,0 +1,236 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="rpctest" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
|
CFG=rpctest - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "rpctest.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "rpctest.mak" CFG="rpctest - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "rpctest - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "rpctest - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName "rpctest"
|
||||||
|
# PROP Scc_LocalPath ".."
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "rpctest - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir "Release\rpctest"
|
||||||
|
# PROP Intermediate_Dir "Release\rpctest"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\\" /I "..\include" /I "../lib/util/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ABYSS_WIN32" /YX /FD /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
|
# ADD LINK32 ..\lib\xmlrpc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib Wininet.lib /nologo /subsystem:console /machine:I386 /out:"..\bin\rpctest.exe"
|
||||||
|
# Begin Special Build Tool
|
||||||
|
SOURCE="$(InputPath)"
|
||||||
|
PostBuild_Desc=Copy test files
|
||||||
|
PostBuild_Cmds=copy ..\src\testdata\*.* .
|
||||||
|
# End Special Build Tool
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "rpctest - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir "Debug\rpctest"
|
||||||
|
# PROP Intermediate_Dir "Debug\rpctest"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\\" /I "..\include" /I "../lib/util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ABYSS_WIN32" /YX /FD /GZ /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
|
# ADD LINK32 ..\lib\xmlrpcD.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib Wininet.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\bin\rpctestD.exe" /pdbtype:sept
|
||||||
|
# Begin Special Build Tool
|
||||||
|
SOURCE="$(InputPath)"
|
||||||
|
PostBuild_Desc=Copy test files
|
||||||
|
PostBuild_Cmds=copy ..\src\testdata\*.* .
|
||||||
|
# End Special Build Tool
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "rpctest - Win32 Release"
|
||||||
|
# Name "rpctest - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\cgi.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\client.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\conf.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\conn.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\data.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\file.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\http.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\parse_xml.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\serialize.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\server.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\server_abyss.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\socket.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\test.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\thread.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\token.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\token.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\trace.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\value.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\xml_data.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_server_abyss.c
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\client.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\parse_xml.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\serialize.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\server_abyss.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\test.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\value.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\test\xml_data.h
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
# End Group
|
||||||
|
# Begin Group "TestFiles"
|
||||||
|
|
||||||
|
# PROP Default_Filter ""
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\src\testdata\http-req-simple.txt"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\testdata\req_no_params.xml
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\testdata\req_out_of_order.xml
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\testdata\req_value_name.xml
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
26
libs/xmlrpc-c/Windows/transport_config_win32.h
Normal file
26
libs/xmlrpc-c/Windows/transport_config_win32.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#define MUST_BUILD_WININET_CLIENT 1
|
||||||
|
#define MUST_BUILD_CURL_CLIENT 0
|
||||||
|
#define MUST_BUILD_LIBWWW_CLIENT 0
|
||||||
|
static const char * const XMLRPC_DEFAULT_TRANSPORT = "wininet";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Set to zero if you do not wish to build the http.sys
|
||||||
|
based XMLRPC-C Server
|
||||||
|
*/
|
||||||
|
#define MUST_BUILD_HTTP_SYS_SERVER 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
We use pragma statements to tell the linker what we need to link with.
|
||||||
|
Since Curl requires Winsock, Winmm, and libcurl, and no other
|
||||||
|
project does, if we are building curl support we tell the linker
|
||||||
|
what libs we need to add.
|
||||||
|
*/
|
||||||
|
#if MUST_BUILD_CURL_CLIENT > 0
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#pragma comment( lib, "../lib/libcurld.lib" )
|
||||||
|
#else
|
||||||
|
#pragma comment( lib, "../lib/libcurl.lib" )
|
||||||
|
#endif
|
||||||
|
#pragma comment( lib, "Winmm.lib" )
|
||||||
|
#pragma comment( lib, "Ws2_32.lib" )
|
||||||
|
#endif
|
258
libs/xmlrpc-c/Windows/xmlrpc.dsp
Normal file
258
libs/xmlrpc-c/Windows/xmlrpc.dsp
Normal file
@ -0,0 +1,258 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="xmlrpc" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||||
|
|
||||||
|
CFG=xmlrpc - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc.mak" CFG="xmlrpc - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "xmlrpc - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||||
|
!MESSAGE "xmlrpc - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName "xmlrpc"
|
||||||
|
# PROP Scc_LocalPath ".."
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "xmlrpc - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir "Release\xmlrpc"
|
||||||
|
# PROP Intermediate_Dir "Release\xmlrpc"
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
MTL=midl.exe
|
||||||
|
LINK32=link.exe -lib
|
||||||
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../lib/" /I "../lib/curl_transport" /I "../lib/util/include" /I "../include" /I "../" /I "../lib/expat/xmlparse" /I "../lib/w3c-libwww-5.3.2/Library/src" /I "../lib/abyss/src" /I "../lib/wininet_transport" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "ABYSS_WIN32" /D "CURL_STATICLIB" /FR /YX /FD /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LIB32=link.exe -lib
|
||||||
|
# ADD BASE LIB32 /nologo
|
||||||
|
# ADD LIB32 /nologo /out:"..\lib\xmlrpc.lib"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "xmlrpc - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir "Debug\xmlrpc"
|
||||||
|
# PROP Intermediate_Dir "Debug\xmlrpc"
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
MTL=midl.exe
|
||||||
|
LINK32=link.exe -lib
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../lib/" /I "../lib/curl_transport" /I "../lib/util/include" /I "../include" /I "../" /I "../lib/expat/xmlparse" /I "../lib/w3c-libwww-5.3.2/Library/src" /I "../lib/abyss/src" /I "../lib/wininet_transport" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "ABYSS_WIN32" /D "CURL_STATICLIB" /YX /FD /GZ /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LIB32=link.exe -lib
|
||||||
|
# ADD BASE LIB32 /nologo
|
||||||
|
# ADD LIB32 /nologo /out:"..\lib\xmlrpcD.lib"
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "xmlrpc - Win32 Release"
|
||||||
|
# Name "xmlrpc - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;cc"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\util\casprintf.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\util\pthreadx_win32.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_array.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_authcookie.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_base64.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_builddecomp.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_client.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\curl_transport\xmlrpc_curl_transport.c
|
||||||
|
# PROP Exclude_From_Build 1
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_data.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_datetime.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_expat.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_libxml2.c
|
||||||
|
# PROP Exclude_From_Build 1
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_parse.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_registry.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_serialize.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_server_abyss.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_server_w32httpsys.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_struct.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_strutil.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_support.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\src\xmlrpc_utf8.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\wininet_transport\xmlrpc_wininet_transport.c
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\include\xmlrpc-c\abyss.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\include\xmlrpc-c\base.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\util\include\bool.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\include\xmlrpc-c\client.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\include\xmlrpc-c\client_int.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\util\include\mallocvar.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\util\include\pthreadx.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\include\xmlrpc-c\server.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\include\xmlrpc-c\server_abyss.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\include\xmlrpc-c\server_cgi.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\include\xmlrpc-c\server_w32httpsys.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\include\xmlrpc-c\transport.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\transport_config.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\include\xmlrpc-c\transport_int.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE="..\include\xmlrpc-c\xmlparser.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\xmlrpc_config.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\curl_transport\xmlrpc_curl_transport.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\wininet_transport\xmlrpc_wininet_transport.h
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
194
libs/xmlrpc-c/Windows/xmlrpc.dsw
Normal file
194
libs/xmlrpc-c/Windows/xmlrpc.dsw
Normal file
@ -0,0 +1,194 @@
|
|||||||
|
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||||
|
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "cpptest"=".\cpptest.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name xmlrpc
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "gennmtab"="..\lib\expat\gennmtab\gennmtab.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "query_meerkat"=".\query_meerkat.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name xmlrpc
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "rpctest"=".\rpctest.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name xmlrpc
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "xmlparse"="..\lib\expat\xmlparse\xmlparse.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name xmltok
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "xmlrpc"=".\xmlrpc.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name xmlparse
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "xmlrpc_sample_add_asynch_client"=".\xmlrpc_sample_add_asynch_client.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name xmlrpc
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "xmlrpc_sample_add_server"=".\xmlrpc_sample_add_server.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name xmlrpc
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "xmlrpc_sample_add_server_w32httpsys"=".\xmlrpc_sample_add_server_w32httpsys.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name xmlrpc
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "xmlrpc_sample_add_sync_client"=".\xmlrpc_sample_add_sync_client.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name xmlrpc
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "xmlrpc_sample_auth_client"=".\xmlrpc_sample_auth_client.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name xmlrpc
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "xmltok"="..\lib\expat\xmltok\xmltok.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name gennmtab
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Global:
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Package=<3>
|
||||||
|
{{{
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
102
libs/xmlrpc-c/Windows/xmlrpc_sample_add_asynch_client.dsp
Normal file
102
libs/xmlrpc-c/Windows/xmlrpc_sample_add_asynch_client.dsp
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="xmlrpc_sample_add_asynch_client" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
|
CFG=xmlrpc_sample_add_asynch_client - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc_sample_add_asynch_client.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc_sample_add_asynch_client.mak" CFG="xmlrpc_sample_add_asynch_client - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "xmlrpc_sample_add_asynch_client - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "xmlrpc_sample_add_asynch_client - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName "xmlrpc_sample_add_asynch_client"
|
||||||
|
# PROP Scc_LocalPath ".."
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "xmlrpc_sample_add_asynch_client - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir "Release\xmlrpc_sample_add_asynch_client"
|
||||||
|
# PROP Intermediate_Dir "Release\xmlrpc_sample_add_asynch_client"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\\" /I "..\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
|
# ADD LINK32 ..\lib\xmlrpc.lib WinInet.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"..\bin\xmlrpc_sample_add_asynch_client.exe"
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "xmlrpc_sample_add_asynch_client - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir "Debug\xmlrpc_sample_add_asynch_client"
|
||||||
|
# PROP Intermediate_Dir "Debug\xmlrpc_sample_add_asynch_client"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\\" /I "..\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
|
# ADD LINK32 ..\lib\xmlrpcD.lib WinInet.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\bin\xmlrpc_sample_add_asynch_clientD.exe" /pdbtype:sept
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "xmlrpc_sample_add_asynch_client - Win32 Release"
|
||||||
|
# Name "xmlrpc_sample_add_asynch_client - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\examples\xmlrpc_asynch_client.c
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
140
libs/xmlrpc-c/Windows/xmlrpc_sample_add_server.dsp
Normal file
140
libs/xmlrpc-c/Windows/xmlrpc_sample_add_server.dsp
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="xmlrpc_sample_add_server" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
|
CFG=xmlrpc_sample_add_server - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc_sample_add_server.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc_sample_add_server.mak" CFG="xmlrpc_sample_add_server - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "xmlrpc_sample_add_server - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "xmlrpc_sample_add_server - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName "xmlrpc_sample_add_server"
|
||||||
|
# PROP Scc_LocalPath ".."
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "xmlrpc_sample_add_server - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir ".\Release\xmlrpc_sample_add_server"
|
||||||
|
# PROP Intermediate_Dir ".\Release\xmlrpc_sample_add_server"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\\" /I "..\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ABYSS_WIN32" /D "_THREAD" /YX /FD /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib ..\lib\xmlrpc.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"..\bin\xmlrpc_sample_add_server.exe"
|
||||||
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "xmlrpc_sample_add_server - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir ".\Debug\xmlrpc_sample_add_server"
|
||||||
|
# PROP Intermediate_Dir ".\Debug\xmlrpc_sample_add_server"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\\" /I "..\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ABYSS_WIN32" /D "_THREAD" /YX /FD /GZ /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib ..\lib\xmlrpcD.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\bin\xmlrpc_sample_add_serverD.exe" /pdbtype:sept
|
||||||
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "xmlrpc_sample_add_server - Win32 Release"
|
||||||
|
# Name "xmlrpc_sample_add_server - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\conf.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\conn.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\data.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\file.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\http.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\server.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\socket.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\thread.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\lib\abyss\src\trace.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\examples\xmlrpc_sample_add_server.c
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
104
libs/xmlrpc-c/Windows/xmlrpc_sample_add_server_w32httpsys.dsp
Normal file
104
libs/xmlrpc-c/Windows/xmlrpc_sample_add_server_w32httpsys.dsp
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="xmlrpc_sample_add_server_w32httpsys" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
|
CFG=xmlrpc_sample_add_server_w32httpsys - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc_sample_add_server_w32httpsys.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc_sample_add_server_w32httpsys.mak" CFG="xmlrpc_sample_add_server_w32httpsys - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "xmlrpc_sample_add_server_w32httpsys - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "xmlrpc_sample_add_server_w32httpsys - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName "xmlrpc_sample_add_server_w32httpsys"
|
||||||
|
# PROP Scc_LocalPath ".."
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "xmlrpc_sample_add_server_w32httpsys - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir ".\Release\xmlrpc_sample_add_server_w32httpsys"
|
||||||
|
# PROP Intermediate_Dir ".\Release\xmlrpc_sample_add_server_w32httpsys"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\\" /I "..\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ABYSS_WIN32" /D "_THREAD" /YX /FD /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib ..\lib\xmlrpc.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"..\bin\xmlrpc_sample_add_server_w32httpsys.exe"
|
||||||
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "xmlrpc_sample_add_server_w32httpsys - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir ".\Debug\xmlrpc_sample_add_server_w32httpsys"
|
||||||
|
# PROP Intermediate_Dir ".\Debug\xmlrpc_sample_add_server_w32httpsys"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\\" /I "..\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ABYSS_WIN32" /D "_THREAD" /YX /FD /GZ /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib ..\lib\xmlrpcD.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\bin\xmlrpc_sample_add_server_w32httpsysD.exe" /pdbtype:sept
|
||||||
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "xmlrpc_sample_add_server_w32httpsys - Win32 Release"
|
||||||
|
# Name "xmlrpc_sample_add_server_w32httpsys - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\examples\xmlrpc_sample_add_server_w32httpsys.c
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
104
libs/xmlrpc-c/Windows/xmlrpc_sample_add_sync_client.dsp
Normal file
104
libs/xmlrpc-c/Windows/xmlrpc_sample_add_sync_client.dsp
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="xmlrpc_sample_add_sync_client" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
|
CFG=xmlrpc_sample_add_sync_client - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc_sample_add_sync_client.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc_sample_add_sync_client.mak" CFG="xmlrpc_sample_add_sync_client - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "xmlrpc_sample_add_sync_client - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "xmlrpc_sample_add_sync_client - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName "xmlrpc_sample_add_sync_client"
|
||||||
|
# PROP Scc_LocalPath ".."
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "xmlrpc_sample_add_sync_client - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir ".\Release\xmlrpc_sample_add_sync_client"
|
||||||
|
# PROP Intermediate_Dir ".\Release\xmlrpc_sample_add_sync_client"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\\" /I "..\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
|
# ADD LINK32 ..\lib\xmlrpc.lib kernel32.lib user32.lib gdi32.lib WinInet.lib /nologo /subsystem:console /machine:I386 /out:"..\bin\xmlrpc_sample_add_sync_client.exe"
|
||||||
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "xmlrpc_sample_add_sync_client - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir ".\Debug\xmlrpc_sample_add_sync_client"
|
||||||
|
# PROP Intermediate_Dir ".\Debug\xmlrpc_sample_add_sync_client"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\\" /I "..\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
|
# ADD LINK32 ..\lib\xmlrpcD.lib kernel32.lib user32.lib gdi32.lib WinInet.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\bin\xmlrpc_sample_add_sync_clientD.exe" /pdbtype:sept
|
||||||
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "xmlrpc_sample_add_sync_client - Win32 Release"
|
||||||
|
# Name "xmlrpc_sample_add_sync_client - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\examples\xmlrpc_sample_add_client.c
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
104
libs/xmlrpc-c/Windows/xmlrpc_sample_auth_client.dsp
Normal file
104
libs/xmlrpc-c/Windows/xmlrpc_sample_auth_client.dsp
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="xmlrpc_sample_auth_client" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
|
CFG=xmlrpc_sample_auth_client - Win32 Debug
|
||||||
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
|
!MESSAGE use the Export Makefile command and run
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc_sample_auth_client.mak".
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE NMAKE /f "xmlrpc_sample_auth_client.mak" CFG="xmlrpc_sample_auth_client - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "xmlrpc_sample_auth_client - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "xmlrpc_sample_auth_client - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName "xmlrpc_sample_auth_client"
|
||||||
|
# PROP Scc_LocalPath ".."
|
||||||
|
CPP=cl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "xmlrpc_sample_auth_client - Win32 Release"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir "Release"
|
||||||
|
# PROP BASE Intermediate_Dir "Release"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir ".\Release\xmlrpc_sample_auth_client"
|
||||||
|
# PROP Intermediate_Dir ".\Release\xmlrpc_sample_auth_client"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\\" /I "..\include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
|
# ADD LINK32 ..\lib\xmlrpc.lib kernel32.lib user32.lib gdi32.lib WinInet.lib /nologo /subsystem:console /machine:I386 /out:"..\bin\xmlrpc_sample_auth_client.exe"
|
||||||
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "xmlrpc_sample_auth_client - Win32 Debug"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
|
# PROP BASE Output_Dir "Debug"
|
||||||
|
# PROP BASE Intermediate_Dir "Debug"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 1
|
||||||
|
# PROP Output_Dir ".\Debug\xmlrpc_sample_auth_client"
|
||||||
|
# PROP Intermediate_Dir ".\Debug\xmlrpc_sample_auth_client"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\\" /I "..\include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||||
|
BSC32=bscmake.exe
|
||||||
|
# ADD BASE BSC32 /nologo
|
||||||
|
# ADD BSC32 /nologo
|
||||||
|
LINK32=link.exe
|
||||||
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
|
# ADD LINK32 ..\lib\xmlrpcD.lib kernel32.lib user32.lib gdi32.lib WinInet.lib /nologo /subsystem:console /debug /machine:I386 /out:"..\bin\xmlrpc_sample_auth_clientD.exe" /pdbtype:sept
|
||||||
|
# SUBTRACT LINK32 /pdb:none
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "xmlrpc_sample_auth_client - Win32 Release"
|
||||||
|
# Name "xmlrpc_sample_auth_client - Win32 Debug"
|
||||||
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\examples\auth_client.c
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Header Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||||
|
# End Group
|
||||||
|
# Begin Group "Resource Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||||
|
# End Group
|
||||||
|
# End Target
|
||||||
|
# End Project
|
130
libs/xmlrpc-c/Windows/xmlrpc_win32_config.h
Normal file
130
libs/xmlrpc-c/Windows/xmlrpc_win32_config.h
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* From xmlrpc_amconfig.h */
|
||||||
|
|
||||||
|
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||||
|
/* #undef size_t */
|
||||||
|
|
||||||
|
/* Define if you have the setgroups function. */
|
||||||
|
/* #undef HAVE_SETGROUPS */
|
||||||
|
|
||||||
|
/* #undef HAVE_ASPRINTF */
|
||||||
|
|
||||||
|
/* Define if you have the wcsncmp function. */
|
||||||
|
#define HAVE_WCSNCMP 1
|
||||||
|
|
||||||
|
/* Define if you have the <stdarg.h> header file. */
|
||||||
|
#define HAVE_STDARG_H 1
|
||||||
|
|
||||||
|
/* Define if you have the <sys/filio.h> header file. */
|
||||||
|
/* #undef HAVE_SYS_FILIO_H */
|
||||||
|
|
||||||
|
/* Define if you have the <sys/ioctl.h> header file. */
|
||||||
|
/* #undef HAVE_SYS_IOCTL_H 1 */
|
||||||
|
|
||||||
|
/* Define if you have the <wchar.h> header file. */
|
||||||
|
#define HAVE_WCHAR_H 1
|
||||||
|
|
||||||
|
/* Define if you have the socket library (-lsocket). */
|
||||||
|
/* #undef HAVE_LIBSOCKET */
|
||||||
|
|
||||||
|
/* Name of package */
|
||||||
|
#define PACKAGE "xmlrpc-c"
|
||||||
|
|
||||||
|
|
||||||
|
/* Win32 version of xmlrpc_config.h
|
||||||
|
|
||||||
|
Logical macros are 0 or 1 instead of the more traditional defined and
|
||||||
|
undefined. That's so we can distinguish when compiling code between
|
||||||
|
"false" and some problem with the code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define if va_list is actually an array. */
|
||||||
|
#define VA_LIST_IS_ARRAY 0
|
||||||
|
|
||||||
|
/* Define if we're using a copy of libwww with built-in SSL support. */
|
||||||
|
#define HAVE_LIBWWW_SSL 0
|
||||||
|
|
||||||
|
/* Used to mark unused variables under GCC... */
|
||||||
|
#define ATTR_UNUSED
|
||||||
|
|
||||||
|
/* Define this if your C library provides reasonably complete and correct Unicode wchar_t support. */
|
||||||
|
#define HAVE_UNICODE_WCHAR 1
|
||||||
|
|
||||||
|
#define DIRECTORY_SEPARATOR "\\"
|
||||||
|
|
||||||
|
|
||||||
|
/* Windows-specific includes. */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#if !defined (vsnprintf)
|
||||||
|
#define vsnprintf _vsnprintf
|
||||||
|
#endif
|
||||||
|
#if !defined (snprintf)
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#endif
|
||||||
|
#if !defined (popen)
|
||||||
|
#define popen _popen
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#include <time.h>
|
||||||
|
#include <WINSOCK.h>
|
||||||
|
#include <direct.h> /* for _chdir() */
|
||||||
|
|
||||||
|
/* We are linking against the multithreaded versions
|
||||||
|
of the Microsoft runtimes - this makes gmtime
|
||||||
|
equiv to gmtime_r in that Windows gmtime is threadsafe
|
||||||
|
*/
|
||||||
|
#if !defined (gmtime_r)
|
||||||
|
static struct tm* gmtime_r(const time_t *timep, struct tm* result)
|
||||||
|
{
|
||||||
|
struct tm *local;
|
||||||
|
|
||||||
|
local = gmtime(timep);
|
||||||
|
memcpy(result,local,sizeof(struct tm));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef socklen_t
|
||||||
|
typedef unsigned int socklen_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* inttypes.h */
|
||||||
|
#ifndef int8_t
|
||||||
|
typedef signed char int8_t;
|
||||||
|
#endif
|
||||||
|
#ifndef uint8_t
|
||||||
|
typedef unsigned char uint8_t;
|
||||||
|
#endif
|
||||||
|
#ifndef int16_t
|
||||||
|
typedef signed short int16_t;
|
||||||
|
#endif
|
||||||
|
#ifndef uint16_t
|
||||||
|
typedef unsigned short uint16_t;
|
||||||
|
#endif
|
||||||
|
#ifndef int32_t
|
||||||
|
typedef signed int int32_t;
|
||||||
|
#endif
|
||||||
|
#ifndef uint32_t
|
||||||
|
typedef unsigned int uint32_t;
|
||||||
|
#endif
|
||||||
|
#ifndef int64_t
|
||||||
|
typedef __int64 int64_t;
|
||||||
|
#endif
|
||||||
|
#ifndef uint64_t
|
||||||
|
typedef unsigned __int64 uint64_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define __inline__ __inline
|
||||||
|
|
||||||
|
#define HAVE_SETENV 1
|
||||||
|
__inline BOOL setenv(const char* name, const char* value, int i)
|
||||||
|
{
|
||||||
|
return (SetEnvironmentVariable(name, value) != 0) ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
|
545
libs/xmlrpc-c/aclocal.m4
vendored
Normal file
545
libs/xmlrpc-c/aclocal.m4
vendored
Normal file
@ -0,0 +1,545 @@
|
|||||||
|
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||||
|
|
||||||
|
dnl Copyright (C) 1994, 1995-8, 1999 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 This program is distributed in the hope that it will be useful,
|
||||||
|
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
dnl PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
||||||
|
|
||||||
|
AC_DEFUN(AM_CONFIG_HEADER,
|
||||||
|
[AC_PREREQ([2.12])
|
||||||
|
AC_CONFIG_HEADER([$1])
|
||||||
|
dnl When config.status generates a header, we must update the stamp-h file.
|
||||||
|
dnl This file resides in the same directory as the config header
|
||||||
|
dnl that is generated. We must strip everything past the first ":",
|
||||||
|
dnl and everything past the last "/".
|
||||||
|
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
|
||||||
|
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
|
||||||
|
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
|
||||||
|
<<am_indx=1
|
||||||
|
for am_file in <<$1>>; do
|
||||||
|
case " <<$>>CONFIG_HEADERS " in
|
||||||
|
*" <<$>>am_file "*<<)>>
|
||||||
|
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
am_indx=`expr "<<$>>am_indx" + 1`
|
||||||
|
done<<>>dnl>>)
|
||||||
|
changequote([,]))])
|
||||||
|
|
||||||
|
# Do all the work for Automake. 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.
|
||||||
|
|
||||||
|
# serial 1
|
||||||
|
|
||||||
|
dnl Usage:
|
||||||
|
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||||
|
|
||||||
|
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||||
|
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||||
|
PACKAGE=[$1]
|
||||||
|
AC_SUBST(PACKAGE)
|
||||||
|
VERSION=[$2]
|
||||||
|
AC_SUBST(VERSION)
|
||||||
|
dnl test to see if srcdir already configured
|
||||||
|
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
||||||
|
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||||
|
fi
|
||||||
|
ifelse([$3],,
|
||||||
|
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||||
|
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||||
|
AC_REQUIRE([AM_SANITY_CHECK])
|
||||||
|
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||||
|
dnl FIXME This is truly gross.
|
||||||
|
missing_dir=`cd $ac_aux_dir && pwd`
|
||||||
|
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||||
|
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||||
|
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||||
|
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||||
|
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||||
|
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check to make sure that the build environment is sane.
|
||||||
|
#
|
||||||
|
|
||||||
|
AC_DEFUN(AM_SANITY_CHECK,
|
||||||
|
[AC_MSG_CHECKING([whether build environment is sane])
|
||||||
|
# Just in case
|
||||||
|
sleep 1
|
||||||
|
echo timestamp > conftestfile
|
||||||
|
# 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 conftestfile 2> /dev/null`
|
||||||
|
if test "[$]*" = "X"; then
|
||||||
|
# -L didn't work.
|
||||||
|
set X `ls -t $srcdir/configure conftestfile`
|
||||||
|
fi
|
||||||
|
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||||
|
&& test "[$]*" != "X conftestfile $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" = conftestfile
|
||||||
|
)
|
||||||
|
then
|
||||||
|
# Ok.
|
||||||
|
:
|
||||||
|
else
|
||||||
|
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||||
|
Check your system clock])
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
AC_MSG_RESULT(yes)])
|
||||||
|
|
||||||
|
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||||
|
dnl The program must properly implement --version.
|
||||||
|
AC_DEFUN(AM_MISSING_PROG,
|
||||||
|
[AC_MSG_CHECKING(for working $2)
|
||||||
|
# Run test in a subshell; some versions of sh will print an error if
|
||||||
|
# an executable is not found, even if stderr is redirected.
|
||||||
|
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||||
|
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||||
|
$1=$2
|
||||||
|
AC_MSG_RESULT(found)
|
||||||
|
else
|
||||||
|
$1="$3/missing $2"
|
||||||
|
AC_MSG_RESULT(missing)
|
||||||
|
fi
|
||||||
|
AC_SUBST($1)])
|
||||||
|
|
||||||
|
|
||||||
|
# serial 40 AC_PROG_LIBTOOL
|
||||||
|
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||||
|
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||||
|
|
||||||
|
# Save cache, so that ltconfig can load it
|
||||||
|
AC_CACHE_SAVE
|
||||||
|
|
||||||
|
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||||
|
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||||
|
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||||
|
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||||
|
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||||
|
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||||
|
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|
||||||
|
|| AC_MSG_ERROR([libtool configure failed])
|
||||||
|
|
||||||
|
# Reload cache, that may have been modified by ltconfig
|
||||||
|
AC_CACHE_LOAD
|
||||||
|
|
||||||
|
# This can be used to rebuild libtool when needed
|
||||||
|
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||||
|
|
||||||
|
# Always use our own libtool.
|
||||||
|
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||||
|
AC_SUBST(LIBTOOL)dnl
|
||||||
|
|
||||||
|
# Redirect the config.log output again, so that the ltconfig log is not
|
||||||
|
# clobbered by the next message.
|
||||||
|
exec 5>>./config.log
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||||
|
[AC_PREREQ(2.13)dnl
|
||||||
|
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||||
|
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||||
|
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
|
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_CC])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_LD])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_NM])dnl
|
||||||
|
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||||
|
dnl
|
||||||
|
|
||||||
|
case "$target" in
|
||||||
|
NONE) lt_target="$host" ;;
|
||||||
|
*) lt_target="$target" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Check for any special flags to pass to ltconfig.
|
||||||
|
#
|
||||||
|
# the following will cause an existing older ltconfig to fail, so
|
||||||
|
# we ignore this at the expense of the cache file... Checking this
|
||||||
|
# will just take longer ... bummer!
|
||||||
|
#libtool_flags="--cache-file=$cache_file"
|
||||||
|
#
|
||||||
|
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||||
|
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||||
|
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||||
|
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||||
|
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||||
|
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||||
|
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||||
|
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||||
|
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||||
|
AC_ARG_ENABLE(libtool-lock,
|
||||||
|
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||||
|
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||||
|
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||||
|
|
||||||
|
# Some flags need to be propagated to the compiler or linker for good
|
||||||
|
# libtool support.
|
||||||
|
case "$lt_target" in
|
||||||
|
*-*-irix6*)
|
||||||
|
# Find out which ABI we are using.
|
||||||
|
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||||
|
if AC_TRY_EVAL(ac_compile); then
|
||||||
|
case "`/usr/bin/file conftest.o`" in
|
||||||
|
*32-bit*)
|
||||||
|
LD="${LD-ld} -32"
|
||||||
|
;;
|
||||||
|
*N32*)
|
||||||
|
LD="${LD-ld} -n32"
|
||||||
|
;;
|
||||||
|
*64-bit*)
|
||||||
|
LD="${LD-ld} -64"
|
||||||
|
;;
|
||||||
|
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_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||||
|
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
|
||||||
|
;;
|
||||||
|
|
||||||
|
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||||
|
[*-*-cygwin* | *-*-mingw*)
|
||||||
|
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||||
|
AC_CHECK_TOOL(AS, as, false)
|
||||||
|
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||||
|
;;
|
||||||
|
])
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||||
|
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||||
|
|
||||||
|
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||||
|
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||||
|
|
||||||
|
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||||
|
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||||
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||||
|
# `yes'.
|
||||||
|
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||||
|
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||||
|
AC_ARG_ENABLE(shared,
|
||||||
|
changequote(<<, >>)dnl
|
||||||
|
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||||
|
changequote([, ])dnl
|
||||||
|
[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.
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||||
|
for pkg in $enableval; do
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_shared=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||||
|
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
|
AC_ENABLE_SHARED(no)])
|
||||||
|
|
||||||
|
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||||
|
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||||
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||||
|
# `yes'.
|
||||||
|
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||||
|
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||||
|
AC_ARG_ENABLE(static,
|
||||||
|
changequote(<<, >>)dnl
|
||||||
|
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||||
|
changequote([, ])dnl
|
||||||
|
[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.
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||||
|
for pkg in $enableval; do
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_static=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||||
|
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
|
AC_ENABLE_STATIC(no)])
|
||||||
|
|
||||||
|
|
||||||
|
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||||
|
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||||
|
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||||
|
# `yes'.
|
||||||
|
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||||
|
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||||
|
AC_ARG_ENABLE(fast-install,
|
||||||
|
changequote(<<, >>)dnl
|
||||||
|
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||||
|
changequote([, ])dnl
|
||||||
|
[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.
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||||
|
for pkg in $enableval; do
|
||||||
|
if test "X$pkg" = "X$p"; then
|
||||||
|
enable_fast_install=yes
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
;;
|
||||||
|
esac],
|
||||||
|
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||||
|
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
|
AC_ENABLE_FAST_INSTALL(no)])
|
||||||
|
|
||||||
|
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||||
|
AC_DEFUN(AC_PROG_LD,
|
||||||
|
[AC_ARG_WITH(gnu-ld,
|
||||||
|
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||||
|
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||||
|
AC_REQUIRE([AC_PROG_CC])dnl
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
|
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||||
|
ac_prog=ld
|
||||||
|
if test "$ac_cv_prog_gcc" = yes; then
|
||||||
|
# Check if gcc -print-prog-name=ld gives a path.
|
||||||
|
AC_MSG_CHECKING([for ld used by GCC])
|
||||||
|
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
||||||
|
case "$ac_prog" in
|
||||||
|
# Accept absolute paths.
|
||||||
|
changequote(,)dnl
|
||||||
|
[\\/]* | [A-Za-z]:[\\/]*)
|
||||||
|
re_direlt='/[^/][^/]*/\.\./'
|
||||||
|
changequote([,])dnl
|
||||||
|
# Canonicalize the path of ld
|
||||||
|
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||||
|
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||||
|
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||||
|
done
|
||||||
|
test -z "$LD" && LD="$ac_prog"
|
||||||
|
;;
|
||||||
|
"")
|
||||||
|
# If it fails, then pretend we aren't using GCC.
|
||||||
|
ac_prog=ld
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# If it is relative, then search for the first ld in PATH.
|
||||||
|
with_gnu_ld=unknown
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
elif test "$with_gnu_ld" = yes; then
|
||||||
|
AC_MSG_CHECKING([for GNU ld])
|
||||||
|
else
|
||||||
|
AC_MSG_CHECKING([for non-GNU ld])
|
||||||
|
fi
|
||||||
|
AC_CACHE_VAL(ac_cv_path_LD,
|
||||||
|
[if test -z "$LD"; then
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||||
|
for ac_dir in $PATH; do
|
||||||
|
test -z "$ac_dir" && ac_dir=.
|
||||||
|
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||||
|
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||||
|
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||||
|
# but apparently some GNU ld's only accept -v.
|
||||||
|
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||||
|
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||||
|
test "$with_gnu_ld" != no && break
|
||||||
|
else
|
||||||
|
test "$with_gnu_ld" != yes && break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
else
|
||||||
|
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||||
|
fi])
|
||||||
|
LD="$ac_cv_path_LD"
|
||||||
|
if test -n "$LD"; then
|
||||||
|
AC_MSG_RESULT($LD)
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||||
|
AC_PROG_LD_GNU
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN(AC_PROG_LD_GNU,
|
||||||
|
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||||
|
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||||
|
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||||
|
ac_cv_prog_gnu_ld=yes
|
||||||
|
else
|
||||||
|
ac_cv_prog_gnu_ld=no
|
||||||
|
fi])
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||||
|
AC_DEFUN(AC_PROG_NM,
|
||||||
|
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||||
|
AC_CACHE_VAL(ac_cv_path_NM,
|
||||||
|
[if test -n "$NM"; then
|
||||||
|
# Let the user override the test.
|
||||||
|
ac_cv_path_NM="$NM"
|
||||||
|
else
|
||||||
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||||
|
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||||
|
test -z "$ac_dir" && ac_dir=.
|
||||||
|
if test -f $ac_dir/nm || test -f $ac_dir/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
|
||||||
|
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||||
|
ac_cv_path_NM="$ac_dir/nm -B"
|
||||||
|
break
|
||||||
|
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||||
|
ac_cv_path_NM="$ac_dir/nm -p"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||||
|
continue # so that we can try to find one that supports BSD flags
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$ac_save_ifs"
|
||||||
|
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||||
|
fi])
|
||||||
|
NM="$ac_cv_path_NM"
|
||||||
|
AC_MSG_RESULT([$NM])
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_CHECK_LIBM - check for math library
|
||||||
|
AC_DEFUN(AC_CHECK_LIBM,
|
||||||
|
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
|
LIBM=
|
||||||
|
case "$lt_target" in
|
||||||
|
*-*-beos* | *-*-cygwin*)
|
||||||
|
# These system don't have libm
|
||||||
|
;;
|
||||||
|
*-ncr-sysv4.3*)
|
||||||
|
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||||
|
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||||
|
# the libltdl convenience library and INCLTDL to the include flags for
|
||||||
|
# the libltdl header and adds --enable-ltdl-convenience to the
|
||||||
|
# configure arguments. Note that LIBLTDL and INCLTDL are not
|
||||||
|
# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
|
||||||
|
# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
|
||||||
|
# with '${top_builddir}/' and INCLTDL will be prefixed with
|
||||||
|
# '${top_srcdir}/' (note the single quotes!). If your package is not
|
||||||
|
# flat and you're not using automake, define top_builddir and
|
||||||
|
# top_srcdir appropriately in the Makefiles.
|
||||||
|
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
|
case "$enable_ltdl_convenience" in
|
||||||
|
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||||
|
"") enable_ltdl_convenience=yes
|
||||||
|
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||||
|
esac
|
||||||
|
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
|
||||||
|
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
||||||
|
])
|
||||||
|
|
||||||
|
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||||
|
# the libltdl installable library and INCLTDL to the include flags for
|
||||||
|
# the libltdl header and adds --enable-ltdl-install to the configure
|
||||||
|
# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
|
||||||
|
# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
|
||||||
|
# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
|
||||||
|
# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
|
||||||
|
# with '${top_srcdir}/' (note the single quotes!). If your package is
|
||||||
|
# not flat and you're not using automake, define top_builddir and
|
||||||
|
# top_srcdir appropriately in the Makefiles.
|
||||||
|
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||||
|
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||||
|
AC_CHECK_LIB(ltdl, main,
|
||||||
|
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||||
|
[if test x"$enable_ltdl_install" = xno; then
|
||||||
|
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||||
|
else
|
||||||
|
enable_ltdl_install=yes
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
if test x"$enable_ltdl_install" = x"yes"; then
|
||||||
|
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||||
|
LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
|
||||||
|
INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
|
||||||
|
else
|
||||||
|
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||||
|
LIBLTDL="-lltdl"
|
||||||
|
INCLTDL=
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl old names
|
||||||
|
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||||
|
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||||
|
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||||
|
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||||
|
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||||
|
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||||
|
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||||
|
|
||||||
|
dnl This is just to silence aclocal about the macro not being used
|
||||||
|
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
||||||
|
|
8433
libs/xmlrpc-c/autom4te.cache/output.0
Normal file
8433
libs/xmlrpc-c/autom4te.cache/output.0
Normal file
File diff suppressed because it is too large
Load Diff
116
libs/xmlrpc-c/autom4te.cache/requests
Normal file
116
libs/xmlrpc-c/autom4te.cache/requests
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
# This file was generated.
|
||||||
|
# It contains the lists of macros which have been traced.
|
||||||
|
# It can be safely removed.
|
||||||
|
|
||||||
|
@request = (
|
||||||
|
bless( [
|
||||||
|
'0',
|
||||||
|
1,
|
||||||
|
[
|
||||||
|
'/subsys/autoconf/share'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'/subsys/autoconf/share/autoconf/autoconf.m4f',
|
||||||
|
'aclocal.m4',
|
||||||
|
'configure.in'
|
||||||
|
],
|
||||||
|
{
|
||||||
|
'AC_CANONICAL_SYSTEM' => 1,
|
||||||
|
'AC_HEADER_STAT' => 1,
|
||||||
|
'AC_FUNC_STRFTIME' => 1,
|
||||||
|
'AC_PROG_RANLIB' => 1,
|
||||||
|
'AC_C_VOLATILE' => 1,
|
||||||
|
'AC_FUNC_WAIT3' => 1,
|
||||||
|
'AC_CONFIG_AUX_DIR' => 1,
|
||||||
|
'AC_REPLACE_FNMATCH' => 1,
|
||||||
|
'AC_FUNC_SETPGRP' => 1,
|
||||||
|
'AC_HEADER_TIME' => 1,
|
||||||
|
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||||
|
'AC_HEADER_SYS_WAIT' => 1,
|
||||||
|
'AC_TYPE_UID_T' => 1,
|
||||||
|
'AM_CONDITIONAL' => 1,
|
||||||
|
'AC_CHECK_LIB' => 1,
|
||||||
|
'AC_PROG_LN_S' => 1,
|
||||||
|
'AC_FUNC_MEMCMP' => 1,
|
||||||
|
'AM_PROG_CC_C_O' => 1,
|
||||||
|
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||||
|
'AC_FUNC_FORK' => 1,
|
||||||
|
'AC_FUNC_GETGROUPS' => 1,
|
||||||
|
'AC_HEADER_MAJOR' => 1,
|
||||||
|
'AC_FUNC_STRNLEN' => 1,
|
||||||
|
'AC_FUNC_STRTOD' => 1,
|
||||||
|
'AC_HEADER_DIRENT' => 1,
|
||||||
|
'AC_FUNC_UTIME_NULL' => 1,
|
||||||
|
'AC_FUNC_MBRTOWC' => 1,
|
||||||
|
'_m4_warn' => 1,
|
||||||
|
'AC_CONFIG_FILES' => 1,
|
||||||
|
'AC_FUNC_ALLOCA' => 1,
|
||||||
|
'AC_C_CONST' => 1,
|
||||||
|
'AC_CHECK_MEMBERS' => 1,
|
||||||
|
'AC_FUNC_REALLOC' => 1,
|
||||||
|
'include' => 1,
|
||||||
|
'AC_FUNC_OBSTACK' => 1,
|
||||||
|
'AC_FUNC_LSTAT' => 1,
|
||||||
|
'AC_STRUCT_TIMEZONE' => 1,
|
||||||
|
'AC_FUNC_GETPGRP' => 1,
|
||||||
|
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||||
|
'AC_CHECK_HEADERS' => 1,
|
||||||
|
'AC_TYPE_MODE_T' => 1,
|
||||||
|
'AC_CHECK_TYPES' => 1,
|
||||||
|
'AC_PROG_YACC' => 1,
|
||||||
|
'AC_TYPE_PID_T' => 1,
|
||||||
|
'AC_FUNC_STRERROR_R' => 1,
|
||||||
|
'AM_AUTOMAKE_VERSION' => 1,
|
||||||
|
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||||
|
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||||
|
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
|
||||||
|
'AC_TYPE_SIGNAL' => 1,
|
||||||
|
'AC_PROG_GCC_TRADITIONAL' => 1,
|
||||||
|
'm4_sinclude' => 1,
|
||||||
|
'AC_PROG_CPP' => 1,
|
||||||
|
'AC_FUNC_STAT' => 1,
|
||||||
|
'AC_PROG_INSTALL' => 1,
|
||||||
|
'sinclude' => 1,
|
||||||
|
'AC_CONFIG_SUBDIRS' => 1,
|
||||||
|
'AM_GNU_GETTEXT' => 1,
|
||||||
|
'AC_FUNC_STRCOLL' => 1,
|
||||||
|
'AC_LIBSOURCE' => 1,
|
||||||
|
'AC_C_INLINE' => 1,
|
||||||
|
'AC_FUNC_CHOWN' => 1,
|
||||||
|
'AC_FUNC_GETMNTENT' => 1,
|
||||||
|
'AC_INIT' => 1,
|
||||||
|
'AC_PROG_LEX' => 1,
|
||||||
|
'AH_OUTPUT' => 1,
|
||||||
|
'AC_HEADER_STDC' => 1,
|
||||||
|
'AC_FUNC_GETLOADAVG' => 1,
|
||||||
|
'AC_TYPE_SIZE_T' => 1,
|
||||||
|
'AC_CHECK_FUNCS' => 1,
|
||||||
|
'AC_DECL_SYS_SIGLIST' => 1,
|
||||||
|
'AC_FUNC_MKTIME' => 1,
|
||||||
|
'AC_PROG_MAKE_SET' => 1,
|
||||||
|
'AC_CONFIG_LINKS' => 1,
|
||||||
|
'AC_PROG_CXX' => 1,
|
||||||
|
'AC_CANONICAL_HOST' => 1,
|
||||||
|
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||||
|
'm4_pattern_allow' => 1,
|
||||||
|
'm4_include' => 1,
|
||||||
|
'm4_pattern_forbid' => 1,
|
||||||
|
'AC_PROG_AWK' => 1,
|
||||||
|
'AC_FUNC_VPRINTF' => 1,
|
||||||
|
'AC_CONFIG_HEADERS' => 1,
|
||||||
|
'AC_TYPE_OFF_T' => 1,
|
||||||
|
'AC_PATH_X' => 1,
|
||||||
|
'AC_FUNC_MALLOC' => 1,
|
||||||
|
'AM_MAINTAINER_MODE' => 1,
|
||||||
|
'AC_FUNC_ERROR_AT_LINE' => 1,
|
||||||
|
'AC_FUNC_FSEEKO' => 1,
|
||||||
|
'AC_STRUCT_TM' => 1,
|
||||||
|
'AC_FUNC_MMAP' => 1,
|
||||||
|
'AM_INIT_AUTOMAKE' => 1,
|
||||||
|
'AC_SUBST' => 1,
|
||||||
|
'AC_PROG_LIBTOOL' => 1,
|
||||||
|
'AC_PROG_CC' => 1
|
||||||
|
}
|
||||||
|
], 'Autom4te::Request' )
|
||||||
|
);
|
||||||
|
|
314
libs/xmlrpc-c/autom4te.cache/traces.0
Normal file
314
libs/xmlrpc-c/autom4te.cache/traces.0
Normal file
@ -0,0 +1,314 @@
|
|||||||
|
m4trace:configure.in:3: -1- AC_INIT([include/xmlrpc-c/base.h])
|
||||||
|
m4trace:configure.in:3: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||||
|
m4trace:configure.in:3: -1- m4_pattern_forbid([_AC_])
|
||||||
|
m4trace:configure.in:3: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||||
|
m4trace:configure.in:3: -1- m4_pattern_allow([^AS_FLAGS$])
|
||||||
|
m4trace:configure.in:3: -1- m4_pattern_forbid([^_?m4_])
|
||||||
|
m4trace:configure.in:3: -1- m4_pattern_forbid([^dnl$])
|
||||||
|
m4trace:configure.in:3: -1- m4_pattern_forbid([^_?AS_])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([PATH_SEPARATOR])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([exec_prefix], [NONE])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([prefix], [NONE])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([program_transform_name], [s,x,x,])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([datadir], ['${prefix}/share'])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([includedir], ['${prefix}/include'])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([oldincludedir], ['/usr/include'])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([infodir], ['${prefix}/info'])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([mandir], ['${prefix}/man'])
|
||||||
|
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
|
||||||
|
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
|
||||||
|
#undef PACKAGE_NAME])
|
||||||
|
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
|
||||||
|
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
|
||||||
|
#undef PACKAGE_TARNAME])
|
||||||
|
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
|
||||||
|
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
|
||||||
|
#undef PACKAGE_VERSION])
|
||||||
|
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
|
||||||
|
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
|
||||||
|
#undef PACKAGE_STRING])
|
||||||
|
m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
|
||||||
|
m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
|
||||||
|
#undef PACKAGE_BUGREPORT])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([build_alias])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([host_alias])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([target_alias])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([DEFS])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([ECHO_C])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([ECHO_N])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([ECHO_T])
|
||||||
|
m4trace:configure.in:3: -1- AC_SUBST([LIBS])
|
||||||
|
m4trace:configure.in:4: -1- AC_CONFIG_HEADERS([xmlrpc_amconfig.h])
|
||||||
|
m4trace:configure.in:4: -1- _m4_warn([obsolete], [The macro `AC_OUTPUT_COMMANDS' is obsolete.
|
||||||
|
You should run autoupdate.], [autoconf/status.m4:318: AC_OUTPUT_COMMANDS is expanded from...
|
||||||
|
aclocal.m4:34: AM_CONFIG_HEADER is expanded from...
|
||||||
|
configure.in:4: the top level])
|
||||||
|
m4trace:configure.in:4: -3- _m4_warn([obsolete], [The macro `_AC_OUTPUT_COMMANDS_CNT' is obsolete.
|
||||||
|
You should run autoupdate.], [autoconf/status.m4:321: _AC_OUTPUT_COMMANDS_CNT is expanded from...
|
||||||
|
autoconf/status.m4:318: AC_OUTPUT_COMMANDS is expanded from...
|
||||||
|
aclocal.m4:34: AM_CONFIG_HEADER is expanded from...
|
||||||
|
configure.in:4: the top level])
|
||||||
|
m4trace:configure.in:11: -1- AM_INIT_AUTOMAKE([xmlrpc-c], [1.03.13])
|
||||||
|
m4trace:configure.in:11: -1- AC_PROG_INSTALL
|
||||||
|
m4trace:configure.in:11: -1- AC_SUBST([INSTALL_PROGRAM])
|
||||||
|
m4trace:configure.in:11: -1- AC_SUBST([INSTALL_SCRIPT])
|
||||||
|
m4trace:configure.in:11: -1- AC_SUBST([INSTALL_DATA])
|
||||||
|
m4trace:configure.in:11: -1- AC_SUBST([PACKAGE])
|
||||||
|
m4trace:configure.in:11: -1- AC_SUBST([VERSION])
|
||||||
|
m4trace:configure.in:11: -2- AC_DEFINE_TRACE_LITERAL([PACKAGE])
|
||||||
|
m4trace:configure.in:11: -2- AH_OUTPUT([PACKAGE], [/* Name of package */
|
||||||
|
#undef PACKAGE])
|
||||||
|
m4trace:configure.in:11: -2- AC_DEFINE_TRACE_LITERAL([VERSION])
|
||||||
|
m4trace:configure.in:11: -2- AH_OUTPUT([VERSION], [/* Version number of package */
|
||||||
|
#undef VERSION])
|
||||||
|
m4trace:configure.in:11: -1- AC_SUBST([ACLOCAL])
|
||||||
|
m4trace:configure.in:11: -1- AC_SUBST([AUTOCONF])
|
||||||
|
m4trace:configure.in:11: -1- AC_SUBST([AUTOMAKE])
|
||||||
|
m4trace:configure.in:11: -1- AC_SUBST([AUTOHEADER])
|
||||||
|
m4trace:configure.in:11: -1- AC_SUBST([MAKEINFO])
|
||||||
|
m4trace:configure.in:11: -1- AC_PROG_MAKE_SET
|
||||||
|
m4trace:configure.in:11: -1- AC_SUBST([SET_MAKE])
|
||||||
|
m4trace:configure.in:17: -1- AC_SUBST([VERSION_INFO])
|
||||||
|
m4trace:configure.in:20: -1- AC_CANONICAL_HOST
|
||||||
|
m4trace:configure.in:20: -1- AC_SUBST([build], [$ac_cv_build])
|
||||||
|
m4trace:configure.in:20: -1- AC_SUBST([build_cpu], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
|
||||||
|
m4trace:configure.in:20: -1- AC_SUBST([build_vendor], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
|
||||||
|
m4trace:configure.in:20: -1- AC_SUBST([build_os], [`echo $ac_cv_build | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
|
||||||
|
m4trace:configure.in:20: -1- AC_SUBST([host], [$ac_cv_host])
|
||||||
|
m4trace:configure.in:20: -1- AC_SUBST([host_cpu], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])
|
||||||
|
m4trace:configure.in:20: -1- AC_SUBST([host_vendor], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])
|
||||||
|
m4trace:configure.in:20: -1- AC_SUBST([host_os], [`echo $ac_cv_host | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])
|
||||||
|
m4trace:configure.in:22: -1- AC_SUBST([XMLRPC_HOST_TYPE])
|
||||||
|
m4trace:configure.in:40: -1- AC_SUBST([have_wininet_config])
|
||||||
|
m4trace:configure.in:53: -1- AC_SUBST([MUST_BUILD_WININET_CLIENT])
|
||||||
|
m4trace:configure.in:61: -1- AC_SUBST([have_curl_config])
|
||||||
|
m4trace:configure.in:74: -1- AC_SUBST([MUST_BUILD_CURL_CLIENT])
|
||||||
|
m4trace:configure.in:82: -1- AC_SUBST([have_libwww_config])
|
||||||
|
m4trace:configure.in:95: -1- AC_SUBST([MUST_BUILD_LIBWWW_CLIENT])
|
||||||
|
m4trace:configure.in:106: -1- AC_SUBST([LIBXMLRPC_CLIENT_LA])
|
||||||
|
m4trace:configure.in:108: -1- AC_SUBST([CLIENTTEST])
|
||||||
|
m4trace:configure.in:110: -1- AC_SUBST([XMLRPC_CLIENT_H])
|
||||||
|
m4trace:configure.in:112: -1- AC_SUBST([XMLRPC_TRANSPORT_H])
|
||||||
|
m4trace:configure.in:114: -1- AC_SUBST([SYNCH_CLIENT])
|
||||||
|
m4trace:configure.in:116: -1- AC_SUBST([ASYNCH_CLIENT])
|
||||||
|
m4trace:configure.in:118: -1- AC_SUBST([AUTH_CLIENT])
|
||||||
|
m4trace:configure.in:120: -1- AC_SUBST([QUERY_MEERKAT])
|
||||||
|
m4trace:configure.in:139: -1- AC_SUBST([ENABLE_ABYSS_SERVER])
|
||||||
|
m4trace:configure.in:157: -1- AC_SUBST([ABYSS_SUBDIR])
|
||||||
|
m4trace:configure.in:158: -1- AC_SUBST([LIBXMLRPC_ABYSS_SERVER_LA])
|
||||||
|
m4trace:configure.in:159: -1- AC_SUBST([SERVERTEST])
|
||||||
|
m4trace:configure.in:160: -1- AC_SUBST([VALIDATEE])
|
||||||
|
m4trace:configure.in:161: -1- AC_SUBST([XMLRPC_ABYSS_H])
|
||||||
|
m4trace:configure.in:162: -1- AC_SUBST([SERVER])
|
||||||
|
m4trace:configure.in:171: -1- AC_SUBST([ENABLE_CGI_SERVER])
|
||||||
|
m4trace:configure.in:180: -1- AC_SUBST([ENABLE_CPLUSPLUS])
|
||||||
|
m4trace:configure.in:201: -1- AC_SUBST([LIBXMLRPC_CPP_A])
|
||||||
|
m4trace:configure.in:202: -1- AC_SUBST([CPPTEST])
|
||||||
|
m4trace:configure.in:203: -1- AC_SUBST([XMLRPCCPP_H])
|
||||||
|
m4trace:configure.in:204: -1- AC_SUBST([XML_RPC_API2CPP_SUBDIR])
|
||||||
|
m4trace:configure.in:223: -1- AC_CHECK_FUNCS([wcsncmp])
|
||||||
|
m4trace:configure.in:223: -1- AH_OUTPUT([HAVE_WCSNCMP], [/* Define to 1 if you have the `wcsncmp\' function. */
|
||||||
|
#undef HAVE_WCSNCMP])
|
||||||
|
m4trace:configure.in:223: -1- AC_PROG_CC
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([CC])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([CFLAGS])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([LDFLAGS])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([CPPFLAGS])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([CC])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([ac_ct_CC])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([CC])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([ac_ct_CC])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([CC])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([CC])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([ac_ct_CC])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
|
||||||
|
m4trace:configure.in:223: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
|
||||||
|
m4trace:configure.in:227: -1- AC_CHECK_HEADERS([wchar.h], [], [
|
||||||
|
AC_MSG_ERROR(wchar.h is required to build this library)
|
||||||
|
])
|
||||||
|
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_WCHAR_H], [/* Define to 1 if you have the <wchar.h> header file. */
|
||||||
|
#undef HAVE_WCHAR_H])
|
||||||
|
m4trace:configure.in:227: -1- AC_HEADER_STDC
|
||||||
|
m4trace:configure.in:227: -1- AC_PROG_CPP
|
||||||
|
m4trace:configure.in:227: -1- AC_SUBST([CPP])
|
||||||
|
m4trace:configure.in:227: -1- AC_SUBST([CPPFLAGS])
|
||||||
|
m4trace:configure.in:227: -1- AC_SUBST([CPP])
|
||||||
|
m4trace:configure.in:227: -1- AC_SUBST([EGREP])
|
||||||
|
m4trace:configure.in:227: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||||
|
m4trace:configure.in:227: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS])
|
||||||
|
m4trace:configure.in:227: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
||||||
|
inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
|
||||||
|
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||||
|
#undef HAVE_SYS_TYPES_H])
|
||||||
|
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||||
|
#undef HAVE_SYS_STAT_H])
|
||||||
|
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||||
|
#undef HAVE_STDLIB_H])
|
||||||
|
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||||
|
#undef HAVE_STRING_H])
|
||||||
|
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
|
||||||
|
#undef HAVE_MEMORY_H])
|
||||||
|
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
|
||||||
|
#undef HAVE_STRINGS_H])
|
||||||
|
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
|
#undef HAVE_INTTYPES_H])
|
||||||
|
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
|
#undef HAVE_STDINT_H])
|
||||||
|
m4trace:configure.in:227: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
|
#undef HAVE_UNISTD_H])
|
||||||
|
m4trace:configure.in:233: -1- AC_SUBST([HAVE_UNICODE_WCHAR_DEFINE])
|
||||||
|
m4trace:configure.in:235: -1- AC_SUBST([FEATURE_LIST])
|
||||||
|
m4trace:configure.in:242: -1- AC_PROG_CC
|
||||||
|
m4trace:configure.in:242: -1- AC_SUBST([CC])
|
||||||
|
m4trace:configure.in:242: -1- AC_SUBST([CFLAGS])
|
||||||
|
m4trace:configure.in:242: -1- AC_SUBST([LDFLAGS])
|
||||||
|
m4trace:configure.in:242: -1- AC_SUBST([CPPFLAGS])
|
||||||
|
m4trace:configure.in:242: -1- AC_SUBST([CC])
|
||||||
|
m4trace:configure.in:242: -1- AC_SUBST([ac_ct_CC])
|
||||||
|
m4trace:configure.in:242: -1- AC_SUBST([CC])
|
||||||
|
m4trace:configure.in:242: -1- AC_SUBST([ac_ct_CC])
|
||||||
|
m4trace:configure.in:242: -1- AC_SUBST([CC])
|
||||||
|
m4trace:configure.in:242: -1- AC_SUBST([CC])
|
||||||
|
m4trace:configure.in:242: -1- AC_SUBST([ac_ct_CC])
|
||||||
|
m4trace:configure.in:244: -1- AC_PROG_CXX
|
||||||
|
m4trace:configure.in:244: -1- AC_SUBST([CXX])
|
||||||
|
m4trace:configure.in:244: -1- AC_SUBST([CXXFLAGS])
|
||||||
|
m4trace:configure.in:244: -1- AC_SUBST([LDFLAGS])
|
||||||
|
m4trace:configure.in:244: -1- AC_SUBST([CPPFLAGS])
|
||||||
|
m4trace:configure.in:244: -1- AC_SUBST([CXX])
|
||||||
|
m4trace:configure.in:244: -1- AC_SUBST([ac_ct_CXX])
|
||||||
|
m4trace:configure.in:246: -1- AC_PROG_INSTALL
|
||||||
|
m4trace:configure.in:246: -1- AC_SUBST([INSTALL_PROGRAM])
|
||||||
|
m4trace:configure.in:246: -1- AC_SUBST([INSTALL_SCRIPT])
|
||||||
|
m4trace:configure.in:246: -1- AC_SUBST([INSTALL_DATA])
|
||||||
|
m4trace:configure.in:258: -2- AC_CHECK_LIB([socket], [socket])
|
||||||
|
m4trace:configure.in:258: -2- AH_OUTPUT([HAVE_LIBSOCKET], [/* Define to 1 if you have the `socket\' library (-lsocket). */
|
||||||
|
#undef HAVE_LIBSOCKET])
|
||||||
|
m4trace:configure.in:258: -2- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSOCKET])
|
||||||
|
m4trace:configure.in:269: -1- _m4_warn([obsolete], [The macro `AC_STDC_HEADERS' is obsolete.
|
||||||
|
You should run autoupdate.], [autoconf/oldnames.m4:96: AC_STDC_HEADERS is expanded from...
|
||||||
|
configure.in:269: the top level])
|
||||||
|
m4trace:configure.in:269: -1- AC_HEADER_STDC([])
|
||||||
|
m4trace:configure.in:269: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||||
|
m4trace:configure.in:269: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||||
|
#undef STDC_HEADERS])
|
||||||
|
m4trace:configure.in:273: -1- AC_CHECK_HEADERS([stdarg.h], [], [
|
||||||
|
AC_MSG_ERROR(stdarg.h is required to build this library)
|
||||||
|
])
|
||||||
|
m4trace:configure.in:273: -1- AH_OUTPUT([HAVE_STDARG_H], [/* Define to 1 if you have the <stdarg.h> header file. */
|
||||||
|
#undef HAVE_STDARG_H])
|
||||||
|
m4trace:configure.in:276: -1- AC_CHECK_HEADERS([sys/filio.h sys/ioctl.h])
|
||||||
|
m4trace:configure.in:276: -1- AH_OUTPUT([HAVE_SYS_FILIO_H], [/* Define to 1 if you have the <sys/filio.h> header file. */
|
||||||
|
#undef HAVE_SYS_FILIO_H])
|
||||||
|
m4trace:configure.in:276: -1- AH_OUTPUT([HAVE_SYS_IOCTL_H], [/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||||
|
#undef HAVE_SYS_IOCTL_H])
|
||||||
|
m4trace:configure.in:284: -1- AC_TYPE_SIZE_T
|
||||||
|
m4trace:configure.in:284: -1- AC_DEFINE_TRACE_LITERAL([size_t])
|
||||||
|
m4trace:configure.in:284: -1- AH_OUTPUT([size_t], [/* Define to `unsigned\' if <sys/types.h> does not define. */
|
||||||
|
#undef size_t])
|
||||||
|
m4trace:configure.in:292: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
|
||||||
|
You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
|
||||||
|
configure.in:292: the top level])
|
||||||
|
m4trace:configure.in:299: -1- AC_SUBST([VA_LIST_IS_ARRAY_DEFINE])
|
||||||
|
m4trace:configure.in:305: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
|
||||||
|
You should run autoupdate.], [autoconf/general.m4:2180: AC_TRY_COMPILE is expanded from...
|
||||||
|
configure.in:305: the top level])
|
||||||
|
m4trace:configure.in:312: -1- AC_SUBST([ATTR_UNUSED])
|
||||||
|
m4trace:configure.in:324: -1- AC_CHECK_FUNCS([setgroups])
|
||||||
|
m4trace:configure.in:324: -1- AH_OUTPUT([HAVE_SETGROUPS], [/* Define to 1 if you have the `setgroups\' function. */
|
||||||
|
#undef HAVE_SETGROUPS])
|
||||||
|
m4trace:configure.in:326: -1- AC_CHECK_FUNCS([asprintf])
|
||||||
|
m4trace:configure.in:326: -1- AH_OUTPUT([HAVE_ASPRINTF], [/* Define to 1 if you have the `asprintf\' function. */
|
||||||
|
#undef HAVE_ASPRINTF])
|
||||||
|
m4trace:configure.in:328: -1- AC_CHECK_FUNCS([setenv])
|
||||||
|
m4trace:configure.in:328: -1- AH_OUTPUT([HAVE_SETENV], [/* Define to 1 if you have the `setenv\' function. */
|
||||||
|
#undef HAVE_SETENV])
|
||||||
|
m4trace:configure.in:338: -1- AC_SUBST([DIRECTORY_SEPARATOR])
|
||||||
|
m4trace:configure.in:354: -1- AC_SUBST([ENABLE_ABYSS_THREADS])
|
||||||
|
m4trace:configure.in:360: -1- AC_SUBST([LIBABYSS_LDADD])
|
||||||
|
m4trace:configure.in:372: -1- AC_SUBST([WININET_CONFIG], [$ac_cv_path_WININET_CONFIG])
|
||||||
|
m4trace:configure.in:409: -1- AC_SUBST([WININET_CFLAGS])
|
||||||
|
m4trace:configure.in:414: -1- AC_SUBST([WININET_LDADD])
|
||||||
|
m4trace:configure.in:428: -1- AC_SUBST([WININET_LIBDIR])
|
||||||
|
m4trace:configure.in:430: -1- AC_SUBST([WININET_RPATH])
|
||||||
|
m4trace:configure.in:432: -1- AC_SUBST([WININET_WL_RPATH])
|
||||||
|
m4trace:configure.in:448: -1- AC_SUBST([LIBWWW_CONFIG], [$ac_cv_path_LIBWWW_CONFIG])
|
||||||
|
m4trace:configure.in:485: -1- AC_SUBST([LIBWWW_LDADD])
|
||||||
|
m4trace:configure.in:499: -1- AC_SUBST([LIBWWW_LIBDIR])
|
||||||
|
m4trace:configure.in:507: -1- AC_SUBST([LIBWWW_RPATH])
|
||||||
|
m4trace:configure.in:510: -1- AC_SUBST([LIBWWW_WL_RPATH])
|
||||||
|
m4trace:configure.in:523: -1- AC_SUBST([CURL_CONFIG], [$ac_cv_path_CURL_CONFIG])
|
||||||
|
m4trace:configure.in:541: -1- AC_SUBST([CURL_LDADD])
|
||||||
|
m4trace:configure.in:551: -1- AC_SUBST([CURL_LIBDIR])
|
||||||
|
m4trace:configure.in:553: -1- AC_SUBST([CURL_RPATH])
|
||||||
|
m4trace:configure.in:555: -1- AC_SUBST([CURL_WL_RPATH])
|
||||||
|
m4trace:configure.in:578: -1- AC_SUBST([HAVE_LIBWWW_SSL_DEFINE])
|
||||||
|
m4trace:configure.in:587: -1- AC_SUBST([ENABLE_LIBXML2_BACKEND])
|
||||||
|
m4trace:configure.in:592: -1- AC_SUBST([PKG_CONFIG], [$ac_cv_path_PKG_CONFIG])
|
||||||
|
m4trace:configure.in:599: -1- AC_SUBST([LIBXML2_CFLAGS])
|
||||||
|
m4trace:configure.in:603: -1- AC_SUBST([LIBXML2_LIBS])
|
||||||
|
m4trace:configure.in:610: -1- AC_SUBST([EXTRA_XML_LIBS])
|
||||||
|
m4trace:configure.in:618: -1- AC_SUBST([ENABLE_EFENCE])
|
||||||
|
m4trace:configure.in:624: -1- AC_SUBST([C_COMPILER_GNU])
|
||||||
|
m4trace:configure.in:626: -1- AC_SUBST([CXX_COMPILER_GNU])
|
||||||
|
m4trace:configure.in:630: -1- AC_SUBST([CC_WARN_FLAGS])
|
||||||
|
m4trace:configure.in:632: -1- AC_SUBST([CPP_WARN_FLAGS])
|
||||||
|
m4trace:configure.in:636: -1- AC_SUBST([BUILDDIR])
|
||||||
|
m4trace:configure.in:641: -1- AC_PROG_RANLIB
|
||||||
|
m4trace:configure.in:641: -1- AC_SUBST([RANLIB])
|
||||||
|
m4trace:configure.in:641: -1- AC_SUBST([ac_ct_RANLIB])
|
||||||
|
m4trace:configure.in:641: -1- _m4_warn([obsolete], [The macro `ac_cv_prog_gcc' is obsolete.
|
||||||
|
You should run autoupdate.], [autoconf/c.m4:440: ac_cv_prog_gcc is expanded from...
|
||||||
|
aclocal.m4:419: AC_PROG_LD is expanded from...
|
||||||
|
configure.in:641: AC_PROG_LD is required by...
|
||||||
|
aclocal.m4:242: AC_LIBTOOL_SETUP is expanded from...
|
||||||
|
configure.in:641: AC_LIBTOOL_SETUP is required by...
|
||||||
|
aclocal.m4:158: AC_PROG_LIBTOOL is expanded from...
|
||||||
|
aclocal.m4:535: AM_PROG_LIBTOOL is expanded from...
|
||||||
|
configure.in:641: the top level])
|
||||||
|
m4trace:configure.in:641: -1- AC_PROG_LN_S
|
||||||
|
m4trace:configure.in:641: -1- AC_SUBST([LN_S], [$as_ln_s])
|
||||||
|
m4trace:configure.in:641: -1- _m4_warn([obsolete], [The macro `ac_cv_prog_gcc' is obsolete.
|
||||||
|
You should run autoupdate.], [autoconf/c.m4:440: ac_cv_prog_gcc is expanded from...
|
||||||
|
aclocal.m4:242: AC_LIBTOOL_SETUP is expanded from...
|
||||||
|
configure.in:641: AC_LIBTOOL_SETUP is required by...
|
||||||
|
aclocal.m4:158: AC_PROG_LIBTOOL is expanded from...
|
||||||
|
aclocal.m4:535: AM_PROG_LIBTOOL is expanded from...
|
||||||
|
configure.in:641: the top level])
|
||||||
|
m4trace:configure.in:641: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
|
||||||
|
You should run autoupdate.], [autoconf/general.m4:2223: AC_TRY_LINK is expanded from...
|
||||||
|
autoconf/general.m4:1799: AC_CACHE_VAL is expanded from...
|
||||||
|
autoconf/general.m4:1808: AC_CACHE_CHECK is expanded from...
|
||||||
|
aclocal.m4:242: AC_LIBTOOL_SETUP is expanded from...
|
||||||
|
configure.in:641: AC_LIBTOOL_SETUP is required by...
|
||||||
|
aclocal.m4:158: AC_PROG_LIBTOOL is expanded from...
|
||||||
|
aclocal.m4:535: AM_PROG_LIBTOOL is expanded from...
|
||||||
|
configure.in:641: the top level])
|
||||||
|
m4trace:configure.in:641: -1- AC_SUBST([LIBTOOL])
|
||||||
|
m4trace:configure.in:656: -1- AC_CONFIG_FILES([xmlrpc-c-config \
|
||||||
|
xmlrpc-c-config.test \
|
||||||
|
Makefile.config \
|
||||||
|
xmlrpc_config.h \
|
||||||
|
lib/expat/Makefile \
|
||||||
|
lib/expat/xmlparse/Makefile \
|
||||||
|
lib/expat/xmlwf/Makefile \
|
||||||
|
lib/expat/sample/Makefile \
|
||||||
|
])
|
||||||
|
m4trace:configure.in:656: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
|
||||||
|
You should run autoupdate.], [])
|
||||||
|
m4trace:configure.in:656: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
|
||||||
|
m4trace:configure.in:656: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
|
56
libs/xmlrpc-c/conf/abyss_root/conf/abyss.conf
Normal file
56
libs/xmlrpc-c/conf/abyss_root/conf/abyss.conf
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# ABYSS Web Server configuration file
|
||||||
|
# (C) Moez Mahfoudh - 2000
|
||||||
|
|
||||||
|
# Cases in option names are ignored,
|
||||||
|
# that means that PORT=port=PoRT=..
|
||||||
|
|
||||||
|
# When writing paths, do not worry about / or \ use.
|
||||||
|
# ABYSS will substitute / with \ on Win32 systems.
|
||||||
|
|
||||||
|
# Options which are system specific (such as User) are
|
||||||
|
# ignored on systems which do not handle them.
|
||||||
|
|
||||||
|
# The Port option tells the server on which TCP port to listen.
|
||||||
|
# default is 80
|
||||||
|
Port 8080
|
||||||
|
|
||||||
|
# The name or #number of the user to run the server as if it is
|
||||||
|
# launched as root (UNIX specific)
|
||||||
|
User nobody
|
||||||
|
|
||||||
|
# The Server Root (UNIX systems style)
|
||||||
|
ServerRoot conf/abyss_root
|
||||||
|
|
||||||
|
# The Server Root (Win32 systems style)
|
||||||
|
# ServerRoot G:\XML\xmlrpc-c-0.9.5\conf\abyss_root
|
||||||
|
|
||||||
|
# The Path option specifies the web files path.
|
||||||
|
Path htdocs
|
||||||
|
|
||||||
|
# The Default option contains the name of the files the server should
|
||||||
|
# look for when only a path is given (e.g. http://myserver/info/).
|
||||||
|
Default index.html index.htm INDEX.HTM INDEX.HTML
|
||||||
|
|
||||||
|
# The KeepAlive option is used to set the maximum number of requests
|
||||||
|
# served using the same persistent connection.
|
||||||
|
KeepAlive 10
|
||||||
|
|
||||||
|
# The TimeOut option tells the server how much seconds to wait for
|
||||||
|
# an idle connection before closing it.
|
||||||
|
TimeOut 10
|
||||||
|
|
||||||
|
# The MimeTypes option specifies the location of the file
|
||||||
|
# containing the mapping of MIME types and files extensions
|
||||||
|
MimeTypes conf/mime.types
|
||||||
|
|
||||||
|
# The path of the log file
|
||||||
|
LogFile log/access.log
|
||||||
|
|
||||||
|
# The file where the pid of the server is logged (UNIX specific)
|
||||||
|
PidFile log/abyss.pid
|
||||||
|
|
||||||
|
# If AdvertiseServer if set to no, then no server field would be
|
||||||
|
# appended to the responses. This is the way to make the server
|
||||||
|
# identity unknown to some malicious people which can profit from
|
||||||
|
# well known security holes in the software to crash it.
|
||||||
|
AdvertiseServer yes
|
276
libs/xmlrpc-c/conf/abyss_root/conf/mime.types
Normal file
276
libs/xmlrpc-c/conf/abyss_root/conf/mime.types
Normal file
@ -0,0 +1,276 @@
|
|||||||
|
# This is a comment. I love comments.
|
||||||
|
|
||||||
|
# This file controls what Internet media types are sent to the client for
|
||||||
|
# given file extension(s). Sending the correct media type to the client
|
||||||
|
# is important so they know how to handle the content of the file.
|
||||||
|
# Extra types can either be added here or by using an AddType directive
|
||||||
|
# in your config files. For more information about Internet media types,
|
||||||
|
# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type
|
||||||
|
# registry is at <ftp://ftp.iana.org/in-notes/iana/assignments/media-types/>.
|
||||||
|
|
||||||
|
# MIME type Extension
|
||||||
|
application/EDI-Consent
|
||||||
|
application/EDI-X12
|
||||||
|
application/EDIFACT
|
||||||
|
application/activemessage
|
||||||
|
application/andrew-inset ez
|
||||||
|
application/applefile
|
||||||
|
application/atomicmail
|
||||||
|
application/cals-1840
|
||||||
|
application/commonground
|
||||||
|
application/cybercash
|
||||||
|
application/dca-rft
|
||||||
|
application/dec-dx
|
||||||
|
application/eshop
|
||||||
|
application/hyperstudio
|
||||||
|
application/iges
|
||||||
|
application/mac-binhex40 hqx
|
||||||
|
application/mac-compactpro cpt
|
||||||
|
application/macwriteii
|
||||||
|
application/marc
|
||||||
|
application/mathematica
|
||||||
|
application/msword doc
|
||||||
|
application/news-message-id
|
||||||
|
application/news-transmission
|
||||||
|
application/octet-stream bin dms lha lzh exe class
|
||||||
|
application/oda oda
|
||||||
|
application/pdf pdf
|
||||||
|
application/pgp-encrypted
|
||||||
|
application/pgp-keys
|
||||||
|
application/pgp-signature
|
||||||
|
application/pkcs10
|
||||||
|
application/pkcs7-mime
|
||||||
|
application/pkcs7-signature
|
||||||
|
application/postscript ai eps ps
|
||||||
|
application/prs.alvestrand.titrax-sheet
|
||||||
|
application/prs.cww
|
||||||
|
application/prs.nprend
|
||||||
|
application/remote-printing
|
||||||
|
application/riscos
|
||||||
|
application/rtf rtf
|
||||||
|
application/set-payment
|
||||||
|
application/set-payment-initiation
|
||||||
|
application/set-registration
|
||||||
|
application/set-registration-initiation
|
||||||
|
application/sgml
|
||||||
|
application/sgml-open-catalog
|
||||||
|
application/slate
|
||||||
|
application/smil smi smil
|
||||||
|
application/vemmi
|
||||||
|
application/vnd.3M.Post-it-Notes
|
||||||
|
application/vnd.FloGraphIt
|
||||||
|
application/vnd.acucobol
|
||||||
|
application/vnd.anser-web-certificate-issue-initiation
|
||||||
|
application/vnd.anser-web-funds-transfer-initiation
|
||||||
|
application/vnd.audiograph
|
||||||
|
application/vnd.businessobjects
|
||||||
|
application/vnd.claymore
|
||||||
|
application/vnd.comsocaller
|
||||||
|
application/vnd.dna
|
||||||
|
application/vnd.dxr
|
||||||
|
application/vnd.ecdis-update
|
||||||
|
application/vnd.ecowin.chart
|
||||||
|
application/vnd.ecowin.filerequest
|
||||||
|
application/vnd.ecowin.fileupdate
|
||||||
|
application/vnd.ecowin.series
|
||||||
|
application/vnd.ecowin.seriesrequest
|
||||||
|
application/vnd.ecowin.seriesupdate
|
||||||
|
application/vnd.enliven
|
||||||
|
application/vnd.epson.salt
|
||||||
|
application/vnd.fdf
|
||||||
|
application/vnd.ffsns
|
||||||
|
application/vnd.framemaker
|
||||||
|
application/vnd.fujitsu.oasys
|
||||||
|
application/vnd.fujitsu.oasys2
|
||||||
|
application/vnd.fujitsu.oasys3
|
||||||
|
application/vnd.fujitsu.oasysgp
|
||||||
|
application/vnd.fujitsu.oasysprs
|
||||||
|
application/vnd.fujixerox.docuworks
|
||||||
|
application/vnd.hp-HPGL
|
||||||
|
application/vnd.hp-PCL
|
||||||
|
application/vnd.hp-PCLXL
|
||||||
|
application/vnd.hp-hps
|
||||||
|
application/vnd.ibm.MiniPay
|
||||||
|
application/vnd.ibm.modcap
|
||||||
|
application/vnd.intercon.formnet
|
||||||
|
application/vnd.intertrust.digibox
|
||||||
|
application/vnd.intertrust.nncp
|
||||||
|
application/vnd.is-xpr
|
||||||
|
application/vnd.japannet-directory-service
|
||||||
|
application/vnd.japannet-jpnstore-wakeup
|
||||||
|
application/vnd.japannet-payment-wakeup
|
||||||
|
application/vnd.japannet-registration
|
||||||
|
application/vnd.japannet-registration-wakeup
|
||||||
|
application/vnd.japannet-setstore-wakeup
|
||||||
|
application/vnd.japannet-verification
|
||||||
|
application/vnd.japannet-verification-wakeup
|
||||||
|
application/vnd.koan
|
||||||
|
application/vnd.lotus-1-2-3
|
||||||
|
application/vnd.lotus-approach
|
||||||
|
application/vnd.lotus-freelance
|
||||||
|
application/vnd.lotus-organizer
|
||||||
|
application/vnd.lotus-screencam
|
||||||
|
application/vnd.lotus-wordpro
|
||||||
|
application/vnd.meridian-slingshot
|
||||||
|
application/vnd.mif mif
|
||||||
|
application/vnd.minisoft-hp3000-save
|
||||||
|
application/vnd.mitsubishi.misty-guard.trustweb
|
||||||
|
application/vnd.ms-artgalry
|
||||||
|
application/vnd.ms-asf
|
||||||
|
application/vnd.ms-excel xls
|
||||||
|
application/vnd.ms-powerpoint ppt
|
||||||
|
application/vnd.ms-project
|
||||||
|
application/vnd.ms-tnef
|
||||||
|
application/vnd.ms-works
|
||||||
|
application/vnd.music-niff
|
||||||
|
application/vnd.musician
|
||||||
|
application/vnd.netfpx
|
||||||
|
application/vnd.noblenet-directory
|
||||||
|
application/vnd.noblenet-sealer
|
||||||
|
application/vnd.noblenet-web
|
||||||
|
application/vnd.novadigm.EDM
|
||||||
|
application/vnd.novadigm.EDX
|
||||||
|
application/vnd.novadigm.EXT
|
||||||
|
application/vnd.osa.netdeploy
|
||||||
|
application/vnd.powerbuilder6
|
||||||
|
application/vnd.powerbuilder6-s
|
||||||
|
application/vnd.rapid
|
||||||
|
application/vnd.seemail
|
||||||
|
application/vnd.shana.informed.formtemplate
|
||||||
|
application/vnd.shana.informed.interchange
|
||||||
|
application/vnd.shana.informed.package
|
||||||
|
application/vnd.street-stream
|
||||||
|
application/vnd.svd
|
||||||
|
application/vnd.swiftview-ics
|
||||||
|
application/vnd.truedoc
|
||||||
|
application/vnd.visio
|
||||||
|
application/vnd.webturbo
|
||||||
|
application/vnd.wrq-hp3000-labelled
|
||||||
|
application/vnd.wt.stf
|
||||||
|
application/vnd.xara
|
||||||
|
application/vnd.yellowriver-custom-menu
|
||||||
|
application/wita
|
||||||
|
application/wordperfect5.1
|
||||||
|
application/x-bcpio bcpio
|
||||||
|
application/x-cdlink vcd
|
||||||
|
application/x-chess-pgn pgn
|
||||||
|
application/x-compress
|
||||||
|
application/x-cpio cpio
|
||||||
|
application/x-csh csh
|
||||||
|
application/x-director dcr dir dxr
|
||||||
|
application/x-dvi dvi
|
||||||
|
application/x-futuresplash spl
|
||||||
|
application/x-gtar gtar
|
||||||
|
application/x-gzip
|
||||||
|
application/x-hdf hdf
|
||||||
|
application/x-javascript js
|
||||||
|
application/x-koan skp skd skt skm
|
||||||
|
application/x-latex latex
|
||||||
|
application/x-netcdf nc cdf
|
||||||
|
application/x-sh sh
|
||||||
|
application/x-shar shar
|
||||||
|
application/x-shockwave-flash swf
|
||||||
|
application/x-stuffit sit
|
||||||
|
application/x-sv4cpio sv4cpio
|
||||||
|
application/x-sv4crc sv4crc
|
||||||
|
application/x-tar tar
|
||||||
|
application/x-tcl tcl
|
||||||
|
application/x-tex tex
|
||||||
|
application/x-texinfo texinfo texi
|
||||||
|
application/x-troff t tr roff
|
||||||
|
application/x-troff-man man
|
||||||
|
application/x-troff-me me
|
||||||
|
application/x-troff-ms ms
|
||||||
|
application/x-ustar ustar
|
||||||
|
application/x-wais-source src
|
||||||
|
application/x400-bp
|
||||||
|
application/xml
|
||||||
|
application/zip zip
|
||||||
|
audio/32kadpcm
|
||||||
|
audio/basic au snd
|
||||||
|
audio/midi mid midi kar
|
||||||
|
audio/mpeg mpga mp2 mp3
|
||||||
|
audio/vnd.qcelp
|
||||||
|
audio/x-aiff aif aiff aifc
|
||||||
|
audio/x-pn-realaudio ram rm
|
||||||
|
audio/x-pn-realaudio-plugin rpm
|
||||||
|
audio/x-realaudio ra
|
||||||
|
audio/x-wav wav
|
||||||
|
chemical/x-pdb pdb xyz
|
||||||
|
image/bmp bmp
|
||||||
|
image/cgm
|
||||||
|
image/g3fax
|
||||||
|
image/gif gif
|
||||||
|
image/ief ief
|
||||||
|
image/jpeg jpeg jpg jpe
|
||||||
|
image/naplps
|
||||||
|
image/png png
|
||||||
|
image/prs.btif
|
||||||
|
image/tiff tiff tif
|
||||||
|
image/vnd.dwg
|
||||||
|
image/vnd.dxf
|
||||||
|
image/vnd.fpx
|
||||||
|
image/vnd.net-fpx
|
||||||
|
image/vnd.svf
|
||||||
|
image/vnd.xiff
|
||||||
|
image/x-cmu-raster ras
|
||||||
|
image/x-portable-anymap pnm
|
||||||
|
image/x-portable-bitmap pbm
|
||||||
|
image/x-portable-graymap pgm
|
||||||
|
image/x-portable-pixmap ppm
|
||||||
|
image/x-rgb rgb
|
||||||
|
image/x-xbitmap xbm
|
||||||
|
image/x-xpixmap xpm
|
||||||
|
image/x-xwindowdump xwd
|
||||||
|
message/delivery-status
|
||||||
|
message/disposition-notification
|
||||||
|
message/external-body
|
||||||
|
message/http
|
||||||
|
message/news
|
||||||
|
message/partial
|
||||||
|
message/rfc822
|
||||||
|
model/iges igs iges
|
||||||
|
model/mesh msh mesh silo
|
||||||
|
model/vnd.dwf
|
||||||
|
model/vrml wrl vrml
|
||||||
|
multipart/alternative
|
||||||
|
multipart/appledouble
|
||||||
|
multipart/byteranges
|
||||||
|
multipart/digest
|
||||||
|
multipart/encrypted
|
||||||
|
multipart/form-data
|
||||||
|
multipart/header-set
|
||||||
|
multipart/mixed
|
||||||
|
multipart/parallel
|
||||||
|
multipart/related
|
||||||
|
multipart/report
|
||||||
|
multipart/signed
|
||||||
|
multipart/voice-message
|
||||||
|
text/css css
|
||||||
|
text/directory
|
||||||
|
text/enriched
|
||||||
|
text/html html htm
|
||||||
|
text/plain asc txt
|
||||||
|
text/prs.lines.tag
|
||||||
|
text/rfc822-headers
|
||||||
|
text/richtext rtx
|
||||||
|
text/rtf rtf
|
||||||
|
text/sgml sgml sgm
|
||||||
|
text/tab-separated-values tsv
|
||||||
|
text/uri-list
|
||||||
|
text/vnd.abc
|
||||||
|
text/vnd.flatland.3dml
|
||||||
|
text/vnd.fmi.flexstor
|
||||||
|
text/vnd.in3d.3dml
|
||||||
|
text/vnd.in3d.spot
|
||||||
|
text/vnd.latex-z
|
||||||
|
text/x-setext etx
|
||||||
|
text/xml xml
|
||||||
|
video/mpeg mpeg mpg mpe
|
||||||
|
video/quicktime qt mov
|
||||||
|
video/vnd.motorola.video
|
||||||
|
video/vnd.motorola.videop
|
||||||
|
video/vnd.vivo
|
||||||
|
video/x-msvideo avi
|
||||||
|
video/x-sgi-movie movie
|
||||||
|
x-conference/x-cooltalk ice
|
21
libs/xmlrpc-c/conf/abyss_root/htdocs/index.htm
Normal file
21
libs/xmlrpc-c/conf/abyss_root/htdocs/index.htm
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<HTML>
|
||||||
|
<HEAD>
|
||||||
|
<TITLE>ABYSS is working !!!</TITLE>
|
||||||
|
</HEAD>
|
||||||
|
<BODY bgColor=#80a0f0 text=#000000>
|
||||||
|
<H1 align=center>Congratulations, ABYSS is working !!!</H1>
|
||||||
|
<BR>
|
||||||
|
<P>
|
||||||
|
<B>ABYSS</B> Web Server is working correctly on your system. You should now change this
|
||||||
|
page with yours.
|
||||||
|
<BR>
|
||||||
|
Please include in your web pages (at least the first), the <b><i>'Powered by ABYSS'</i></b>
|
||||||
|
banner to promote the use of <B>ABYSS</B>.
|
||||||
|
</P>
|
||||||
|
<hr>
|
||||||
|
<P>
|
||||||
|
<CENTER><FONT size=-1>
|
||||||
|
Copyright © 2000 <A href="mailto:mmoez@bigfoot.com">Moez Mahfoudh</A>. All rights reserved.
|
||||||
|
</FONT>
|
||||||
|
<BR><BR><A href="http://abyss.linuxave.net/"><IMG border=0 src="pwrabyss.gif"></A></center></P>
|
||||||
|
</BODY></HTML>
|
BIN
libs/xmlrpc-c/conf/abyss_root/htdocs/pwrabyss.gif
Normal file
BIN
libs/xmlrpc-c/conf/abyss_root/htdocs/pwrabyss.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
1459
libs/xmlrpc-c/config.guess
vendored
Executable file
1459
libs/xmlrpc-c/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1549
libs/xmlrpc-c/config.sub
vendored
Executable file
1549
libs/xmlrpc-c/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
8433
libs/xmlrpc-c/configure
vendored
Executable file
8433
libs/xmlrpc-c/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
658
libs/xmlrpc-c/configure.in
Normal file
658
libs/xmlrpc-c/configure.in
Normal file
@ -0,0 +1,658 @@
|
|||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_INIT(include/xmlrpc-c/base.h)
|
||||||
|
AM_CONFIG_HEADER(xmlrpc_amconfig.h)
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Define PACKAGE, VERSION, @PACKAGE@, @VERSION@
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
dnl Increment the package version for each release.
|
||||||
|
AM_INIT_AUTOMAKE(xmlrpc-c, 1.03.13)
|
||||||
|
|
||||||
|
dnl This version number needs to be changed in several *different* tricky
|
||||||
|
dnl ways for each release. Please read the libtool documentation very
|
||||||
|
dnl closely before touching this or making a release!
|
||||||
|
VERSION_INFO="-version-info 7:0:4"
|
||||||
|
AC_SUBST(VERSION_INFO)
|
||||||
|
|
||||||
|
dnl Get our host type.
|
||||||
|
AC_CANONICAL_HOST
|
||||||
|
XMLRPC_HOST_TYPE=$host
|
||||||
|
AC_SUBST(XMLRPC_HOST_TYPE)
|
||||||
|
|
||||||
|
dnl We need this to compensate for an incompatibility between autoconf
|
||||||
|
dnl and our libtool. autoconf generates an invalid ltconfig command
|
||||||
|
dnl otherwise.
|
||||||
|
test -z "$target" && target=NONE
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Decide What To Build
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
FEATURE_LIST=
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(wininet-client,
|
||||||
|
[ --disable-wininet-client Don't build the Wininet client transport], ,
|
||||||
|
enable_wininet_client=maybe)
|
||||||
|
|
||||||
|
if test $enable_wininet_client = maybe; then
|
||||||
|
AC_CHECK_PROG(have_wininet_config, wininet-config, yes, no)
|
||||||
|
if test $have_wininet_config = no; then
|
||||||
|
AC_MSG_NOTICE([You don't appear to have Wininet installed (no working wininet-config in your command search path), so we will not build the Wininet client XML transport])
|
||||||
|
MUST_BUILD_WININET_CLIENT=no
|
||||||
|
else
|
||||||
|
MUST_BUILD_WININET_CLIENT=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
MUST_BUILD_WININET_CLIENT=$enable_wininet_client
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether to build Wininet client XML transport module)
|
||||||
|
AC_MSG_RESULT($MUST_BUILD_WININET_CLIENT)
|
||||||
|
AC_SUBST(MUST_BUILD_WININET_CLIENT)
|
||||||
|
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(curl-client,
|
||||||
|
[ --disable-curl-client Don't build the Curl client transport], ,
|
||||||
|
enable_curl_client=maybe)
|
||||||
|
|
||||||
|
if test $enable_curl_client = maybe; then
|
||||||
|
AC_CHECK_PROG(have_curl_config, curl-config, yes, no)
|
||||||
|
if test $have_curl_config = no; then
|
||||||
|
AC_MSG_NOTICE([You don't appear to have Curl installed (no working curl-config in your command search path), so we will not build the Curl client XML transport])
|
||||||
|
MUST_BUILD_CURL_CLIENT=no
|
||||||
|
else
|
||||||
|
MUST_BUILD_CURL_CLIENT=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
MUST_BUILD_CURL_CLIENT=$enable_curl_client
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether to build Curl client XML transport module)
|
||||||
|
AC_MSG_RESULT($MUST_BUILD_CURL_CLIENT)
|
||||||
|
AC_SUBST(MUST_BUILD_CURL_CLIENT)
|
||||||
|
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(libwww-client,
|
||||||
|
[ --disable-libwww-client Don't build the Libwww client transport], ,
|
||||||
|
enable_libwww_client=maybe)
|
||||||
|
|
||||||
|
if test $enable_libwww_client = maybe; then
|
||||||
|
AC_CHECK_PROG(have_libwww_config, libwww-config, yes, no)
|
||||||
|
if test $have_libwww_config = no; then
|
||||||
|
AC_MSG_NOTICE([You don't appear to have Libwww installed (no working libwww-config in your command search path), so we will not build the Libwww client XML transport])
|
||||||
|
MUST_BUILD_LIBWWW_CLIENT=no
|
||||||
|
else
|
||||||
|
MUST_BUILD_LIBWWW_CLIENT=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
MUST_BUILD_LIBWWW_CLIENT=$enable_libwww_client
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether to build Libwww client XML transport module)
|
||||||
|
AC_MSG_RESULT($MUST_BUILD_LIBWWW_CLIENT)
|
||||||
|
AC_SUBST(MUST_BUILD_LIBWWW_CLIENT)
|
||||||
|
|
||||||
|
|
||||||
|
if test "$MUST_BUILD_WININET_CLIENT $MUST_BUILD_CURL_CLIENT $MUST_BUILD_LIBWWW_CLIENT" = "no no no"; then
|
||||||
|
AC_MSG_NOTICE([We are not building any client XML transport, therefore we will not build the client library at all.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
dnl Set up the appropriate Makefile substitutions.
|
||||||
|
|
||||||
|
LIBXMLRPC_CLIENT_LA=libxmlrpc_client.la
|
||||||
|
AC_SUBST(LIBXMLRPC_CLIENT_LA)
|
||||||
|
CLIENTTEST=clienttest
|
||||||
|
AC_SUBST(CLIENTTEST)
|
||||||
|
XMLRPC_CLIENT_H=xmlrpc_client.h
|
||||||
|
AC_SUBST(XMLRPC_CLIENT_H)
|
||||||
|
XMLRPC_TRANSPORT_H=xmlrpc_transport.h
|
||||||
|
AC_SUBST(XMLRPC_TRANSPORT_H)
|
||||||
|
SYNCH_CLIENT=synch_client
|
||||||
|
AC_SUBST(SYNCH_CLIENT)
|
||||||
|
ASYNCH_CLIENT=asynch_client
|
||||||
|
AC_SUBST(ASYNCH_CLIENT)
|
||||||
|
AUTH_CLIENT=auth_client
|
||||||
|
AC_SUBST(AUTH_CLIENT)
|
||||||
|
QUERY_MEERKAT=query-meerkat
|
||||||
|
AC_SUBST(QUERY_MEERKAT)
|
||||||
|
|
||||||
|
if test $MUST_BUILD_WININET_CLIENT = yes; then
|
||||||
|
FEATURE_LIST="wininet-client $FEATURE_LIST"
|
||||||
|
fi
|
||||||
|
if test $MUST_BUILD_CURL_CLIENT = yes; then
|
||||||
|
FEATURE_LIST="curl-client $FEATURE_LIST"
|
||||||
|
fi
|
||||||
|
if test $MUST_BUILD_LIBWWW_CLIENT = yes; then
|
||||||
|
FEATURE_LIST="libwww-client $FEATURE_LIST"
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Check to see if we should build our Abyss server module.
|
||||||
|
AC_MSG_CHECKING(whether to build Abyss server module)
|
||||||
|
AC_ARG_ENABLE(abyss-server,
|
||||||
|
[ --disable-abyss-server Don't build the Abyss server module], ,
|
||||||
|
enable_abyss_server=yes)
|
||||||
|
AC_MSG_RESULT($enable_abyss_server)
|
||||||
|
ENABLE_ABYSS_SERVER=$enable_abyss_server
|
||||||
|
AC_SUBST(ENABLE_ABYSS_SERVER)
|
||||||
|
|
||||||
|
dnl Set up the appropriate Makefile substitutions.
|
||||||
|
ABYSS_SUBDIR=
|
||||||
|
LIBXMLRPC_ABYSS_SERVER_LA=
|
||||||
|
SERVERTEST=
|
||||||
|
VALIDATEE=
|
||||||
|
XMLRPC_ABYSS_H=
|
||||||
|
SERVER=
|
||||||
|
if test x"$enable_abyss_server" != xno; then
|
||||||
|
FEATURE_LIST="abyss-server $FEATURE_LIST"
|
||||||
|
ABYSS_SUBDIR=abyss
|
||||||
|
LIBXMLRPC_ABYSS_SERVER_LA=libxmlrpc_abyss_server.la
|
||||||
|
SERVERTEST=servertest
|
||||||
|
VALIDATEE=validatee
|
||||||
|
XMLRPC_ABYSS_H=xmlrpc_abyss.h
|
||||||
|
SERVER=server
|
||||||
|
fi
|
||||||
|
AC_SUBST(ABYSS_SUBDIR)
|
||||||
|
AC_SUBST(LIBXMLRPC_ABYSS_SERVER_LA)
|
||||||
|
AC_SUBST(SERVERTEST)
|
||||||
|
AC_SUBST(VALIDATEE)
|
||||||
|
AC_SUBST(XMLRPC_ABYSS_H)
|
||||||
|
AC_SUBST(SERVER)
|
||||||
|
|
||||||
|
dnl Check to see if we should build our CGI server module.
|
||||||
|
AC_MSG_CHECKING(whether to build CGI server module)
|
||||||
|
AC_ARG_ENABLE(cgi-server,
|
||||||
|
[ --disable-cgi-server Don't build the CGI server module], ,
|
||||||
|
enable_cgi_server=yes)
|
||||||
|
AC_MSG_RESULT($enable_cgi_server)
|
||||||
|
ENABLE_CGI_SERVER=$enable_cgi_server
|
||||||
|
AC_SUBST(ENABLE_CGI_SERVER)
|
||||||
|
|
||||||
|
dnl Check to see if we should build our C++ stuff.
|
||||||
|
AC_MSG_CHECKING(whether to build C++ wrappers and tools)
|
||||||
|
AC_ARG_ENABLE(cplusplus,
|
||||||
|
[ --disable-cplusplus Don't build the C++ wrapper classes or tools], ,
|
||||||
|
enable_cplusplus=yes)
|
||||||
|
AC_MSG_RESULT($enable_cplusplus)
|
||||||
|
ENABLE_CPLUSPLUS=$enable_cplusplus
|
||||||
|
AC_SUBST(ENABLE_CPLUSPLUS)
|
||||||
|
|
||||||
|
dnl Set up the appropriate Makefile substitutions.
|
||||||
|
LIBXMLRPC_CPP_A=
|
||||||
|
CPPTEST=
|
||||||
|
XMLRPCCPP_H=
|
||||||
|
XML_RPC_API2CPP_SUBDIR=
|
||||||
|
MEERKAT_APP_LIST=
|
||||||
|
INTEROP_CLIENT_SUBDIR=
|
||||||
|
if test x"$enable_cplusplus" != xno; then
|
||||||
|
FEATURE_LIST="c++ $FEATURE_LIST"
|
||||||
|
LIBXMLRPC_CPP_A=libxmlrpc_cpp.a
|
||||||
|
CPPTEST=cpptest
|
||||||
|
XMLRPCCPP_H=XmlRpcCpp.h
|
||||||
|
|
||||||
|
if test $MUST_BUILD_LIBWWW_CLIENT = yes; then
|
||||||
|
XML_RPC_API2CPP_SUBDIR=xml-rpc-api2cpp
|
||||||
|
elif test $MUST_BUILD_CURL_CLIENT = yes; then
|
||||||
|
XML_RPC_API2CPP_SUBDIR=xml-rpc-api2cpp
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST(LIBXMLRPC_CPP_A)
|
||||||
|
AC_SUBST(CPPTEST)
|
||||||
|
AC_SUBST(XMLRPCCPP_H)
|
||||||
|
AC_SUBST(XML_RPC_API2CPP_SUBDIR)
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Decide what to do about Unicode.
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
dnl Check to see if we should build our Unicode stuff.
|
||||||
|
AC_MSG_CHECKING(whether to build Unicode support)
|
||||||
|
AC_ARG_ENABLE(unicode,
|
||||||
|
[ --disable-unicode Don't build Unicode and wchar_t capability], ,
|
||||||
|
enable_unicode=yes)
|
||||||
|
AC_MSG_RESULT($enable_unicode)
|
||||||
|
|
||||||
|
dnl Do all the work...
|
||||||
|
if test x"$enable_unicode" != xno; then
|
||||||
|
FEATURE_LIST="unicode $FEATURE_LIST"
|
||||||
|
HAVE_UNICODE_WCHAR_DEFINE=1
|
||||||
|
|
||||||
|
dnl Unicode function needed by test suites.
|
||||||
|
AC_CHECK_FUNCS(wcsncmp)
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS(wchar.h, , [
|
||||||
|
AC_MSG_ERROR(wchar.h is required to build this library)
|
||||||
|
])
|
||||||
|
|
||||||
|
else
|
||||||
|
HAVE_UNICODE_WCHAR_DEFINE=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(HAVE_UNICODE_WCHAR_DEFINE)
|
||||||
|
|
||||||
|
AC_SUBST(FEATURE_LIST)
|
||||||
|
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Checks for programs.
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
AC_PROG_CC
|
||||||
|
if test x"$enable_cplusplus" != xno; then
|
||||||
|
AC_PROG_CXX
|
||||||
|
fi
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Checks for libraries.
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
# Code by albert chin <china@thewrittenword.com> to check for various
|
||||||
|
# oddball networking libraries. Solaris and some other operating systems
|
||||||
|
# hide their networking code in various places. (Yes, this links too many
|
||||||
|
# of our libraries against -lsocket, but a finer-grained mechanism would
|
||||||
|
# require too much testing.)
|
||||||
|
AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket))
|
||||||
|
|
||||||
|
# For some reason, we don't seem to need this on Solaris. If you do
|
||||||
|
# need it, go ahead and try it.
|
||||||
|
# AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent))
|
||||||
|
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Checks for header files.
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
AC_STDC_HEADERS
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS(stdarg.h, , [
|
||||||
|
AC_MSG_ERROR(stdarg.h is required to build this library)
|
||||||
|
])
|
||||||
|
|
||||||
|
# I/O headers, needed by Abyss on Solaris.
|
||||||
|
AC_CHECK_HEADERS(sys/filio.h sys/ioctl.h)
|
||||||
|
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
dnl AC_C_BIGENDIAN
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
|
||||||
|
dnl This check is borrowed from Python 1.5.2.
|
||||||
|
va_list_is_array=no
|
||||||
|
AC_MSG_CHECKING(whether va_list is an array)
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <stdarg.h>
|
||||||
|
], [va_list list1, list2; list1 = list2;], ,
|
||||||
|
va_list_is_array=yes)
|
||||||
|
AC_MSG_RESULT($va_list_is_array)
|
||||||
|
if test x"$va_list_is_array" = xyes; then
|
||||||
|
VA_LIST_IS_ARRAY_DEFINE=1
|
||||||
|
else
|
||||||
|
VA_LIST_IS_ARRAY_DEFINE=0
|
||||||
|
fi
|
||||||
|
AC_SUBST(VA_LIST_IS_ARRAY_DEFINE)
|
||||||
|
|
||||||
|
dnl See if the compiler supports __attribute__ gracefully.
|
||||||
|
AC_MSG_CHECKING(whether compiler supports __attribute__)
|
||||||
|
AC_TRY_COMPILE(, [int x __attribute__((__unused__));],
|
||||||
|
compiler_supports_attribute=yes,
|
||||||
|
compiler_supports_attribute=no)
|
||||||
|
AC_MSG_RESULT($compiler_supports_attribute)
|
||||||
|
if test x"$compiler_supports_attribute" = xyes; then
|
||||||
|
ATTR_UNUSED="__attribute__((__unused__))"
|
||||||
|
else
|
||||||
|
ATTR_UNUSED=
|
||||||
|
fi
|
||||||
|
AC_SUBST(ATTR_UNUSED)
|
||||||
|
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Checks for library functions.
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
AC_CHECK_FUNC(vsnprintf, , [
|
||||||
|
AC_MSG_ERROR(your C library does not provide vsnprintf)
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl CygWin looks like Unix, but doesn't provide setgroups.
|
||||||
|
AC_CHECK_FUNCS(setgroups)
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS(asprintf)
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS(setenv)
|
||||||
|
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Checks for operating system features.
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
dnl Non-Unix systems will need to set up their platform configuration file
|
||||||
|
dnl by hand.
|
||||||
|
DIRECTORY_SEPARATOR="/"
|
||||||
|
AC_SUBST(DIRECTORY_SEPARATOR)
|
||||||
|
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl ABYSS Configuration
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Abyss doesn't pay any attention to xmlrpc_config.h, so we need to
|
||||||
|
dnl pass it some flags on the command-line.
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether to use Abyss pthread function)
|
||||||
|
AC_ARG_ENABLE(abyss-threads,
|
||||||
|
[ --disable-abyss-threads Use fork in Abyss instead of pthreads], ,
|
||||||
|
enable_abyss_threads=yes)
|
||||||
|
AC_MSG_RESULT($enable_abyss_threads)
|
||||||
|
|
||||||
|
ENABLE_ABYSS_THREADS=$enable_abyss_threads
|
||||||
|
AC_SUBST(ENABLE_ABYSS_THREADS)
|
||||||
|
|
||||||
|
if test x"$enable_abyss_threads" != xno; then
|
||||||
|
CFLAGS="$CFLAGS -D_THREAD"
|
||||||
|
LIBABYSS_LDADD="-lpthread"
|
||||||
|
fi
|
||||||
|
AC_SUBST(LIBABYSS_LDADD)
|
||||||
|
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Finding wininet stubs
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl If you implement the parts of wininet.h the wininet_transport uses,
|
||||||
|
dnl you will need to configure this way..
|
||||||
|
|
||||||
|
if test $MUST_BUILD_WININET_CLIENT = yes; then
|
||||||
|
|
||||||
|
dnl You can control which of these gets chosen by fooling around with PATH.
|
||||||
|
AC_PATH_PROGS(WININET_CONFIG, wininet-xmlrpc-config wininet-config, no)
|
||||||
|
if test "x$WININET_CONFIG" = "xno"; then
|
||||||
|
AC_MSG_ERROR(wininet lib not found; see './configure --help')
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Get our wininet version.
|
||||||
|
dnl Adapted from a macro which called gtk-config.
|
||||||
|
AC_MSG_CHECKING(for wininet version >= 1.0.0)
|
||||||
|
W3VER=`$WININET_CONFIG --version`
|
||||||
|
WININET_MAJOR=\
|
||||||
|
`echo $W3VER|sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||||
|
WININET_MINOR=\
|
||||||
|
`echo $W3VER|sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||||
|
WININET_MICRO=\
|
||||||
|
`echo $W3VER|sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||||
|
AC_MSG_RESULT($WININET_MAJOR.$WININET_MINOR.$WININET_MICRO)
|
||||||
|
|
||||||
|
dnl Check to make sure our version is OK.
|
||||||
|
WININET_VERSION_OK=yes
|
||||||
|
if test $WININET_MAJOR -lt 1; then
|
||||||
|
WININET_VERSION_OK=no
|
||||||
|
else
|
||||||
|
if test $WININET_MAJOR -eq 1 -a $WININET_MINOR -lt 0; then
|
||||||
|
WININET_VERSION_OK=no
|
||||||
|
else
|
||||||
|
if test $WININET_MAJOR -eq 1 -a $WININET_MINOR -eq 0 \
|
||||||
|
-a $WININET_MICRO -lt 0; then
|
||||||
|
WININET_VERSION_OK=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$WININET_VERSION_OK" = "xno"; then
|
||||||
|
AC_MSG_ERROR(wininet version >= 1.0.0 required)
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Get the necessary CFLAGS, and merge them into our master list.
|
||||||
|
WININET_CFLAGS="`$WININET_CONFIG --cflags`"
|
||||||
|
AC_SUBST(WININET_CFLAGS)
|
||||||
|
CFLAGS="$CFLAGS $WININET_CFLAGS"
|
||||||
|
|
||||||
|
dnl Get the huge list of libraries we need to link against.
|
||||||
|
WININET_LDADD="`$WININET_CONFIG --libs`"
|
||||||
|
AC_SUBST(WININET_LDADD)
|
||||||
|
|
||||||
|
dnl Oh, such massive brain damage! Because there may be another copy
|
||||||
|
dnl of libwww in the default dynamic loader search path, we need to
|
||||||
|
dnl adjust the search patch manually. Just gag me with a backquote, OK?
|
||||||
|
AC_MSG_CHECKING(for wininet library directory)
|
||||||
|
if $WININET_CONFIG --rpath-dir > /dev/null 2>&1; then
|
||||||
|
dnl Yay! We're using our smart version of wininet.
|
||||||
|
WININET_LIBDIR="`$WININET_CONFIG --rpath-dir`"
|
||||||
|
else
|
||||||
|
dnl Yawn. We're using the regular boring version.
|
||||||
|
WININET_LIBDIR="`$WININET_CONFIG --prefix`/lib"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($WININET_LIBDIR)
|
||||||
|
AC_SUBST(WININET_LIBDIR)
|
||||||
|
WININET_RPATH="-rpath $WININET_LIBDIR"
|
||||||
|
AC_SUBST(WININET_RPATH)
|
||||||
|
WININET_WL_RPATH="-Wl,--rpath -Wl,$WININET_LIBDIR"
|
||||||
|
AC_SUBST(WININET_WL_RPATH)
|
||||||
|
|
||||||
|
fi # MUST_BUILD_WININET_CLIENT
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Finding w3c-libwww
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Once upon a time, we used a patched copy of libwww that needed to
|
||||||
|
dnl co-exist with the system copy of libwww. We have some vestigal support
|
||||||
|
dnl for keeping track of libwww's rpath, although this is no longer really
|
||||||
|
dnl necessary.
|
||||||
|
|
||||||
|
if test $MUST_BUILD_LIBWWW_CLIENT = yes; then
|
||||||
|
|
||||||
|
dnl First of all, locate the semi-broken libwww config program.
|
||||||
|
dnl You can control which of these gets chosen by fooling around with PATH.
|
||||||
|
AC_PATH_PROGS(LIBWWW_CONFIG, libwww-xmlrpc-config libwww-config, no)
|
||||||
|
if test "x$LIBWWW_CONFIG" = "xno"; then
|
||||||
|
AC_MSG_ERROR(w3c-libwww not found; see './configure --help')
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Get our libwww version.
|
||||||
|
dnl Adapted from a macro which called gtk-config.
|
||||||
|
AC_MSG_CHECKING(for w3c-libwww version >= 5.2.8)
|
||||||
|
W3VER=`$LIBWWW_CONFIG --version`
|
||||||
|
LIBWWW_MAJOR=\
|
||||||
|
`echo $W3VER|sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||||
|
LIBWWW_MINOR=\
|
||||||
|
`echo $W3VER|sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||||
|
LIBWWW_MICRO=\
|
||||||
|
`echo $W3VER|sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||||
|
AC_MSG_RESULT($LIBWWW_MAJOR.$LIBWWW_MINOR.$LIBWWW_MICRO)
|
||||||
|
|
||||||
|
dnl Check to make sure our version is OK.
|
||||||
|
LIBWWW_VERSION_OK=yes
|
||||||
|
if test $LIBWWW_MAJOR -lt 5; then
|
||||||
|
LIBWWW_VERSION_OK=no
|
||||||
|
else
|
||||||
|
if test $LIBWWW_MAJOR -eq 5 -a $LIBWWW_MINOR -lt 2; then
|
||||||
|
LIBWWW_VERSION_OK=no
|
||||||
|
else
|
||||||
|
if test $LIBWWW_MAJOR -eq 5 -a $LIBWWW_MINOR -eq 2 \
|
||||||
|
-a $LIBWWW_MICRO -lt 8; then
|
||||||
|
LIBWWW_VERSION_OK=no
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "x$LIBWWW_VERSION_OK" = "xno"; then
|
||||||
|
AC_MSG_ERROR(w3c-libwww version >= 5.2.8 required)
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Get the huge list of libraries we need to link against.
|
||||||
|
LIBWWW_LDADD="`$LIBWWW_CONFIG --libs`"
|
||||||
|
AC_SUBST(LIBWWW_LDADD)
|
||||||
|
|
||||||
|
dnl Oh, such massive brain damage! Because there may be another copy
|
||||||
|
dnl of libwww in the default dynamic loader search path, we need to
|
||||||
|
dnl adjust the search patch manually. Just gag me with a backquote, OK?
|
||||||
|
AC_MSG_CHECKING(for libwww library directory)
|
||||||
|
if $LIBWWW_CONFIG --rpath-dir > /dev/null 2>&1; then
|
||||||
|
dnl Yay! We're using our smart version of libwww.
|
||||||
|
LIBWWW_LIBDIR="`$LIBWWW_CONFIG --rpath-dir`"
|
||||||
|
else
|
||||||
|
dnl Yawn. We're using the regular boring version.
|
||||||
|
LIBWWW_LIBDIR="`$LIBWWW_CONFIG --prefix`/lib"
|
||||||
|
fi
|
||||||
|
AC_MSG_RESULT($LIBWWW_LIBDIR)
|
||||||
|
AC_SUBST(LIBWWW_LIBDIR)
|
||||||
|
|
||||||
|
# Some ancient rpath stuff, now disabled. I turned this off because it
|
||||||
|
# breaks Debian (and Mandrake?) policy, and we don't use it anymore.
|
||||||
|
# If you have multiple copies of w3c-libwww lying around, you can turn
|
||||||
|
# it back on.
|
||||||
|
#LIBWWW_RPATH="-rpath $LIBWWW_LIBDIR"
|
||||||
|
LIBWWW_RPATH=""
|
||||||
|
AC_SUBST(LIBWWW_RPATH)
|
||||||
|
#LIBWWW_WL_RPATH="-Wl,--rpath -Wl,$LIBWWW_LIBDIR"
|
||||||
|
LIBWWW_WL_RPATH=""
|
||||||
|
AC_SUBST(LIBWWW_WL_RPATH)
|
||||||
|
|
||||||
|
fi # MUST_BUILD_LIBWWW_CLIENT
|
||||||
|
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Finding cURL
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
if test $MUST_BUILD_CURL_CLIENT = yes; then
|
||||||
|
|
||||||
|
dnl First of all, locate the curl config program.
|
||||||
|
dnl You can control which of these gets chosen by fooling around with PATH.
|
||||||
|
AC_PATH_PROGS(CURL_CONFIG, curl-xmlrpc-config curl-config, no)
|
||||||
|
if test "x$CURL_CONFIG" = "xno"; then
|
||||||
|
AC_MSG_ERROR(cURL not found; see './configure --help')
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl There used to be code here to check the Curl version and make sure
|
||||||
|
dnl it is at least 7.8. But there were bugs both in the code and in
|
||||||
|
dnl curl (curl-config --vernum, at least in older versios of Curl,
|
||||||
|
dnl omits the leading zero). So it didn't work. Plus, checking version
|
||||||
|
dnl numbers isn't a good idea. Better to check for feature presence.
|
||||||
|
dnl So we don't do any check now. If we find out there's a problem with
|
||||||
|
dnl older Curls, we will revisit that.
|
||||||
|
|
||||||
|
dnl Get the huge list of libraries we need to link against.
|
||||||
|
dnl MRB-20010516-For some reason, curl-config
|
||||||
|
dnl does not list itself '-lcurl'. 2004.12.12. It seems to do so
|
||||||
|
dnl now.
|
||||||
|
CURL_LDADD=`$CURL_CONFIG --libs`
|
||||||
|
AC_SUBST(CURL_LDADD)
|
||||||
|
|
||||||
|
dnl Oh, such massive brain damage! Because there may be another copy
|
||||||
|
dnl of curl in the default dynamic loader search path, we need to
|
||||||
|
dnl adjust the search patch manually. Just gag me with a backquote, OK?
|
||||||
|
AC_MSG_CHECKING(for curl library directory)
|
||||||
|
dnl Yawn. We're using the regular boring version.
|
||||||
|
CURL_LIBDIR="`$CURL_CONFIG --prefix`/lib"
|
||||||
|
|
||||||
|
AC_MSG_RESULT($CURL_LIBDIR)
|
||||||
|
AC_SUBST(CURL_LIBDIR)
|
||||||
|
CURL_RPATH="-rpath $CURL_LIBDIR"
|
||||||
|
AC_SUBST(CURL_RPATH)
|
||||||
|
CURL_WL_RPATH="-Wl,--rpath -Wl,$CURL_LIBDIR"
|
||||||
|
AC_SUBST(CURL_WL_RPATH)
|
||||||
|
|
||||||
|
fi # MUST_BUILD_CURL_CLIENT
|
||||||
|
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Checks for build options.
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
AC_ARG_WITH(libwww-ssl,
|
||||||
|
[ --with-libwww-ssl Include libwww SSL capability.]
|
||||||
|
)
|
||||||
|
|
||||||
|
if test x"$enable_libwww_client" != xno; then
|
||||||
|
AC_MSG_CHECKING(whether to use SSL with libwww)
|
||||||
|
if test x"$with_libwww_ssl" = xyes; then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
HAVE_LIBWWW_SSL_DEFINE=1
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
HAVE_LIBWWW_SSL_DEFINE=0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
AC_SUBST(HAVE_LIBWWW_SSL_DEFINE)
|
||||||
|
|
||||||
|
dnl Check to see if we should build the libxml2 backend.
|
||||||
|
AC_ARG_ENABLE(libxml2-backend,
|
||||||
|
[ --enable-libxml2-backend Use libxml2 instead of built-in expat], ,
|
||||||
|
enable_libxml2_backend=no)
|
||||||
|
AC_MSG_CHECKING(whether to build the libxml2 backend)
|
||||||
|
AC_MSG_RESULT($enable_libxml2_backend)
|
||||||
|
ENABLE_LIBXML2_BACKEND=$enable_libxml2_backend
|
||||||
|
AC_SUBST(ENABLE_LIBXML2_BACKEND)
|
||||||
|
|
||||||
|
dnl If we're using the libxml2 backend, look for pkg-config
|
||||||
|
if test x"$enable_libxml2_backend" != xno; then
|
||||||
|
AC_MSG_CHECKING(for pkg-config)
|
||||||
|
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||||
|
if test x$PKG_CONFIG = xno; then
|
||||||
|
AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Set up the appropriate Makefile substitutions
|
||||||
|
LIBXML2_CFLAGS=`pkg-config --cflags libxml-2.0`
|
||||||
|
AC_SUBST(LIBXML2_CFLAGS)
|
||||||
|
CFLAGS="$CFLAGS $LIBXML2_CFLAGS"
|
||||||
|
|
||||||
|
LIBXML2_LIBS=`pkg-config --libs libxml-2.0`
|
||||||
|
AC_SUBST(LIBXML2_LIBS)
|
||||||
|
|
||||||
|
EXTRA_XML_LIBS="$LIBXML2_LIBS"
|
||||||
|
else
|
||||||
|
EXTRA_XML_LIBS="-lxmlrpc_xmlparse -lxmlrpc_xmltok"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(EXTRA_XML_LIBS)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(whether to test with Electric Fence)
|
||||||
|
AC_ARG_ENABLE(efence,
|
||||||
|
[ --enable-efence Enable malloc/free debugging with Bruce Perens\'
|
||||||
|
Electric Fence library (test suites only).])
|
||||||
|
AC_MSG_RESULT($enable_efence)
|
||||||
|
ENABLE_EFENCE=$enable_efence
|
||||||
|
AC_SUBST(ENABLE_EFENCE)
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Compiler information
|
||||||
|
dnl =======================================================================
|
||||||
|
C_COMPILER_GNU=$ac_cv_c_compiler_gnu
|
||||||
|
AC_SUBST(C_COMPILER_GNU)
|
||||||
|
CXX_COMPILER_GNU=$ac_cv_cxx_compiler_gnu
|
||||||
|
AC_SUBST(CXX_COMPILER_GNU)
|
||||||
|
|
||||||
|
dnl obsolete variables, need to be removed from Makefile.in:
|
||||||
|
CC_WARN_FLAGS=
|
||||||
|
AC_SUBST(CC_WARN_FLAGS)
|
||||||
|
CPP_WARN_FLAGS=
|
||||||
|
AC_SUBST(CPP_WARN_FLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
BUILDDIR=`pwd`
|
||||||
|
AC_SUBST(BUILDDIR)
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Libtool
|
||||||
|
dnl =======================================================================
|
||||||
|
AM_PROG_LIBTOOL
|
||||||
|
|
||||||
|
|
||||||
|
dnl =======================================================================
|
||||||
|
dnl Output our results.
|
||||||
|
dnl =======================================================================
|
||||||
|
|
||||||
|
AC_OUTPUT(xmlrpc-c-config \
|
||||||
|
xmlrpc-c-config.test \
|
||||||
|
Makefile.config \
|
||||||
|
xmlrpc_config.h \
|
||||||
|
lib/expat/Makefile \
|
||||||
|
lib/expat/xmlparse/Makefile \
|
||||||
|
lib/expat/xmlwf/Makefile \
|
||||||
|
lib/expat/sample/Makefile \
|
||||||
|
)
|
||||||
|
chmod +x xmlrpc-c-config
|
||||||
|
chmod +x xmlrpc-c-config.test
|
7
libs/xmlrpc-c/debian/README.Debian
Normal file
7
libs/xmlrpc-c/debian/README.Debian
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
xmlrpc-c for Debian
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
This is my first attempt at porting my RPM packages to Debian. User
|
||||||
|
beware!
|
||||||
|
|
||||||
|
-- Eric Kidd <eric.kidd@pobox.com>, Tue, 26 Jun 2001 12:39:39 -0400
|
22
libs/xmlrpc-c/debian/changelog
Normal file
22
libs/xmlrpc-c/debian/changelog
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
xmlrpc-c (0.9.10-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Updated from new upstream release.
|
||||||
|
|
||||||
|
-- Eric Kidd <eric.kidd@pobox.com> Sun, 1 Jul 2001 10:45:51 -0400
|
||||||
|
|
||||||
|
xmlrpc-c (0.9.9-2) unstable; urgency=low
|
||||||
|
|
||||||
|
* Added man pages.
|
||||||
|
* Improved depends for xmlrpc-c-dev.
|
||||||
|
|
||||||
|
-- Eric Kidd <eric.kidd@pobox.com> Wed, 27 Jun 2001 12:25:52 -0400
|
||||||
|
|
||||||
|
xmlrpc-c (0.9.9-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Initial Release.
|
||||||
|
|
||||||
|
-- Eric Kidd <eric.kidd@pobox.com> Tue, 26 Jun 2001 12:39:39 -0400
|
||||||
|
|
||||||
|
Local variables:
|
||||||
|
mode: debian-changelog
|
||||||
|
End:
|
30
libs/xmlrpc-c/debian/control
Normal file
30
libs/xmlrpc-c/debian/control
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
Source: xmlrpc-c
|
||||||
|
Section: devel
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Eric Kidd <eric.kidd@pobox.com>
|
||||||
|
Build-Depends: debhelper (>> 3.0.0), libwww0 (>= 5.3.2), libwww-dev (>= 5.3.2)
|
||||||
|
Standards-Version: 3.5.2
|
||||||
|
|
||||||
|
Package: xmlrpc-c0
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${shlibs:Depends}
|
||||||
|
Description: A library implementing XML-based remote procedure calls
|
||||||
|
XML-RPC is a lightweight RPC protocol based on XML and HTTP. This package
|
||||||
|
is used by XML-RPC clients and servers written in C and C++.
|
||||||
|
|
||||||
|
Package: xmlrpc-c-dev
|
||||||
|
Architecture: any
|
||||||
|
Depends: xmlrpc-c0 (= ${Source-Version}), libc6-dev, libstdc++-dev, libfrontier-rpc-perl
|
||||||
|
Description: Libraries and header files for developing XML-RPC applications
|
||||||
|
Static libraries and header files for writing XML-RPC applications in C and
|
||||||
|
C++.
|
||||||
|
|
||||||
|
Package: xmlrpc-c-apps
|
||||||
|
Architecture: any
|
||||||
|
Depends: xmlrpc-c0 (= ${Source-Version}), ${shlibs:Depends}
|
||||||
|
Description: Sample XML-RPC applications
|
||||||
|
Some handy XML-RPC demo applications based on the Meerkat Open Wire Service
|
||||||
|
(found at http://www.oreillynet.com/meerkat/). You can use 'query-meerkat' to
|
||||||
|
perform a regex search on recent news items, or 'meerkat-app-list' to get
|
||||||
|
a list of recent Linux software releases.
|
||||||
|
|
128
libs/xmlrpc-c/debian/copyright
Normal file
128
libs/xmlrpc-c/debian/copyright
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
This software package is covered by the XML-RPC C Library License.
|
||||||
|
Additionally, certain parts of this library are derived from pre-existing
|
||||||
|
code, which may carry its own license.
|
||||||
|
|
||||||
|
In particular, the Expat Licence applies to the contents of the directory
|
||||||
|
lib/expat, the ABYSS Web Server License applies to the contents of the
|
||||||
|
directory lib/abyss and parts of the file src/xmlrpc_abyss.c, and the
|
||||||
|
Python 1.5.2 license applies to parts of the file src/xmlrpc_base64.c.
|
||||||
|
|
||||||
|
And as for the tools/ directory, you'll have to examine the licenses on
|
||||||
|
your own.
|
||||||
|
|
||||||
|
|
||||||
|
XML-RPC C Library License
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Copyright (C) 2001 by First Peer, Inc. All rights reserved.
|
||||||
|
Copyright (C) 2001 by Eric Kidd. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
1. Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
Expat License
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included
|
||||||
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
ABYSS Web Server License
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Copyright (C) 2000 by Moez Mahfoudh <mmoez@bigfoot.com>. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
1. Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Python 1.5.2 License
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
|
||||||
|
Amsterdam, The Netherlands.
|
||||||
|
|
||||||
|
All Rights Reserved
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and distribute this software and its
|
||||||
|
documentation for any purpose and without fee is hereby granted,
|
||||||
|
provided that the above copyright notice appear in all copies and that
|
||||||
|
both that copyright notice and this permission notice appear in
|
||||||
|
supporting documentation, and that the names of Stichting Mathematisch
|
||||||
|
Centrum or CWI or Corporation for National Research Initiatives or
|
||||||
|
CNRI not be used in advertising or publicity pertaining to
|
||||||
|
distribution of the software without specific, written prior
|
||||||
|
permission.
|
||||||
|
|
||||||
|
While CWI is the initial source for this software, a modified version
|
||||||
|
is made available by the Corporation for National Research Initiatives
|
||||||
|
(CNRI) at the Internet address ftp://ftp.python.org.
|
||||||
|
|
||||||
|
STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
|
||||||
|
REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
|
||||||
|
CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
|
||||||
|
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||||
|
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||||
|
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
PERFORMANCE OF THIS SOFTWARE.
|
47
libs/xmlrpc-c/debian/postinst
Normal file
47
libs/xmlrpc-c/debian/postinst
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# postinst script for xmlrpc-c
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# summary of how this script can be called:
|
||||||
|
# * <postinst> `configure' <most-recently-configured-version>
|
||||||
|
# * <old-postinst> `abort-upgrade' <new version>
|
||||||
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||||
|
# <new-version>
|
||||||
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||||
|
# <failed-install-package> <version> `removing'
|
||||||
|
# <conflicting-package> <version>
|
||||||
|
# for details, see /usr/share/doc/packaging-manual/
|
||||||
|
#
|
||||||
|
# quoting from the policy:
|
||||||
|
# Any necessary prompting should almost always be confined to the
|
||||||
|
# post-installation script, and should be protected with a conditional
|
||||||
|
# so that unnecessary prompting doesn't happen if a package's
|
||||||
|
# installation fails and the `postinst' is called with `abort-upgrade',
|
||||||
|
# `abort-remove' or `abort-deconfigure'.
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
configure)
|
||||||
|
ldconfig
|
||||||
|
;;
|
||||||
|
|
||||||
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "postinst called with unknown argument \`$1'" >&2
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# dh_installdeb will replace this with shell code automatically
|
||||||
|
# generated by other debhelper scripts.
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
39
libs/xmlrpc-c/debian/postrm
Normal file
39
libs/xmlrpc-c/debian/postrm
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# postrm script for xmlrpc-c
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# summary of how this script can be called:
|
||||||
|
# * <postrm> `remove'
|
||||||
|
# * <postrm> `purge'
|
||||||
|
# * <old-postrm> `upgrade' <new-version>
|
||||||
|
# * <new-postrm> `failed-upgrade' <old-version>
|
||||||
|
# * <new-postrm> `abort-install'
|
||||||
|
# * <new-postrm> `abort-install' <old-version>
|
||||||
|
# * <new-postrm> `abort-upgrade' <old-version>
|
||||||
|
# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
|
||||||
|
# for details, see /usr/share/doc/packaging-manual/
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
remove)
|
||||||
|
ldconfig
|
||||||
|
;;
|
||||||
|
|
||||||
|
purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||||
|
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "postrm called with unknown argument \`$1'" >&2
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
# dh_installdeb will replace this with shell code automatically
|
||||||
|
# generated by other debhelper scripts.
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
|
97
libs/xmlrpc-c/debian/rules
Normal file
97
libs/xmlrpc-c/debian/rules
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
# Sample debian/rules that uses debhelper.
|
||||||
|
# GNU copyright 1997 to 1999 by Joey Hess.
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
# This is the debhelper compatability version to use.
|
||||||
|
export DH_COMPAT=3
|
||||||
|
|
||||||
|
# shared library versions, option 1
|
||||||
|
#version=2.0.5
|
||||||
|
#major=2
|
||||||
|
# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
|
||||||
|
version=`ls src/.libs/lib*.so.* | \
|
||||||
|
awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
|
||||||
|
major=`ls src/.libs/lib*.so.* | \
|
||||||
|
awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
|
||||||
|
|
||||||
|
configure: configure-stamp
|
||||||
|
configure-stamp:
|
||||||
|
dh_testdir
|
||||||
|
# Add here commands to configure the package.
|
||||||
|
./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
|
||||||
|
|
||||||
|
touch configure-stamp
|
||||||
|
|
||||||
|
build: configure-stamp build-stamp
|
||||||
|
build-stamp:
|
||||||
|
dh_testdir
|
||||||
|
|
||||||
|
# Add here commands to compile the package.
|
||||||
|
$(MAKE)
|
||||||
|
$(MAKE) check
|
||||||
|
|
||||||
|
touch build-stamp
|
||||||
|
|
||||||
|
clean:
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
rm -f build-stamp configure-stamp
|
||||||
|
|
||||||
|
# Add here commands to clean up after the build process.
|
||||||
|
-$(MAKE) distclean
|
||||||
|
|
||||||
|
dh_clean
|
||||||
|
|
||||||
|
install: build
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_clean -k
|
||||||
|
dh_installdirs
|
||||||
|
|
||||||
|
# Add here commands to install the package into debian/tmp
|
||||||
|
$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
|
||||||
|
|
||||||
|
|
||||||
|
# Build architecture-independent files here.
|
||||||
|
binary-indep: build install
|
||||||
|
# We have nothing to do by default.
|
||||||
|
|
||||||
|
# Build architecture-dependent files here.
|
||||||
|
binary-arch: build install
|
||||||
|
dh_testdir
|
||||||
|
dh_testroot
|
||||||
|
dh_movefiles
|
||||||
|
|
||||||
|
# dh_installdebconf
|
||||||
|
dh_installdocs
|
||||||
|
dh_installexamples
|
||||||
|
dh_installmenu
|
||||||
|
# dh_installlogrotate
|
||||||
|
# dh_installemacsen
|
||||||
|
# dh_installpam
|
||||||
|
# dh_installmime
|
||||||
|
# dh_installinit
|
||||||
|
dh_installcron
|
||||||
|
# dh_installman debian/xmlrpc-c.7
|
||||||
|
# dh_installman -p xmlrpc-c-dev debian/xml-rpc-api2cpp.1 debian/xml-rpc-api2txt.1 debian/xmlrpc-c-config.1
|
||||||
|
# dh_installman -p xmlrpc-c-apps debian/meerkat-app-list.1 debian/query-meerkat.1
|
||||||
|
dh_installinfo
|
||||||
|
# dh_undocumented
|
||||||
|
dh_installchangelogs
|
||||||
|
dh_link
|
||||||
|
dh_strip
|
||||||
|
dh_compress
|
||||||
|
dh_fixperms
|
||||||
|
dh_makeshlibs
|
||||||
|
dh_installdeb
|
||||||
|
# dh_perl
|
||||||
|
dh_shlibdeps -l"$(CURDIR)/debian/xmlrpc-c0/usr/lib/:$$LD_LIBRARY_PATH"
|
||||||
|
dh_gencontrol
|
||||||
|
dh_md5sums
|
||||||
|
dh_builddeb
|
||||||
|
|
||||||
|
binary: binary-indep binary-arch
|
||||||
|
.PHONY: build clean binary-indep binary-arch binary install configure
|
4
libs/xmlrpc-c/debian/xmlrpc-c-apps.files
Normal file
4
libs/xmlrpc-c/debian/xmlrpc-c-apps.files
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
usr/bin/query-meerkat
|
||||||
|
usr/bin/meerkat-app-list
|
||||||
|
usr/share/man/man1/query-meerkat.1
|
||||||
|
usr/share/man/man1/meerkat-app-list.1
|
10
libs/xmlrpc-c/debian/xmlrpc-c-dev.files
Normal file
10
libs/xmlrpc-c/debian/xmlrpc-c-dev.files
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
usr/bin/xmlrpc-c-config
|
||||||
|
usr/bin/xml-rpc-api2txt
|
||||||
|
usr/bin/xml-rpc-api2cpp
|
||||||
|
usr/include/*
|
||||||
|
usr/lib/lib*.a
|
||||||
|
usr/lib/lib*.la
|
||||||
|
usr/lib/lib*.so
|
||||||
|
usr/share/man/man1/xmlrpc-c-config.1
|
||||||
|
usr/share/man/man1/xml-rpc-api2txt.1
|
||||||
|
usr/share/man/man1/xml-rpc-api2cpp.1
|
6
libs/xmlrpc-c/debian/xmlrpc-c0.docs
Normal file
6
libs/xmlrpc-c/debian/xmlrpc-c0.docs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
BUGS
|
||||||
|
NEWS
|
||||||
|
README
|
||||||
|
CREDITS
|
||||||
|
SECURITY
|
||||||
|
doc/*.txt
|
3
libs/xmlrpc-c/debian/xmlrpc-c0.examples
Normal file
3
libs/xmlrpc-c/debian/xmlrpc-c0.examples
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
examples/*.c
|
||||||
|
examples/*.cc
|
||||||
|
conf
|
2
libs/xmlrpc-c/debian/xmlrpc-c0.files
Normal file
2
libs/xmlrpc-c/debian/xmlrpc-c0.files
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
usr/lib/lib*.so.*
|
||||||
|
usr/share/man/man7/xmlrpc-c.7
|
143
libs/xmlrpc-c/doc/COPYING
Normal file
143
libs/xmlrpc-c/doc/COPYING
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
The copyright owners of this package license the public to copy it
|
||||||
|
(and do other things with it which are controlled by copyright law)
|
||||||
|
under a few simple conditions.
|
||||||
|
|
||||||
|
Each source files describes the copyright license for that particular
|
||||||
|
file. This file summarizes the licenses for your convenience.
|
||||||
|
|
||||||
|
All the code written specifically for Xmlrpc-c, which is most
|
||||||
|
of the code, and the aggregation, is licensed under the
|
||||||
|
XML-RPC FOR C/C++ license shown below.
|
||||||
|
|
||||||
|
Some of the code was written for another purpose and copied into
|
||||||
|
Xmlrpc-c. Its copyright owners license the code under a different
|
||||||
|
license:
|
||||||
|
|
||||||
|
The Expat Licence applies to the contents of the directory lib/expat,
|
||||||
|
the ABYSS Web Server License applies to the contents of the directory
|
||||||
|
lib/abyss and parts of the file src/xmlrpc_abyss.c.
|
||||||
|
|
||||||
|
The Python 1.5.2 license applies to parts of the file
|
||||||
|
src/xmlrpc_base64.c.
|
||||||
|
|
||||||
|
And as for the tools/ directory, you'll have to examine the licenses
|
||||||
|
on your own.
|
||||||
|
|
||||||
|
These same licenses have been offered throughout Xmlrpc-c's history.
|
||||||
|
|
||||||
|
|
||||||
|
XML-RPC For C/C++ License
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Copyright (C) 2001 by First Peer, Inc. All rights reserved.
|
||||||
|
Copyright (C) 2001 by Eric Kidd. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
1. Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
Expat License
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included
|
||||||
|
in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
ABYSS Web Server License
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Copyright (C) 2000 by Moez Mahfoudh <mmoez@bigfoot.com>. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions
|
||||||
|
are met:
|
||||||
|
1. Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in the
|
||||||
|
documentation and/or other materials provided with the distribution.
|
||||||
|
3. The name of the author may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Python 1.5.2 License
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
|
||||||
|
Amsterdam, The Netherlands.
|
||||||
|
|
||||||
|
All Rights Reserved
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and distribute this software and its
|
||||||
|
documentation for any purpose and without fee is hereby granted,
|
||||||
|
provided that the above copyright notice appear in all copies and that
|
||||||
|
both that copyright notice and this permission notice appear in
|
||||||
|
supporting documentation, and that the names of Stichting Mathematisch
|
||||||
|
Centrum or CWI or Corporation for National Research Initiatives or
|
||||||
|
CNRI not be used in advertising or publicity pertaining to
|
||||||
|
distribution of the software without specific, written prior
|
||||||
|
permission.
|
||||||
|
|
||||||
|
While CWI is the initial source for this software, a modified version
|
||||||
|
is made available by the Corporation for National Research Initiatives
|
||||||
|
(CNRI) at the Internet address ftp://ftp.python.org.
|
||||||
|
|
||||||
|
STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
|
||||||
|
REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
|
||||||
|
CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
|
||||||
|
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||||
|
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||||
|
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
PERFORMANCE OF THIS SOFTWARE.
|
19
libs/xmlrpc-c/doc/CREDITS
Normal file
19
libs/xmlrpc-c/doc/CREDITS
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Funding for the project that created the original Xmlrpc-c was
|
||||||
|
provided in part by the good folks at First Peer, Inc., producers of
|
||||||
|
P2P applications.
|
||||||
|
|
||||||
|
Eric Kidd developed the original Xmlrpc-c in 2000 and maintained it up
|
||||||
|
through June 2001.
|
||||||
|
|
||||||
|
Bryan Henderson took over as maintainer in October 2004.
|
||||||
|
|
||||||
|
Xmlrpc-c contains (and relies on for some server functions) a derivation
|
||||||
|
of the Abyss web server by Moez Mahfoudh.
|
||||||
|
|
||||||
|
Xmlrpc-c contains (and relies on) a derivation of the Expat XML
|
||||||
|
parser, written by James Clark.
|
||||||
|
|
||||||
|
The base64 code was derived from what Jack Jansen developed for Python.
|
||||||
|
|
||||||
|
For more history, including credits for more minor contributions, see
|
||||||
|
the HISTORY file.
|
82
libs/xmlrpc-c/doc/DEVELOPING
Normal file
82
libs/xmlrpc-c/doc/DEVELOPING
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
Here are some notes to help you develop code for Xmlrpc-c. I include
|
||||||
|
as "developing" debugging to figure out why Xmlrpc-c doesn't work for
|
||||||
|
you.
|
||||||
|
|
||||||
|
CODE LIBRARY
|
||||||
|
------------
|
||||||
|
|
||||||
|
The master Xmlrpc-c source code tree is the CVS repository on
|
||||||
|
Sourceforge. Anybody can read it; only the maintainer can commit to
|
||||||
|
it. If you're not the maintainer, simply use a 'cvs diff' command in
|
||||||
|
your CVS working directory to create a patch file that embodies your
|
||||||
|
changes and email that to the maintainer. He can easily apply that
|
||||||
|
patch to his own CVS working directory and then commit the changes.
|
||||||
|
|
||||||
|
|
||||||
|
MAKE VARIABLES
|
||||||
|
--------------
|
||||||
|
|
||||||
|
You can pass make variable values to GNU Make to change the build.
|
||||||
|
There are two common ways to do this:
|
||||||
|
|
||||||
|
1) Like this:
|
||||||
|
|
||||||
|
$ make MYVAR=myvalue
|
||||||
|
|
||||||
|
2) Via an environment variable, like this:
|
||||||
|
|
||||||
|
$ MYVAR=myvalue make
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
$ export MYVAR=myvalue
|
||||||
|
$ make
|
||||||
|
|
||||||
|
See GNU Make and shell documentation for details.
|
||||||
|
|
||||||
|
In Xmlrpc-c make files, there are two make variables that add
|
||||||
|
arbitrary options to every compile command: CADD and CFLAGS_PERSONAL.
|
||||||
|
|
||||||
|
They both do the same thing. CADD is meant to be set on an individual
|
||||||
|
make command, whereas CFLAGS_PERSONAL is meant to be a long-lived
|
||||||
|
environment variable. CFLAGS_PERSONAL is for flags you like on all
|
||||||
|
your compiles, but maybe others don't.
|
||||||
|
|
||||||
|
One of my favorite CADD settings is CADD=--save-temps. To the GNU
|
||||||
|
Compiler, --save-temps means to create, in addition to the object
|
||||||
|
code, a file containing the intermediate preprocessed C code and a
|
||||||
|
file containing the intermediate assembler source code. I can use
|
||||||
|
that to debug certain things.
|
||||||
|
|
||||||
|
The Xmlrpc-c build uses -g by default with Gcc, so you don't need to
|
||||||
|
use CADD to get debugging symbols in your object code.
|
||||||
|
|
||||||
|
|
||||||
|
There's also LADD for linker options.
|
||||||
|
|
||||||
|
|
||||||
|
CODE STYLE
|
||||||
|
----------
|
||||||
|
|
||||||
|
The maintainer is pretty particular about coding style, but doesn't
|
||||||
|
require anyone to submit code in any particular style. He changes
|
||||||
|
what he thinks isn't maintainable enough as submitted. You could do
|
||||||
|
him a big favor, though, and reduce the chance of him introducing bugs
|
||||||
|
into your code, but trying to copy the style you see in existing code.
|
||||||
|
The major theme is high level programming -- closer to English prose
|
||||||
|
and further from machine instructions.
|
||||||
|
|
||||||
|
Probably the most important thing is not to use tabs. Tabs are
|
||||||
|
actually quite common in Unix C programming, but apart from tradition,
|
||||||
|
they are a bad idea. They don't look the same to everyone. A person
|
||||||
|
must suffer an additional configuration step -- setting up tab stops
|
||||||
|
in order to see the code the right way. Spaces, on the other hand,
|
||||||
|
look the same to everyone. Very old editors made it easier to compose
|
||||||
|
with tabs than with spaces, but with modern ones, there is no
|
||||||
|
difference.
|
||||||
|
|
||||||
|
The maintainer tries to catch all tabs in code submitted to him and
|
||||||
|
convert them to spaces, but this often leaves the code incorrectly
|
||||||
|
indented. Better to give him code that already has the right number
|
||||||
|
of spaces explicitly.
|
||||||
|
|
453
libs/xmlrpc-c/doc/HISTORY
Normal file
453
libs/xmlrpc-c/doc/HISTORY
Normal file
@ -0,0 +1,453 @@
|
|||||||
|
(There is a detailed release-by-release change history after the
|
||||||
|
following overview).
|
||||||
|
|
||||||
|
XML-RPC For C/C++ was created by Eric Kidd in 2000, when XML-RPC was
|
||||||
|
new and vital. Its development was funded in significant part by
|
||||||
|
First Peer, Inc. Eric released the package in January 2001 and set up
|
||||||
|
an extensive project to maintain it. The project used virtually every
|
||||||
|
feature on Sourceforge, had about 8 official developers, and
|
||||||
|
distributed code in various formats. There were mailing lists,
|
||||||
|
trackers, CVS branches, RPMs, and a full PHP-based web site, just to
|
||||||
|
name a few features of the project.
|
||||||
|
|
||||||
|
Then everything ground to a halt in June 2001, with the disappearance
|
||||||
|
of Eric. We don't know what happened to him, but Google searches in
|
||||||
|
late 2004 indicated he dropped off the face of the web at that time.
|
||||||
|
While people continued to use Xmlrpc-c, and some developed fixes and
|
||||||
|
enhancements and posted them to the Sourceforge trackers, the release
|
||||||
|
remained frozen at 0.9.10. The web site also became frozen in time.
|
||||||
|
|
||||||
|
In the years that followed the great freeze, XML-RPC became
|
||||||
|
marginalized by more sophisticated alternatives such as SOAP. XML-RPC
|
||||||
|
consequently became rather stable and interest in Xmlrpc-c levelled
|
||||||
|
off.
|
||||||
|
|
||||||
|
This dark age of Xmlrpc-c lasted until November 2004, when Bryan Henderson
|
||||||
|
set out to find an RPC mechanism to use in one of his projects. Bryan
|
||||||
|
found XML-RPC and then Xmlrpc-c. He decided that the two were almost right
|
||||||
|
for his needs, but he needed some small extensions.
|
||||||
|
|
||||||
|
On finding out that the project was orphaned, Bryan decided to take it
|
||||||
|
over. Bryan became the Sourceforge project administrator through
|
||||||
|
Sourceforge's abandonned project process, then gathered the patches
|
||||||
|
that had been submitted over the years and made a come-back release
|
||||||
|
called 1.0.
|
||||||
|
|
||||||
|
Bryan then proceeded to add a lot of features in subsequent releases
|
||||||
|
about every two months. Most of it was code Bryan wrote himself, but
|
||||||
|
significant parts were contributed by others, as you can see in the
|
||||||
|
detailed history below. Among the larger enhancements was a new
|
||||||
|
C++ interface; the old one was a fairly weak wrapper around the
|
||||||
|
C interface and required the user to manage memory and access the
|
||||||
|
underlying C structures; the new one used pure C++ principles with
|
||||||
|
automatic memory management.
|
||||||
|
|
||||||
|
Bryan also wrote a complete user's manual. Surprisingly, in spite of
|
||||||
|
the wide array of features the project had, documentation wasn't one
|
||||||
|
of them. There was only a smattering of information available on how
|
||||||
|
to use the package.
|
||||||
|
|
||||||
|
One significant change Bryan made to the project was to strip it down
|
||||||
|
considerably. In order to concentrate the small amount of time Bryan
|
||||||
|
had available for Xmlrpc-c development on actual code and
|
||||||
|
documentation, Bryan had to greatly reduce the amount of bureaucracy
|
||||||
|
involved in administering the project and making releases, and reduce
|
||||||
|
the set of skills required to do it. Bryan made static make files
|
||||||
|
(for GNU Make) to replace the two extra build stages that originally
|
||||||
|
generated make files. Bryan moved away from Libtool and toward simple
|
||||||
|
compiling and linking. Bryan eliminated all pre-built distributions;
|
||||||
|
each of his releases consisted of a single source code tarball, and
|
||||||
|
that tarball was not signed. Bryan removed some redundant sources of
|
||||||
|
information from the package and the web site.
|
||||||
|
|
||||||
|
|
||||||
|
DETAILED RELEASE HISTORY:
|
||||||
|
|
||||||
|
|
||||||
|
(BJH means Bryan Henderson <bryanh@giraffe-data.com>)
|
||||||
|
(SAB means Steven A. Bone <sbone@pobox.com>)
|
||||||
|
|
||||||
|
1.03.14 - 06.04.15
|
||||||
|
|
||||||
|
*BJH: Fix int/size_t mismatch in xmlrpc_server_abyss.c (manifests on 64
|
||||||
|
bit systems).
|
||||||
|
|
||||||
|
1.03.13 - 06.04.05
|
||||||
|
|
||||||
|
*BJH: Fix build on system with no wchar_t.
|
||||||
|
|
||||||
|
*BJH: Abyss XML-RPC server accepts (ignores) parameters after
|
||||||
|
"text/xml" in Content-type header from client.
|
||||||
|
|
||||||
|
1.03.12 - 06.03.20
|
||||||
|
|
||||||
|
*BJH: Fix build of transport_config.h
|
||||||
|
|
||||||
|
*BJH: Remove tantalizing but broken RPM spec file.
|
||||||
|
|
||||||
|
*BJH: Remove casprintf.o from link of 'xmlrpc', 'xmlrpc_transport', because
|
||||||
|
it conflicts with the version in libxmlrpc_client.
|
||||||
|
|
||||||
|
*BJH: Change order of libraries in linking 'xml-rpc-api2cpp' to fix
|
||||||
|
undefined reference error.
|
||||||
|
|
||||||
|
1.03.11 - 06.01.25
|
||||||
|
|
||||||
|
*Mike Goddard: in Xmlrpc-c-config, allow libwww-client as synonym
|
||||||
|
for client, for backward compatibility.
|
||||||
|
|
||||||
|
*Daniel Dlab: Correct INTERNET_FLAG_IGNORE_CERT_DATE_INVALID to
|
||||||
|
ERROR_INTERNET_SEC_CERT_DATE_INVALID in Wininet transport.
|
||||||
|
|
||||||
|
*BJH: Fix memory leak in C++ client result value - one leak per RPC.
|
||||||
|
|
||||||
|
*BJH: Fix memory leak in C++ client - one leak per RPC.
|
||||||
|
|
||||||
|
*BJH: Fix signature in xmlrpc_sample_add_server C++ example program.
|
||||||
|
|
||||||
|
*BJH: Fix memory leak in xmlrpc_server_abyss_set_handler().
|
||||||
|
|
||||||
|
*BJH: Fix memory leak in server method registry -- one leak for each
|
||||||
|
RPC.
|
||||||
|
|
||||||
|
*BJH: Fix memory leak in wide character constructor functions.
|
||||||
|
|
||||||
|
1.03.10 - December 18, 2005
|
||||||
|
|
||||||
|
*BJH: Change default minimum on paramList::getDouble() from DBL_MIN
|
||||||
|
to -DBL_MAX.
|
||||||
|
|
||||||
|
1.03.09 - December 7, 2005
|
||||||
|
|
||||||
|
* BJH: Fix size_t/int type mismatch in xmlrpc_server_abyss.c.
|
||||||
|
|
||||||
|
* BJH: meerkat-app-list example program: remove NUL character from
|
||||||
|
time period parameter.
|
||||||
|
|
||||||
|
1.03.08 - November 23, 2005
|
||||||
|
|
||||||
|
* BJH: Fix use of uninitialized 'name' member in Abyss ServerCreate().
|
||||||
|
|
||||||
|
* BJH: Install client_simple.hpp interface header file.
|
||||||
|
|
||||||
|
* BJH: Fix bogus NULL default value for string argument in
|
||||||
|
serverAbyss constructor. Use null string instead
|
||||||
|
|
||||||
|
* BJH: Remove 'cpptest' from default make.
|
||||||
|
|
||||||
|
* Mike West:
|
||||||
|
Don't include tools/xmlrpc and tools/xmlrpc_transport
|
||||||
|
in the build if client library configured out.
|
||||||
|
|
||||||
|
1.03.07 - October 22, 2005
|
||||||
|
|
||||||
|
* BJH: Remove curl_global_cleanup() so that multiple simultaneous
|
||||||
|
Curl client XML transports per process are essentially
|
||||||
|
possible and they don't interfere with other process use of
|
||||||
|
Curl.
|
||||||
|
|
||||||
|
* BJH: Serialize access to synchronous Curl session in Curl client
|
||||||
|
XML transport (to avoid crashes with multiple threads).
|
||||||
|
|
||||||
|
* BJH: When installing legacy header symlinks, remove old names first.
|
||||||
|
|
||||||
|
1.03.06 - October 6, 2005
|
||||||
|
|
||||||
|
* BJH: Fix use of pthread_mutex_t in girmem.hpp so it can be used in
|
||||||
|
a Windows program.
|
||||||
|
|
||||||
|
* BJH: Don't include xml-rpc-api2cpp in the build with --disable-cpp.
|
||||||
|
|
||||||
|
* BJH: Fix bug in tools build, where it tries to link libxml2 instead
|
||||||
|
of expat.
|
||||||
|
|
||||||
|
* BJH: Add missing xmlrpc_config.h so lib/abyss/src/socket.h will
|
||||||
|
compile on Solaris.
|
||||||
|
|
||||||
|
1.03.05 - September 24, 2005
|
||||||
|
|
||||||
|
* BJH: Change int to long in XMLRPC_STRUCTSIZE to correct 64 bit
|
||||||
|
compile error.
|
||||||
|
|
||||||
|
* BJH: Add virtual destructor for client to quiet compiler warning.
|
||||||
|
|
||||||
|
* BJH: Don't try to build Abyss example programs if Abyss libraries not
|
||||||
|
built.
|
||||||
|
|
||||||
|
* BJH: Include <sys/filio.h> if it exists (i.e. Solaris).
|
||||||
|
|
||||||
|
* BJH: Include <stdlib.h> instead of <malloc.h>, which doesn't exist
|
||||||
|
in some environments.
|
||||||
|
|
||||||
|
1.03.04 - September 9, 2005
|
||||||
|
|
||||||
|
* BJH: Make Abyss work with short writes to sockets. Thanks
|
||||||
|
Alistair John Strachan <s0348365@sms.ed.ac.uk>.
|
||||||
|
|
||||||
|
* BJH: Remove unused SSPRINTF definition that won't compile on AIX
|
||||||
|
because it has variable arguments.
|
||||||
|
|
||||||
|
* BJH: Fix Curl transport bug: arbitrary values for SSL verify options.
|
||||||
|
|
||||||
|
1.03.03 - August 4, 2005
|
||||||
|
|
||||||
|
* SAB: Fix for Windows what broke between 1.02 and 1.03.
|
||||||
|
|
||||||
|
* SAB: Fix incorrect result of xmlrpc_read_string_w() (wrong-size memcpy()).
|
||||||
|
|
||||||
|
* BJH: Fix various things that don't compile on AIX.
|
||||||
|
|
||||||
|
* BJH: Fix bug: doesn't install libxmlrpc_abyss.
|
||||||
|
|
||||||
|
* BJH: Fix missing -l options in xmlrpc-c-config --client
|
||||||
|
|
||||||
|
1.03.02 - July 20, 2005
|
||||||
|
|
||||||
|
* BJH: Fix for bug in which Abyss doesn't build with either thread or
|
||||||
|
fork capability. (Add -D_UNIX and -D_THREAD compile options).
|
||||||
|
|
||||||
|
1.03.01 - July 9, 2005
|
||||||
|
|
||||||
|
* BJH: Fix for libxml2, no curl builds. make clean cleans test directory
|
||||||
|
|
||||||
|
1.03 - June 26, 2005
|
||||||
|
|
||||||
|
* BJH: new C++ libraries designed for pure C++ applications
|
||||||
|
(Application never sees the underlying C structures or reference
|
||||||
|
counts).
|
||||||
|
|
||||||
|
* BJH: Make Curl do cookies (session only) and persistent connections.
|
||||||
|
This is only for calls through the synchronous interface, and the
|
||||||
|
synchronous interface is no longer thread safe -- you can have only
|
||||||
|
one thread making calls through it.
|
||||||
|
|
||||||
|
* BJH: Add Curl SSL_NO_VERIFYPEER, SSL_NO_VERIFYHOST control.
|
||||||
|
|
||||||
|
* BJH: Add User-Agent to Curl transport, Xmlrpc program.
|
||||||
|
|
||||||
|
* BJH: libwww transport does not do the weird handling of the "auth"
|
||||||
|
cookie. It used to have a global cookie (one cookie shared by all
|
||||||
|
servers) called "auth", which it maintained in an environment
|
||||||
|
variable.
|
||||||
|
|
||||||
|
* BJH: interface header files renamed from xmlrpc_xxx to xmlrpc-c/xxx
|
||||||
|
(old names installed a symbolic links for backward compatibility).
|
||||||
|
|
||||||
|
* BJH: libxmlrpc_server_abyss: Add ability to set the /RPC2 handler
|
||||||
|
without also setting default handler, and to set handlers for files
|
||||||
|
other than /RPC2.
|
||||||
|
|
||||||
|
* BJH: libxmlrpc_server_abyss: Eliminate global variable for registry
|
||||||
|
handle.
|
||||||
|
|
||||||
|
* BJH: Abyss: allow user's request handlers to have context
|
||||||
|
(Add URIHandler2 type).
|
||||||
|
|
||||||
|
* BJH: Add xmlrpc_datetime_new_sec(), xmlrpc_read_datetime_sec().
|
||||||
|
|
||||||
|
* BJH: Builds on AIX - new __inline definition, uint32_t instead of uint32,
|
||||||
|
et al.
|
||||||
|
|
||||||
|
* BJH: Don't build client library if not building any client XML
|
||||||
|
transport.
|
||||||
|
|
||||||
|
* BJH: Fix bug: xmlrpc_serialize_base64_data() doesn't free working
|
||||||
|
storage.
|
||||||
|
|
||||||
|
* BJH: Fix mysterious disablement of forking Abyss (ServerRunForked()).
|
||||||
|
|
||||||
|
* BJH: Fix bug: 'make install' doesn't install libxmlrpc_xmltok.
|
||||||
|
|
||||||
|
* BJH: Renamed CGI stuff, add non-builtin-registry style of CGI server.
|
||||||
|
|
||||||
|
* BJH: Break up 'rpctest', rename to 'test'.
|
||||||
|
|
||||||
|
1.02 - April 4, 2005
|
||||||
|
|
||||||
|
* SAB: Win32 http.sys server: Add new project and sample as
|
||||||
|
an alternative to Abyss on current Win32 platforms. Does
|
||||||
|
basic authentication and SSL. Requires recent Platform SDK to
|
||||||
|
build.
|
||||||
|
|
||||||
|
* BJH: Add xmlrpc_int_new(), xmlrpc_read_int(), etc.,
|
||||||
|
xmlrpc_decompose_value()
|
||||||
|
|
||||||
|
* BJH: Add nil (<nil/>, XMLRPC_TYPE_NIL) capability.
|
||||||
|
|
||||||
|
* SAB: WinInet Transport: Add Ignore Invalid SSL certs option.
|
||||||
|
|
||||||
|
* BJH: Add 'network_interface' option to Curl transport.
|
||||||
|
|
||||||
|
* BJH: Add basic authentication to 'xmlrpc' program.
|
||||||
|
|
||||||
|
* BJH: Add 'xmlrpc_transport' tool.
|
||||||
|
|
||||||
|
* SAB: Improve use of libCurl in Win32. Add documentation
|
||||||
|
and alter some project and configuration files.
|
||||||
|
|
||||||
|
* BJH: Add transport-specific options.
|
||||||
|
|
||||||
|
* BJH: Use GNUmakefile to catch non-GNU make
|
||||||
|
|
||||||
|
* BJH: Fix usage message in xmlrpc-c-config.
|
||||||
|
|
||||||
|
* BJH: Curl transport: check for failure of Winsock startup.
|
||||||
|
|
||||||
|
* BJH: Fix memory leak in Curl - not freeing curlTransaction.
|
||||||
|
|
||||||
|
* SAB: WinInet Transport: Fix bad authentication header.
|
||||||
|
|
||||||
|
|
||||||
|
1.01 - January 8, 2005
|
||||||
|
|
||||||
|
* SAB: Windows works again; new build strategy.
|
||||||
|
|
||||||
|
* BJH: Abyss: Add ConnCreate2() with foreground capability.
|
||||||
|
|
||||||
|
* BJH: Abyss: Add ServerRunOnce2() with foreground capability.
|
||||||
|
|
||||||
|
* BJH: Abyss: Fix ServerRunOnce().
|
||||||
|
|
||||||
|
* BJH: Add xmlrpc_server_abyss().
|
||||||
|
|
||||||
|
* BJH: Abyss pthreads is default
|
||||||
|
|
||||||
|
* BJH: Clean up client transport multiplexor
|
||||||
|
|
||||||
|
* BJH: Separate out server registry stuff into new libxml_server.
|
||||||
|
|
||||||
|
* BJH: Examples/Makefile uses new xmlrpc-c-config.test so as to be a
|
||||||
|
better example.
|
||||||
|
|
||||||
|
* BJH: Fail when structure format specifier does not end in
|
||||||
|
"*" instead of just asserting that it does.
|
||||||
|
|
||||||
|
* BJH: Fail when structure format specifier is not closed by "}"
|
||||||
|
instead of just asserting that it is.
|
||||||
|
|
||||||
|
* BJH: Add xmlrpc_array_read_item().
|
||||||
|
|
||||||
|
1.00 - October 25, 2004
|
||||||
|
* New modular client XML transport structure. Curl and Wininet transports
|
||||||
|
(in addition to existing libwww).
|
||||||
|
* Bryan Henderson: create Makefile.config; make examples/ directory use
|
||||||
|
static make file.
|
||||||
|
* Bryan Henderson: replace Makefile.am with already built Makefile.in.
|
||||||
|
* Peter Astrand: make it compile with Gcc 3.1.1.
|
||||||
|
* Joe Shaw: Can use libxml2 instead of libexpat.
|
||||||
|
* Bernhard Herzog: const fixes
|
||||||
|
* Stephen Blackheath: ./configure support for building Abyss
|
||||||
|
with pthreads.
|
||||||
|
* Jeff Dubrule: Removed C++ comments from expat.
|
||||||
|
* Patrick Boykin: Facility to copy xmlrpc_server_info structs.
|
||||||
|
|
||||||
|
0.9.10 - Eric Kidd <eric.kidd@pobox.com> - 30 June 2001
|
||||||
|
|
||||||
|
* Man pages!
|
||||||
|
* Debian packages!
|
||||||
|
|
||||||
|
* Jeff Stewart: NT CGI fixes.
|
||||||
|
* Andy Maloney: Win32 xmlrpc_win32_config.h fixes.
|
||||||
|
* Mike Bytnar: Solaris build fixes. Thanks!
|
||||||
|
|
||||||
|
* No more 'CVS' directories lurking in the dist tarball.
|
||||||
|
* Disabled rpath stuff so we comply with Debian policy.
|
||||||
|
* wchar_t code can now be disabled.
|
||||||
|
* New interop server.
|
||||||
|
* Parts of an interop client.
|
||||||
|
* Lots of interop fixes.
|
||||||
|
* Other stuff.
|
||||||
|
|
||||||
|
0.9.9 - Eric Kidd <eric.kidd@pobox.com> - 03 April 2001
|
||||||
|
|
||||||
|
* xml-rpc-api2cpp now generates usable proxy classes.
|
||||||
|
* Luke Howard: Default method capability.
|
||||||
|
* Abstract XML parser API (but you'll need to edit makefiles to use it).
|
||||||
|
* Implemented a configurable size limit for XML data off the network.
|
||||||
|
|
||||||
|
* Ability to build and parse XML-RPC values using wchar_t strings.
|
||||||
|
* Basic UTF-8 handling: Refuse to process invalid UTF-8 from network,
|
||||||
|
print warnings when sending invalid UTF-8 *to* network.
|
||||||
|
* Highly robust UTF-8 validator, decoder, encoder.
|
||||||
|
|
||||||
|
* Modularized the build system--build only what you need.
|
||||||
|
* Integrated Electric Fence into build system (optional).
|
||||||
|
|
||||||
|
* Fixed all recent, reproducible bugs in CVS. These were generally
|
||||||
|
Windows build bugs.
|
||||||
|
* Andy Maloney: Build fixes for Windows.
|
||||||
|
* Mike Bytnar: Build fixes for Solaris.
|
||||||
|
* RedHat 7 warning fixes.
|
||||||
|
|
||||||
|
0.9.8 - Eric Kidd <eric.kidd@pobox.com> - 19 February 2001
|
||||||
|
|
||||||
|
* J. Alan Eldridge, Rosimildo daSIlva: Build fixes.
|
||||||
|
* Send 'encoding="UTF-8"' in XML prologue.
|
||||||
|
|
||||||
|
0.9.7 - Eric Kidd <eric.kidd@pobox.com> - 14 February 2001
|
||||||
|
|
||||||
|
* SECURITY: Configurable nesting limits (see advisory 1) to prevent
|
||||||
|
denial-of-service attacks and stack overflow.
|
||||||
|
* Win32 build fixes from Alex Olugbile.
|
||||||
|
* Function name fix from Luke Howard.
|
||||||
|
|
||||||
|
0.9.6w - Eric Kidd <eric.kidd@pobox.com> - 02 February 2001
|
||||||
|
|
||||||
|
* Merged Win32 VC/C++ changes from Alex and Ian.
|
||||||
|
* Merged Win32 Cygwin changes from Rosimildo daSilva
|
||||||
|
|
||||||
|
0.9.6 - Eric Kidd <eric.kidd@pobox.com> - 30 January 2001
|
||||||
|
|
||||||
|
* Fixed lots of gcc warnings.
|
||||||
|
* Added a new 'xmlrpc_server_info' class, which allows you to
|
||||||
|
set options on a per-server basis.
|
||||||
|
* HTTP Basic authentication.
|
||||||
|
* Added internal implementation of system.multicall, lots of brutal test
|
||||||
|
cases, and stubs for other system.* commands.
|
||||||
|
* Added APIs for accessing CGI and Abyss method registries.
|
||||||
|
* Implemented system.listMethods, system.methodHelp, system.methodSignature.
|
||||||
|
* Fixed stupid bug in parsing of "(ss*)"-style array descriptions
|
||||||
|
where there were no extra elements.
|
||||||
|
* Added highly experimental hacked copy of mod_gzip into the
|
||||||
|
tools/turbocharger directory. This version does gzip *and* deflate!
|
||||||
|
* Added xml-rpc-api2txt, since XML-RPC doesn't have any IDL language.
|
||||||
|
* Merged in Ilya Goldberg's libwww/SSL setup code.
|
||||||
|
|
||||||
|
0.9.5 - Eric Kidd <eric.kidd@pobox.com> - 20 January 2001
|
||||||
|
|
||||||
|
* Bug fix: Make sure CGI-based servers send correct content-length.
|
||||||
|
|
||||||
|
0.9.4 - Eric Kidd <eric.kidd@pobox.com> - 18 January 2001
|
||||||
|
|
||||||
|
* Services for CGI-based servers.
|
||||||
|
|
||||||
|
0.9.3 - Eric Kidd <eric.kidd@pobox.com> - 14 January 2001
|
||||||
|
|
||||||
|
* Works with Libwww 5.2.8, even when linked against expat.
|
||||||
|
* Added xmlrpc_value_type and XmlRpcValue::getType functions.
|
||||||
|
* Miscellaneous API tweaks to discourage writing of incorrect programs.
|
||||||
|
Should not affect any correct programs.
|
||||||
|
|
||||||
|
0.9.2 - Eric Kidd <eric.kidd@pobox.com> - 12 January 2001
|
||||||
|
|
||||||
|
* Improved error messages.
|
||||||
|
* Refuse to link against libwww if it was built with expat.
|
||||||
|
|
||||||
|
0.9.1 - Eric Kidd <eric.kidd@pobox.com> - 9 January 2001
|
||||||
|
|
||||||
|
* Integrated Rick Blair's fix to speed up libwww client.
|
||||||
|
* Added informative URLs to Meerkat example programs.
|
||||||
|
* Hid the implementation details of xmlrpc_value, just to keep
|
||||||
|
people honest. (No more dangerous allocation on the stack!)
|
||||||
|
* Minor C++ code cleanup after buying modern C++ books.
|
||||||
|
* Documentation improvements.
|
||||||
|
|
||||||
|
Some other contributions of unknown date:
|
||||||
|
|
||||||
|
Adrian Likins made lots of good, real-world suggestions for improvement.
|
||||||
|
|
||||||
|
Ian MacLean made patches from Alex's Windows port.
|
||||||
|
|
||||||
|
Brian Quinlan of the Active State company made lots of cool patches,
|
||||||
|
including preliminary wchar_t capability.
|
||||||
|
|
50
libs/xmlrpc-c/doc/SECURITY
Normal file
50
libs/xmlrpc-c/doc/SECURITY
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
Security Advisories
|
||||||
|
===================
|
||||||
|
|
||||||
|
The Xmlrpc-c maintainer will normally post security advisories related
|
||||||
|
to xmlrpc-c to the xmlrpc-c-announce mailing list. You can subscribe
|
||||||
|
to this using the web:
|
||||||
|
|
||||||
|
http://xmlrpc-c.sourceforge.net/lists.php
|
||||||
|
|
||||||
|
You will also find a list of all known bugs including those with
|
||||||
|
security ramifications, in the release notes on Sourceforge. To see
|
||||||
|
the release notes for a release, go to the file download page and
|
||||||
|
click on the release name. The list is current only for the most
|
||||||
|
current release -- i.e. we stop adding to the list for release N after
|
||||||
|
we release N+1.
|
||||||
|
|
||||||
|
|
||||||
|
XML-RPC Security
|
||||||
|
================
|
||||||
|
|
||||||
|
There are some security issues inherent in XML-RPC:
|
||||||
|
|
||||||
|
1) XML-RPC messages are not encrypted at the XML-RPC level. This
|
||||||
|
means that unless you encrypt them at some lower level, someone
|
||||||
|
with sufficient access to the network can see them with standard
|
||||||
|
packet-sniffing and network administration tools.
|
||||||
|
|
||||||
|
This is especially dangerous because XML-RPC is a stateless protocol.
|
||||||
|
If you include reusable authentication tokens in an XML-RPC call, they
|
||||||
|
can probably be sniffed and used by attackers.
|
||||||
|
|
||||||
|
You can solve this problem by using SSL under HTTP. This is possible
|
||||||
|
with Xmlrpc-c, but it's nontrivial to set up and the Xmlrpc-c
|
||||||
|
documentation doesn't tell you how.
|
||||||
|
|
||||||
|
2) There are no permission restrictions and no authentication built
|
||||||
|
into Xmlrpc-c by default -- any client can call any method on any
|
||||||
|
visible server and neither can know for sure to whom it is talking.
|
||||||
|
|
||||||
|
If you need permission and authentication, you either have to put
|
||||||
|
it above the XML-RPC layer or below. For a server, above means in
|
||||||
|
the method code you supply and register with the Xmlrpc-c server
|
||||||
|
facilities; below means something like a firewall that lets clients
|
||||||
|
only from a certain IP address connect to your server.
|
||||||
|
|
||||||
|
3) XML-RPC is a complex protocol based on complex data structures.
|
||||||
|
Layers and layers of potentially buggy code gets run between the
|
||||||
|
time network data is received, and the time it is understood; and
|
||||||
|
conversely between the time data is conceived and the time it
|
||||||
|
gets sent.
|
96
libs/xmlrpc-c/doc/TESTING
Normal file
96
libs/xmlrpc-c/doc/TESTING
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
In general, we want to run as many automated test tools on the
|
||||||
|
Xmlrpc-c libraries as possible. Before releasing a new release,
|
||||||
|
please run as many of these tests as possible.
|
||||||
|
|
||||||
|
|
||||||
|
Included Test Suites
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
The 'test' program tests core functions. These are functions that
|
||||||
|
don't involve HTTP communications. So obviously, it doesn't do any
|
||||||
|
end-to-end client/server tests.
|
||||||
|
|
||||||
|
The program is in src/test/test. You have to build that explicitly (with
|
||||||
|
src/test/ as your current directory, do a 'make'); a top level 'make all'
|
||||||
|
doesn't build it. (Reason: it's a tricky build, and we don't a user's
|
||||||
|
build to fail just because of this program that a user doesn't need).
|
||||||
|
|
||||||
|
src/cpp/cpptest is similar for the C++ libraries.
|
||||||
|
|
||||||
|
Note: Before Release 1.03, 'test' was called 'rpctest' and both it
|
||||||
|
and 'cpptest' were in the src/ directory and were built by 'make all'.
|
||||||
|
|
||||||
|
|
||||||
|
Memory Leaks
|
||||||
|
------------
|
||||||
|
|
||||||
|
(Linux only?) Install Owen Taylor's 'memprof' utility. This program
|
||||||
|
includes a malloc debugger and a conservative garbage collector. To run it,
|
||||||
|
type:
|
||||||
|
|
||||||
|
memprof test
|
||||||
|
|
||||||
|
This should report any memory leaks which occur while the test suites are
|
||||||
|
running.
|
||||||
|
|
||||||
|
|
||||||
|
Electric Fence
|
||||||
|
--------------
|
||||||
|
|
||||||
|
(Most Unix platforms.) Install Bruce Perens' Electric Fence library, and
|
||||||
|
read the man pages carefully. Link 'test' against '-lefence', and run it
|
||||||
|
with the following sets of environment variables:
|
||||||
|
|
||||||
|
1) (Default environment.)
|
||||||
|
Test for heap block overruns.
|
||||||
|
|
||||||
|
2) EF_PROTECT_BELOW=1
|
||||||
|
Test for heap block underruns.
|
||||||
|
|
||||||
|
3) EF_PROTECT_FREE=1
|
||||||
|
Test for doubly-freed memory and illegal accesses to freed memory.
|
||||||
|
|
||||||
|
4) EF_ALIGNMENT=0
|
||||||
|
Test for very small block overruns. This is an important test, but
|
||||||
|
it may not work on some platforms. Please see the efence manpage for
|
||||||
|
more information.
|
||||||
|
|
||||||
|
(After each run, unset the environment variables from the previous run.)
|
||||||
|
|
||||||
|
Using a Bourne shell (such as bash) you can run all these tests as follows:
|
||||||
|
|
||||||
|
test
|
||||||
|
EF_PROTECT_BELOW=1 test
|
||||||
|
EF_PROTECT_FREE=1 test
|
||||||
|
EF_ALIGNMENT=0 test
|
||||||
|
|
||||||
|
Alternatively, if you have a copy of Purify installed, please run that.
|
||||||
|
|
||||||
|
|
||||||
|
End-to-End Tests
|
||||||
|
----------------
|
||||||
|
|
||||||
|
To test Abyss and the client XML transports, use the example
|
||||||
|
programs examples/sample_add_server and examples/sample_add_client:
|
||||||
|
|
||||||
|
$ export XMLRPC_TRACE_XML=1
|
||||||
|
$ examples/sample_add_server 8080&
|
||||||
|
$ examples/sample_add_client
|
||||||
|
|
||||||
|
Note that we use XMLRPC_TRACE_XML so we can see the XML flying by on
|
||||||
|
both sides of the connection.
|
||||||
|
|
||||||
|
Note that the Port 8080 is hardcoded in sample_add_client.
|
||||||
|
|
||||||
|
Note that sample_add_client uses only the default XML transport.
|
||||||
|
|
||||||
|
|
||||||
|
You can do more extensive client testing with the 'xmlrpc' program
|
||||||
|
(tools/xmlrpc/xmlrpc).
|
||||||
|
|
||||||
|
|
||||||
|
Tips
|
||||||
|
----
|
||||||
|
|
||||||
|
To debug Abyss without threads, don't pass -D_UNIX or -D_WIN32. The server
|
||||||
|
will run in a single-threaded mode.
|
68
libs/xmlrpc-c/doc/TODO
Normal file
68
libs/xmlrpc-c/doc/TODO
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
Here are some changes we'd like to see to Xmlrpc-c. While it's unlikely
|
||||||
|
anyone will ever do them, the list is at least useful as an indication of
|
||||||
|
what direction the maintainer wants the package to take, and that should
|
||||||
|
be useful to anyone proposing changes of any kind.
|
||||||
|
|
||||||
|
|
||||||
|
FUNCTIONAL CHANGES
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Make xmlrpc_server_abyss() catch a SIGTERM and terminate cleanly.
|
||||||
|
|
||||||
|
Make a system.shutdown XML-RPC method to send SIGTERM to its server.
|
||||||
|
Don't know what kind of security.
|
||||||
|
|
||||||
|
Provide an interface for Abyss servers where the user accepts the TCP
|
||||||
|
connection and passes to Xmlrpc-c the open socket. This would be
|
||||||
|
useful for inetd servers, among others.
|
||||||
|
|
||||||
|
Document the xmlrpc-c/server_abyss.hpp interface.
|
||||||
|
|
||||||
|
Implement pluggable XML transports on the server side like on the
|
||||||
|
client side.
|
||||||
|
|
||||||
|
Create a non-XML non-HTTP efficient transport, client and server.
|
||||||
|
The tools/binmode-rpc-kit/ directory might be useful. Consider XDR.
|
||||||
|
|
||||||
|
Make clients and servers reentrant (this requires getting or making
|
||||||
|
reentrant HTTP libraries).
|
||||||
|
|
||||||
|
Change the argument order of asynchronous response callbacks to be
|
||||||
|
more consistent with the xmlrpc_client_call_asynch function. Also
|
||||||
|
take a look at the server method callback.
|
||||||
|
|
||||||
|
Make an optional destructor function for XMLRPC_TYPE_C_PTR.
|
||||||
|
|
||||||
|
Return XMLRPC_LIMIT_EXCEEDED_ERROR when nesting limits are exceeded.
|
||||||
|
This will break binary and source API compatibility in a very minor
|
||||||
|
way.
|
||||||
|
|
||||||
|
Make a Perl interface to Xmlrpc-c libraries. This would be better than the
|
||||||
|
existing Perl RPC::XML modules because the latter are Perl all the way down
|
||||||
|
to the sockets and are thus very slow.
|
||||||
|
|
||||||
|
Don't use xmlrpc_value for things that aren't part of an XML-RPC call or
|
||||||
|
response. It's confusing. In particular, we use an xmlrpc_value
|
||||||
|
array to pass the parameters of an RPC to xmlrpc_client_call(), and it
|
||||||
|
should instead be a normal C array plus count, or variable argument list.
|
||||||
|
|
||||||
|
Don't use XML-RPC fault codes internally. It's confusing. Plus, there's
|
||||||
|
no need for fault codes at all. Just use the string descriptions.
|
||||||
|
|
||||||
|
|
||||||
|
IMPLEMENTATION CHANGES
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Replace dynamically created make files with static ones based on GNU make.
|
||||||
|
|
||||||
|
Use function pointers to access cleanup code in xmlrpc_DECREF?
|
||||||
|
|
||||||
|
Or even better: Should we create some kind of class-like system to declare
|
||||||
|
XML-RPC types, with a per-type dispatch table?
|
||||||
|
|
||||||
|
Fix abstract XML parser API to access children via functions named
|
||||||
|
xml_element_child(env,elem,index) and xml_element_child_count(env,elem).
|
||||||
|
Clean up corresponding client code.
|
||||||
|
|
||||||
|
Make the C++ server implementation less based on the C functions.
|
||||||
|
|
189
libs/xmlrpc-c/doc/configure_doc
Normal file
189
libs/xmlrpc-c/doc/configure_doc
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
Xmlrpc-c's 'configure' program is a GNU Autoconf configurator -- i.e.
|
||||||
|
it is created by GNU Autoconf. This is the standard configurator you
|
||||||
|
find throughout the open source software world. Here are the instructions
|
||||||
|
for 'configure' from GNU Autoconf; in most packages, you find these in
|
||||||
|
a file called INSTALL.
|
||||||
|
|
||||||
|
|
||||||
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
These are generic installation instructions.
|
||||||
|
|
||||||
|
The `configure' shell script attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a `Makefile' in each directory of the package.
|
||||||
|
It may also create one or more `.h' files containing system-dependent
|
||||||
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
|
you can run in the future to recreate the current configuration, a file
|
||||||
|
`config.cache' that saves the results of its tests to speed up
|
||||||
|
reconfiguring, and a file `config.log' containing compiler output
|
||||||
|
(useful mainly for debugging `configure').
|
||||||
|
|
||||||
|
If you need to do unusual things to compile the package, please try
|
||||||
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
|
diffs or instructions to the address given in the `README' so they can
|
||||||
|
be considered for the next release. If at some point `config.cache'
|
||||||
|
contains results you don't want to keep, you may remove or edit it.
|
||||||
|
|
||||||
|
The file `configure.in' is used to create `configure' by a program
|
||||||
|
called `autoconf'. You only need `configure.in' if you want to change
|
||||||
|
it or regenerate `configure' using a newer version of `autoconf'.
|
||||||
|
|
||||||
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
1. `cd' to the directory containing the package's source code and type
|
||||||
|
`./configure' to configure the package for your system. If you're
|
||||||
|
using `csh' on an old version of System V, you might need to type
|
||||||
|
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||||
|
`configure' itself.
|
||||||
|
|
||||||
|
Running `configure' takes awhile. While running, it prints some
|
||||||
|
messages telling which features it is checking for.
|
||||||
|
|
||||||
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
|
the package.
|
||||||
|
|
||||||
|
4. Type `make install' to install the programs and any data files and
|
||||||
|
documentation.
|
||||||
|
|
||||||
|
5. You can remove the program binaries and object files from the
|
||||||
|
source code directory by typing `make clean'. To also remove the
|
||||||
|
files that `configure' created (so you can compile the package for
|
||||||
|
a different kind of computer), type `make distclean'. There is
|
||||||
|
also a `make maintainer-clean' target, but that is intended mainly
|
||||||
|
for the package's developers. If you use it, you may have to get
|
||||||
|
all sorts of other programs in order to regenerate files that came
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
Compilers and Options
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some systems require unusual options for compilation or linking that
|
||||||
|
the `configure' script does not know about. You can give `configure'
|
||||||
|
initial values for variables by setting them in the environment. Using
|
||||||
|
a Bourne-compatible shell, you can do that on the command line like
|
||||||
|
this:
|
||||||
|
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||||
|
|
||||||
|
Or on systems that have the `env' program, you can do it like this:
|
||||||
|
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||||
|
|
||||||
|
Compiling For Multiple Architectures
|
||||||
|
====================================
|
||||||
|
|
||||||
|
You can compile the package for more than one kind of computer at the
|
||||||
|
same time, by placing the object files for each architecture in their
|
||||||
|
own directory. To do this, you must use a version of `make' that
|
||||||
|
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||||
|
directory where you want the object files and executables to go and run
|
||||||
|
the `configure' script. `configure' automatically checks for the
|
||||||
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
|
If you have to use a `make' that does not supports the `VPATH'
|
||||||
|
variable, you have to compile the package for one architecture at a time
|
||||||
|
in the source code directory. After you have installed the package for
|
||||||
|
one architecture, use `make distclean' before reconfiguring for another
|
||||||
|
architecture.
|
||||||
|
|
||||||
|
Installation Names
|
||||||
|
==================
|
||||||
|
|
||||||
|
By default, `make install' will install the package's files in
|
||||||
|
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||||
|
installation prefix other than `/usr/local' by giving `configure' the
|
||||||
|
option `--prefix=PATH'.
|
||||||
|
|
||||||
|
You can specify separate installation prefixes for
|
||||||
|
architecture-specific files and architecture-independent files. If you
|
||||||
|
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||||
|
PATH as the prefix for installing programs and libraries.
|
||||||
|
Documentation and other data files will still use the regular prefix.
|
||||||
|
|
||||||
|
In addition, if you use an unusual directory layout you can give
|
||||||
|
options like `--bindir=PATH' to specify different values for particular
|
||||||
|
kinds of files. Run `configure --help' for a list of the directories
|
||||||
|
you can set and what kinds of files go in them.
|
||||||
|
|
||||||
|
If the package supports it, you can cause programs to be installed
|
||||||
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
|
Optional Features
|
||||||
|
=================
|
||||||
|
|
||||||
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
|
package recognizes.
|
||||||
|
|
||||||
|
For packages that use the X Window System, `configure' can usually
|
||||||
|
find the X include and library files automatically, but if it doesn't,
|
||||||
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Specifying the System Type
|
||||||
|
==========================
|
||||||
|
|
||||||
|
There may be some features `configure' can not figure out
|
||||||
|
automatically, but needs to determine by the type of host the package
|
||||||
|
will run on. Usually `configure' can figure that out, but if it prints
|
||||||
|
a message saying it can not guess the host type, give it the
|
||||||
|
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name with three fields:
|
||||||
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the host type.
|
||||||
|
|
||||||
|
If you are building compiler tools for cross-compiling, you can also
|
||||||
|
use the `--target=TYPE' option to select the type of system they will
|
||||||
|
produce code for and the `--build=TYPE' option to select the type of
|
||||||
|
system on which you are compiling the package.
|
||||||
|
|
||||||
|
Sharing Defaults
|
||||||
|
================
|
||||||
|
|
||||||
|
If you want to set default values for `configure' scripts to share,
|
||||||
|
you can create a site shell script called `config.site' that gives
|
||||||
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
|
Operation Controls
|
||||||
|
==================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it
|
||||||
|
operates.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Use and save the results of the tests in FILE instead of
|
||||||
|
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||||
|
debugging `configure'.
|
||||||
|
|
||||||
|
`--help'
|
||||||
|
Print a summary of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--quiet'
|
||||||
|
`--silent'
|
||||||
|
`-q'
|
||||||
|
Do not print messages saying which checks are being made. To
|
||||||
|
suppress all normal output, redirect it to `/dev/null' (any error
|
||||||
|
messages will still be shown).
|
||||||
|
|
||||||
|
`--srcdir=DIR'
|
||||||
|
Look for the package's source code in directory DIR. Usually
|
||||||
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`configure' also accepts some other, not widely useful, options.
|
11
libs/xmlrpc-c/examples/.cvsignore
Normal file
11
libs/xmlrpc-c/examples/.cvsignore
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
gen_sample_add_xml
|
||||||
|
meerkat-app-list
|
||||||
|
query-meerkat
|
||||||
|
synch_client
|
||||||
|
xmlrpc_asynch_client
|
||||||
|
auth_client
|
||||||
|
xmlrpc_loop_server
|
||||||
|
xmlrpc_sample_add_client
|
||||||
|
xmlrpc_sample_add_server
|
||||||
|
xmlrpc_server_validatee
|
||||||
|
*.cgi
|
139
libs/xmlrpc-c/examples/Makefile
Normal file
139
libs/xmlrpc-c/examples/Makefile
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
# Since the programs in this directories are examples for the user, this
|
||||||
|
# make file should be as ordinary as possible. It should not rely heavily
|
||||||
|
# on included make files or configuration parameters. It should not use
|
||||||
|
# libtool. Also, we don't try to build or rebuild the libraries on which
|
||||||
|
# these programs depend.
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(SRCDIR)x,x)
|
||||||
|
SRCDIR = $(CURDIR)/..
|
||||||
|
BUILDDIR = $(SRCDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
include $(BUILDDIR)/Makefile.config
|
||||||
|
|
||||||
|
CFLAGS = $(CFLAGS_COMMON) $(CFLAGS_PERSONAL) $(CADD)
|
||||||
|
LDFLAGS = $(LADD)
|
||||||
|
|
||||||
|
# If this were a real application, working from an installed copy of
|
||||||
|
# Xmlrpc-c, XMLRPC_C_CONFIG would just be 'xmlrpc-c-config'. It would be
|
||||||
|
# found in the user's PATH.
|
||||||
|
XMLRPC_C_CONFIG = $(BUILDDIR)/xmlrpc-c-config.test
|
||||||
|
|
||||||
|
CLIENTPROGS = \
|
||||||
|
auth_client \
|
||||||
|
query-meerkat \
|
||||||
|
synch_client \
|
||||||
|
xmlrpc_sample_add_client \
|
||||||
|
xmlrpc_asynch_client \
|
||||||
|
|
||||||
|
SERVERPROGS_CGI = \
|
||||||
|
xmlrpc_sample_add_server.cgi
|
||||||
|
|
||||||
|
SERVERPROGS_ABYSS = \
|
||||||
|
xmlrpc_loop_server \
|
||||||
|
xmlrpc_sample_add_server \
|
||||||
|
xmlrpc_server_validatee \
|
||||||
|
|
||||||
|
# Build up PROGS:
|
||||||
|
PROGS =
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_ABYSS_SERVER),yes)
|
||||||
|
PROGS += $(SERVERPROGS_ABYSS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
PROGS += gen_sample_add_xml
|
||||||
|
|
||||||
|
ifeq ($(MUST_BUILD_CLIENT),yes)
|
||||||
|
PROGS += $(CLIENTPROGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_CGI_SERVER),yes)
|
||||||
|
PROGS += $(SERVERPROGS_CGI)
|
||||||
|
endif
|
||||||
|
|
||||||
|
INCLUDES = $(shell $(XMLRPC_C_CONFIG) client abyss-server --cflags)
|
||||||
|
|
||||||
|
LDADD_CLIENT = \
|
||||||
|
$(shell $(XMLRPC_C_CONFIG) client --ldadd)
|
||||||
|
|
||||||
|
LDADD_SERVER_ABYSS = \
|
||||||
|
$(shell $(XMLRPC_C_CONFIG) abyss-server --ldadd)
|
||||||
|
|
||||||
|
LDADD_SERVER_CGI = \
|
||||||
|
$(shell $(XMLRPC_C_CONFIG) cgi-server --ldadd)
|
||||||
|
|
||||||
|
LDADD_BASE = \
|
||||||
|
$(shell $(XMLRPC_C_CONFIG) --ldadd)
|
||||||
|
|
||||||
|
all: $(PROGS)
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_CPLUSPLUS),yes)
|
||||||
|
all: cpp/all
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: cpp/all
|
||||||
|
cpp/all:
|
||||||
|
$(MAKE) -C $(dir $@) $(notdir $@)
|
||||||
|
|
||||||
|
$(CLIENTPROGS):%:%.o
|
||||||
|
$(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_CLIENT)
|
||||||
|
|
||||||
|
$(SERVERPROGS_CGI):%.cgi:%_cgi.o
|
||||||
|
$(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_SERVER_CGI)
|
||||||
|
|
||||||
|
$(SERVERPROGS_ABYSS):%:%.o
|
||||||
|
$(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_SERVER_ABYSS)
|
||||||
|
|
||||||
|
gen_sample_add_xml:%:%.o
|
||||||
|
$(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_BASE)
|
||||||
|
|
||||||
|
%.o:%.c
|
||||||
|
$(CC) -c $(INCLUDES) $(CFLAGS) $<
|
||||||
|
|
||||||
|
*.c: config.h xmlrpc_amconfig.h
|
||||||
|
|
||||||
|
config.h:
|
||||||
|
$(LN_S) $(BUILDDIR)/xmlrpc_config.h $@
|
||||||
|
xmlrpc_amconfig.h:
|
||||||
|
$(LN_S) $(BUILDDIR)/$@ .
|
||||||
|
|
||||||
|
include $(SRCDIR)/Makefile.common
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean: clean-common
|
||||||
|
rm -f $(PROGS) config.h xmlrpc_amconfig.h
|
||||||
|
$(MAKE) -C cpp clean
|
||||||
|
|
||||||
|
.PHONY: distclean
|
||||||
|
distclean: clean
|
||||||
|
|
||||||
|
BINDIR=$(DESTDIR)$(bindir)
|
||||||
|
|
||||||
|
FILENAME_GENERATOR = "echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'"
|
||||||
|
|
||||||
|
INSTCMD = "$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p \
|
||||||
|
$(BINDIR)/`$(FILENAME_GENERATOR)`"
|
||||||
|
|
||||||
|
.PHONY: install
|
||||||
|
install: $(PROGS)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
$(MKINSTALLDIRS) $(BINDIR)
|
||||||
|
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||||
|
if test -f $$p; then \
|
||||||
|
echo "$(INSTCMD)"; $(INSTCMD); \
|
||||||
|
else :; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
.PHONY: check
|
||||||
|
check:
|
||||||
|
|
||||||
|
.PHONY: dep depend
|
||||||
|
dep depend:
|
||||||
|
# We don't do dependencies in this directory, because it's supposed to be
|
||||||
|
# an example of what a program outside this package would do, so we can't
|
||||||
|
# go weaving it into the rest of the package. Ergo, a developer must
|
||||||
|
# carefully clean and remake examples as he updates other parts of the tree.
|
34
libs/xmlrpc-c/examples/README
Normal file
34
libs/xmlrpc-c/examples/README
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
This directory contains working examples of uses of XML-RPC-c. There
|
||||||
|
are XML-RPC servers and XML-RPC clients that use the Xmlrpc-c libraries.
|
||||||
|
|
||||||
|
The simplest example is the 'query-meerkat' program, which contacts an
|
||||||
|
XML-RPC server that O'Reilly operates on the Internet called Meerkat.
|
||||||
|
Meerkat provides an RPC that returns a list of new articles that match
|
||||||
|
a specified search pattern. Run 'query-meerkat' like this example:
|
||||||
|
|
||||||
|
$ ./query-meerkat Linux
|
||||||
|
|
||||||
|
This responds with a list of new articles that contain the work "Linux",
|
||||||
|
according to O'reilly's Meerkat service.
|
||||||
|
|
||||||
|
|
||||||
|
The simplest server program is 'xmlrpc_sample_add_server'. This
|
||||||
|
implements a single XML-RPC method called 'sample.add'. All it does is
|
||||||
|
add two numbers and return the sum. You can run such a server like
|
||||||
|
this:
|
||||||
|
|
||||||
|
$ ./xmlrpc_sample_add_server 8080
|
||||||
|
|
||||||
|
The server this runs is based on the Abyss HTTP server. file. The
|
||||||
|
argument tell it to listen on TCP Port 8080 for RPCs. It puts log
|
||||||
|
information in /tmp, so be sure to look there.
|
||||||
|
|
||||||
|
A client program that goes along with this server is
|
||||||
|
'xmlrpc_sample_add_client'. All this client does is make an XML-RPC
|
||||||
|
request to Port 8080 of 'localhost' to add the numbers 5 and 7 and
|
||||||
|
print the result on Standard Output.
|
||||||
|
|
||||||
|
You can run such a client like this:
|
||||||
|
|
||||||
|
$ ./xmlrpc_sample_add_client
|
||||||
|
|
80
libs/xmlrpc-c/examples/auth_client.c
Normal file
80
libs/xmlrpc-c/examples/auth_client.c
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
/* A demonstration of using HTTP basic authentication with XML-RPC.
|
||||||
|
**
|
||||||
|
** In general, you shouldn't write XML-RPC servers which require basic
|
||||||
|
** authenticaion. (Few XML-RPC clients are capable of it, and it's not part of
|
||||||
|
** any standard.) Instead, you should pass any authentication information
|
||||||
|
** as a regular XML-RPC parameter (or look into using SSL).
|
||||||
|
**
|
||||||
|
** But certain XML-RPC servers, including Zope, rely heavily on HTTP
|
||||||
|
** basic authentication. Here's how to talk to them. */
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/client.h>
|
||||||
|
|
||||||
|
#include "config.h" /* information about this build environment */
|
||||||
|
|
||||||
|
#define NAME "XML-RPC C Auth Client"
|
||||||
|
#define VERSION "1.0"
|
||||||
|
#define SERVER_URL "http://localhost:8080/RPC2"
|
||||||
|
|
||||||
|
static void die_if_fault_occurred (xmlrpc_env *env)
|
||||||
|
{
|
||||||
|
if (env->fault_occurred) {
|
||||||
|
fprintf(stderr, "XML-RPC Fault: %s (%d)\n",
|
||||||
|
env->fault_string, env->fault_code);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int const argc,
|
||||||
|
const char ** const argv ATTR_UNUSED) {
|
||||||
|
|
||||||
|
xmlrpc_env env;
|
||||||
|
xmlrpc_server_info * server;
|
||||||
|
xmlrpc_value * result;
|
||||||
|
xmlrpc_int sum;
|
||||||
|
|
||||||
|
if (argc-1 > 0) {
|
||||||
|
fprintf(stderr, "There are no arguments. You specified %d", argc-1);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Start up our XML-RPC client library. */
|
||||||
|
xmlrpc_client_init(XMLRPC_CLIENT_NO_FLAGS, NAME, VERSION);
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
/* Make a new object to represent our XML-RPC server. */
|
||||||
|
server = xmlrpc_server_info_new(&env, SERVER_URL);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
/* Set up our authentication information. */
|
||||||
|
xmlrpc_server_info_set_basic_auth(&env, server, "jrandom", "secret");
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
result =
|
||||||
|
xmlrpc_client_call_server(
|
||||||
|
&env, server, "sample.add", "(ii)",
|
||||||
|
(xmlrpc_int32) 5, (xmlrpc_int32) 7);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
/* Dispose of our server object. */
|
||||||
|
xmlrpc_server_info_free(server);
|
||||||
|
|
||||||
|
/* Get the authentication information and print it out. */
|
||||||
|
xmlrpc_read_int(&env, result, &sum);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
printf("The sum is %d\n", sum);
|
||||||
|
|
||||||
|
/* Dispose of our result value. */
|
||||||
|
xmlrpc_DECREF(result);
|
||||||
|
|
||||||
|
/* Shut down our XML-RPC client library. */
|
||||||
|
xmlrpc_env_clean(&env);
|
||||||
|
xmlrpc_client_cleanup();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
4
libs/xmlrpc-c/examples/cpp/.cvsignore
Normal file
4
libs/xmlrpc-c/examples/cpp/.cvsignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
meerkat-app-list
|
||||||
|
xmlrpc_sample_add_server
|
||||||
|
xmlrpc_sample_add_client
|
||||||
|
sample_add_client_complex
|
96
libs/xmlrpc-c/examples/cpp/Makefile
Normal file
96
libs/xmlrpc-c/examples/cpp/Makefile
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
# Since the programs in this directories are examples for the user, this
|
||||||
|
# make file should be as ordinary as possible. It should not rely heavily
|
||||||
|
# on included make files or configuration parameters. It should not use
|
||||||
|
# libtool. Also, we don't try to build or rebuild the libraries on which
|
||||||
|
# these programs depend.
|
||||||
|
|
||||||
|
|
||||||
|
ifeq ($(SRCDIR)x,x)
|
||||||
|
SRCDIR = $(CURDIR)/../..
|
||||||
|
BUILDDIR = $(SRCDIR)
|
||||||
|
endif
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
include $(BUILDDIR)/Makefile.config
|
||||||
|
|
||||||
|
CXXFLAGS = $(CXXFLAGS_COMMON) $(CFLAGS_PERSONAL) $(CADD)
|
||||||
|
LDFLAGS = $(LADD)
|
||||||
|
|
||||||
|
# If this were a real application, working from an installed copy of
|
||||||
|
# Xmlrpc-c, XMLRPC_C_CONFIG would just be 'xmlrpc-c-config'. It would be
|
||||||
|
# found in the user's PATH.
|
||||||
|
XMLRPC_C_CONFIG = $(BUILDDIR)/xmlrpc-c-config.test
|
||||||
|
|
||||||
|
|
||||||
|
SERVERPROGS_ABYSS = \
|
||||||
|
xmlrpc_sample_add_server \
|
||||||
|
|
||||||
|
LEGACY_CLIENTPROGS = \
|
||||||
|
meerkat-app-list
|
||||||
|
|
||||||
|
CLIENTPROGS = \
|
||||||
|
xmlrpc_sample_add_client \
|
||||||
|
sample_add_client_complex \
|
||||||
|
|
||||||
|
# Build up PROGS:
|
||||||
|
PROGS =
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_ABYSS_SERVER),yes)
|
||||||
|
PROGS += $(SERVERPROGS_ABYSS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(MUST_BUILD_CLIENT),yes)
|
||||||
|
PROGS += $(CLIENTPROGS) $(LEGACY_CLIENTPROGS)
|
||||||
|
endif
|
||||||
|
|
||||||
|
INCLUDES = $(shell $(XMLRPC_C_CONFIG) c++2 client abyss-server --cflags)
|
||||||
|
|
||||||
|
LDADD_SERVER_ABYSS = \
|
||||||
|
$(shell $(XMLRPC_C_CONFIG) c++2 abyss-server --ldadd)
|
||||||
|
|
||||||
|
LDADD_CLIENT = \
|
||||||
|
$(shell $(XMLRPC_C_CONFIG) c++2 client --ldadd)
|
||||||
|
|
||||||
|
LDADD_BASE = \
|
||||||
|
$(shell $(XMLRPC_C_CONFIG) c++2 --ldadd)
|
||||||
|
|
||||||
|
LDADD_LEGACY_CLIENT = \
|
||||||
|
$(shell $(XMLRPC_C_CONFIG) c++ client --ldadd)
|
||||||
|
|
||||||
|
all: $(PROGS)
|
||||||
|
|
||||||
|
$(SERVERPROGS_ABYSS):%:%.o
|
||||||
|
$(CXXLD) -o $@ $(LDFLAGS) $^ $(LDADD_SERVER_ABYSS)
|
||||||
|
|
||||||
|
$(LEGACY_CLIENTPROGS):%:%.o
|
||||||
|
$(CXXLD) -o $@ $(LDFLAGS) $^ $(LDADD_LEGACY_CLIENT)
|
||||||
|
|
||||||
|
$(CLIENTPROGS):%:%.o
|
||||||
|
$(CXXLD) -o $@ $(LDFLAGS) $^ $(LDADD_CLIENT)
|
||||||
|
|
||||||
|
%.o:%.cpp
|
||||||
|
$(CXX) -c $(INCLUDES) $(CXXFLAGS) $<
|
||||||
|
|
||||||
|
*.c: config.h xmlrpc_amconfig.h
|
||||||
|
|
||||||
|
config.h:
|
||||||
|
$(LN_S) $(BUILDDIR)/xmlrpc_config.h $@
|
||||||
|
xmlrpc_amconfig.h:
|
||||||
|
$(LN_S) $(BUILDDIR)/$@ .
|
||||||
|
|
||||||
|
include $(SRCDIR)/Makefile.common
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean: clean-common
|
||||||
|
rm -f $(PROGS) config.h xmlrpc_amconfig.h
|
||||||
|
|
||||||
|
.PHONY: distclean
|
||||||
|
distclean: clean
|
||||||
|
|
||||||
|
.PHONY: dep depend
|
||||||
|
dep depend:
|
||||||
|
# We don't do dependencies in this directory, because it's supposed to be
|
||||||
|
# an example of what a program outside this package would do, so we can't
|
||||||
|
# go weaving it into the rest of the package. Ergo, a developer must
|
||||||
|
# carefully clean and remake examples as he updates other parts of the tree.
|
108
libs/xmlrpc-c/examples/cpp/meerkat-app-list.cpp
Normal file
108
libs/xmlrpc-c/examples/cpp/meerkat-app-list.cpp
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
// List recently-released Linux applications. (Written in C++.)
|
||||||
|
// For more details about O'Reilly's excellent Meerkat news service, see:
|
||||||
|
// http://www.oreillynet.com/pub/a/rss/2000/11/14/meerkat_xmlrpc.html */
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
#include <xmlrpc-c/oldcppwrapper.hpp>
|
||||||
|
|
||||||
|
#define NAME "XML-RPC C++ Meerkat Query Demo"
|
||||||
|
#define VERSION "0.1"
|
||||||
|
#define MEERKAT_URL "http://www.oreillynet.com/meerkat/xml-rpc/server.php"
|
||||||
|
#define SOFTWARE_LINUX (6)
|
||||||
|
|
||||||
|
static void list_apps (int hours) {
|
||||||
|
|
||||||
|
// Build our time_period parameter.
|
||||||
|
ostringstream time_period_stream;
|
||||||
|
time_period_stream << hours << "HOUR";
|
||||||
|
string time_period = time_period_stream.str();
|
||||||
|
|
||||||
|
// Assemble our meerkat query recipe.
|
||||||
|
XmlRpcValue recipe = XmlRpcValue::makeStruct();
|
||||||
|
recipe.structSetValue("category", XmlRpcValue::makeInt(SOFTWARE_LINUX));
|
||||||
|
recipe.structSetValue("time_period", XmlRpcValue::makeString(time_period));
|
||||||
|
recipe.structSetValue("descriptions", XmlRpcValue::makeInt(76));
|
||||||
|
|
||||||
|
// Build our parameter array.
|
||||||
|
XmlRpcValue param_array = XmlRpcValue::makeArray();
|
||||||
|
param_array.arrayAppendItem(recipe);
|
||||||
|
|
||||||
|
// Create a client pointing to Meerkat.
|
||||||
|
XmlRpcClient meerkat (MEERKAT_URL);
|
||||||
|
|
||||||
|
// Perform the query.
|
||||||
|
XmlRpcValue apps = meerkat.call("meerkat.getItems", param_array);
|
||||||
|
|
||||||
|
// Print our results.
|
||||||
|
int first = 1;
|
||||||
|
size_t app_count = apps.arraySize();
|
||||||
|
for (size_t i = 0; i < app_count; i++) {
|
||||||
|
XmlRpcValue app = apps.arrayGetItem(i);
|
||||||
|
|
||||||
|
// Get some information about our application.
|
||||||
|
string title = app.structGetValue("title").getString();
|
||||||
|
string link = app.structGetValue("link").getString();
|
||||||
|
string description = app.structGetValue("description").getString();
|
||||||
|
|
||||||
|
// Print a separator line if necessary.
|
||||||
|
if (first)
|
||||||
|
first = 0;
|
||||||
|
else
|
||||||
|
cout << endl;
|
||||||
|
|
||||||
|
// Print this application entry.
|
||||||
|
if (description.size() > 0) {
|
||||||
|
cout << title << endl << description << endl << link << endl;
|
||||||
|
} else {
|
||||||
|
cout << title << endl << description << endl << link << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Print out a usage message.
|
||||||
|
static void usage (void)
|
||||||
|
{
|
||||||
|
cerr << "Usage: meekat-app-list [hours]" << endl;
|
||||||
|
cerr << "Data from <http://www.oreillynet.com/meerkat/>." << endl;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main (int argc, char **argv) {
|
||||||
|
int status = 0;
|
||||||
|
int hours = 25;
|
||||||
|
|
||||||
|
// Parse our command-line arguments.
|
||||||
|
if (argc == 1) {
|
||||||
|
// Use default value for hours.
|
||||||
|
} else if (argc == 2) {
|
||||||
|
hours = atoi(argv[1]);
|
||||||
|
}
|
||||||
|
if (hours == 0)
|
||||||
|
usage();
|
||||||
|
if (hours > 49) {
|
||||||
|
cerr << "It's not nice to ask for > 49 hours at once." << endl;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start up our client library.
|
||||||
|
XmlRpcClient::Initialize(NAME, VERSION);
|
||||||
|
|
||||||
|
// Call our implementation, and watch out for faults.
|
||||||
|
try {
|
||||||
|
list_apps(hours);
|
||||||
|
} catch (XmlRpcFault& fault) {
|
||||||
|
cerr << argv[0] << ": XML-RPC fault #" << fault.getFaultCode()
|
||||||
|
<< ": " << fault.getFaultString() << endl;
|
||||||
|
status = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Shut down our client library.
|
||||||
|
XmlRpcClient::Terminate();
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
68
libs/xmlrpc-c/examples/cpp/sample_add_client_complex.cpp
Normal file
68
libs/xmlrpc-c/examples/cpp/sample_add_client_complex.cpp
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*=============================================================================
|
||||||
|
sample_add_client_complex.cpp
|
||||||
|
===============================================================================
|
||||||
|
This is an example of an XML-RPC client that uses XML-RPC for C/C++
|
||||||
|
(Xmlrpc-c).
|
||||||
|
|
||||||
|
In particular, it uses the complex lower-level interface that gives you
|
||||||
|
lots of flexibility but requires lots of code. Also see
|
||||||
|
xmlrpc_sample_add_server, which does the same thing as this program,
|
||||||
|
but with much simpler code because it uses a simpler facility of
|
||||||
|
Xmlrpc-c.
|
||||||
|
|
||||||
|
This program actually gains nothing from using the more difficult
|
||||||
|
facility. It is for demonstration purposes.
|
||||||
|
=============================================================================*/
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
#include <xmlrpc-c/girerr.hpp>
|
||||||
|
#include <xmlrpc-c/base.hpp>
|
||||||
|
#include <xmlrpc-c/client.hpp>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char **) {
|
||||||
|
|
||||||
|
if (argc-1 > 0) {
|
||||||
|
cerr << "This program has no arguments" << endl;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
xmlrpc_c::clientXmlTransport_curl myTransport;
|
||||||
|
xmlrpc_c::client_xml myClient(&myTransport);
|
||||||
|
|
||||||
|
string const methodName("sample.add");
|
||||||
|
|
||||||
|
xmlrpc_c::paramList sampleAddParms;
|
||||||
|
sampleAddParms.add(xmlrpc_c::value_int(5));
|
||||||
|
sampleAddParms.add(xmlrpc_c::value_int(7));
|
||||||
|
|
||||||
|
xmlrpc_c::rpcPtr myRpcP(methodName, sampleAddParms);
|
||||||
|
|
||||||
|
string const serverUrl("http://localhost:8080/RPC2");
|
||||||
|
|
||||||
|
xmlrpc_c::carriageParm_curl0 myCarriageParm(serverUrl);
|
||||||
|
|
||||||
|
xmlrpc_c::value result;
|
||||||
|
|
||||||
|
myRpcP->call(&myClient, &myCarriageParm);
|
||||||
|
|
||||||
|
assert(myRpcP->isFinished());
|
||||||
|
|
||||||
|
int const sum(xmlrpc_c::value_int(myRpcP->getResult()));
|
||||||
|
// Assume the method returned an integer; throws error if not
|
||||||
|
|
||||||
|
cout << "Result of RPC (sum of 5 and 7): " << sum << endl;
|
||||||
|
|
||||||
|
} catch (girerr::error const error) {
|
||||||
|
cerr << "Client threw error: " << error.what() << endl;
|
||||||
|
} catch (...) {
|
||||||
|
cerr << "Client threw unexpected error." << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
38
libs/xmlrpc-c/examples/cpp/xmlrpc_sample_add_client.cpp
Normal file
38
libs/xmlrpc-c/examples/cpp/xmlrpc_sample_add_client.cpp
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
#include <xmlrpc-c/girerr.hpp>
|
||||||
|
#include <xmlrpc-c/base.hpp>
|
||||||
|
#include <xmlrpc-c/client_simple.hpp>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char **) {
|
||||||
|
|
||||||
|
if (argc-1 > 0) {
|
||||||
|
cerr << "This program has no arguments" << endl;
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
string const serverUrl("http://localhost:8080/RPC2");
|
||||||
|
string const methodName("sample.add");
|
||||||
|
|
||||||
|
xmlrpc_c::clientSimple myClient;
|
||||||
|
xmlrpc_c::value result;
|
||||||
|
|
||||||
|
myClient.call(serverUrl, methodName, "ii", &result, 5, 7);
|
||||||
|
|
||||||
|
int const sum = xmlrpc_c::value_int(result);
|
||||||
|
// Assume the method returned an integer; throws error if not
|
||||||
|
|
||||||
|
cout << "Result of RPC (sum of 5 and 7): " << sum << endl;
|
||||||
|
|
||||||
|
} catch (girerr::error const error) {
|
||||||
|
cerr << "Client threw error: " << error.what() << endl;
|
||||||
|
} catch (...) {
|
||||||
|
cerr << "Client threw unexpected error." << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
55
libs/xmlrpc-c/examples/cpp/xmlrpc_sample_add_server.cpp
Normal file
55
libs/xmlrpc-c/examples/cpp/xmlrpc_sample_add_server.cpp
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
#include <cassert>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.hpp>
|
||||||
|
#include <xmlrpc-c/registry.hpp>
|
||||||
|
#include <xmlrpc-c/server_abyss.hpp>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
class sampleAddMethod : public xmlrpc_c::method {
|
||||||
|
public:
|
||||||
|
sampleAddMethod() {
|
||||||
|
// signature and help strings are documentation -- the client
|
||||||
|
// can query this information with a system.methodSignature and
|
||||||
|
// system.methodHelp RPC.
|
||||||
|
this->_signature = "i:ii";
|
||||||
|
// method's result and two arguments are integers
|
||||||
|
this->_help = "This method adds two integers together";
|
||||||
|
}
|
||||||
|
void
|
||||||
|
execute(xmlrpc_c::paramList const& paramList,
|
||||||
|
xmlrpc_c::value * const retvalP) {
|
||||||
|
|
||||||
|
int const addend(paramList.getInt(0));
|
||||||
|
int const adder(paramList.getInt(1));
|
||||||
|
|
||||||
|
paramList.verifyEnd(2);
|
||||||
|
|
||||||
|
*retvalP = xmlrpc_c::value_int(addend + adder);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int const,
|
||||||
|
const char ** const) {
|
||||||
|
|
||||||
|
xmlrpc_c::registry myRegistry;
|
||||||
|
|
||||||
|
xmlrpc_c::methodPtr const sampleAddMethodP(new sampleAddMethod);
|
||||||
|
|
||||||
|
myRegistry.addMethod("sample.add", sampleAddMethodP);
|
||||||
|
|
||||||
|
xmlrpc_c::serverAbyss myAbyssServer(
|
||||||
|
myRegistry,
|
||||||
|
8080, // TCP port on which to listen
|
||||||
|
"/tmp/xmlrpc_log" // Log file
|
||||||
|
);
|
||||||
|
|
||||||
|
myAbyssServer.run();
|
||||||
|
// xmlrpc_c::serverAbyss.run() never returns
|
||||||
|
assert(false);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
73
libs/xmlrpc-c/examples/gen_sample_add_xml.c
Normal file
73
libs/xmlrpc-c/examples/gen_sample_add_xml.c
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
/* This program generates on Standard Output the XML for an XML-RPC
|
||||||
|
call suitable for the xmlrpc_sample_add_server program.
|
||||||
|
|
||||||
|
This is the same XML that the xmlrpc_sample_add_client program sends.
|
||||||
|
|
||||||
|
Use this either as an example of how to use the Xmlrpc-c XML-generating
|
||||||
|
functions or to generate XML that you can use to test an XML-RPC
|
||||||
|
server.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
static void
|
||||||
|
die_if_fault_occurred (xmlrpc_env *env) {
|
||||||
|
if (env->fault_occurred) {
|
||||||
|
fprintf(stderr, "XML-RPC Fault: %s (%d)\n",
|
||||||
|
env->fault_string, env->fault_code);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int const argc,
|
||||||
|
const char ** const argv ATTR_UNUSED) {
|
||||||
|
|
||||||
|
char * const methodName = "sample.add";
|
||||||
|
|
||||||
|
xmlrpc_env env;
|
||||||
|
xmlrpc_value * params;
|
||||||
|
xmlrpc_mem_block * xmlmemblockP;
|
||||||
|
|
||||||
|
if (argc-1 > 0) {
|
||||||
|
fprintf(stderr, "This program has no arguments\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize our error-handling environment. */
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
params = xmlrpc_build_value(&env, "(ii)",
|
||||||
|
(xmlrpc_int32) 5, (xmlrpc_int32) 7);
|
||||||
|
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
xmlmemblockP = XMLRPC_MEMBLOCK_NEW(char, &env, 0);
|
||||||
|
|
||||||
|
xmlrpc_serialize_call(&env, xmlmemblockP, methodName, params);
|
||||||
|
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
fwrite(XMLRPC_MEMBLOCK_CONTENTS(char, xmlmemblockP),
|
||||||
|
sizeof(char),
|
||||||
|
XMLRPC_MEMBLOCK_SIZE(char, xmlmemblockP),
|
||||||
|
stdout);
|
||||||
|
|
||||||
|
XMLRPC_MEMBLOCK_FREE(char, xmlmemblockP);
|
||||||
|
|
||||||
|
/* Dispose of our parameter array. */
|
||||||
|
xmlrpc_DECREF(params);
|
||||||
|
|
||||||
|
/* Clean up our error-handling environment. */
|
||||||
|
xmlrpc_env_clean(&env);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
156
libs/xmlrpc-c/examples/query-meerkat.c
Normal file
156
libs/xmlrpc-c/examples/query-meerkat.c
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
/* A simple news-searcher, written in C to demonstrate how to use the
|
||||||
|
xmplrpc-c client library.
|
||||||
|
|
||||||
|
This program connects to an XMLRPC server that O'Reilly runs on the
|
||||||
|
Internet, gets some information, and displays it on Standard Output.
|
||||||
|
|
||||||
|
Note that that server is not in any way designed specifically for xmlrpc-c.
|
||||||
|
It simply implements the XMLRPC protocol, and works with any client that
|
||||||
|
implements XMLRPC.
|
||||||
|
|
||||||
|
The service that the aforementioned server provides is that it gives you
|
||||||
|
a list of news articles that match a certain regular expression. You give
|
||||||
|
that regular expression an argument to this client program.
|
||||||
|
|
||||||
|
For more details about O'Reilly's excellent Meerkat news service, see:
|
||||||
|
http://www.oreillynet.com/pub/a/rss/2000/11/14/meerkat_xmlrpc.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/client.h>
|
||||||
|
|
||||||
|
#include "config.h" /* information about this build environment */
|
||||||
|
|
||||||
|
#define NAME "XML-RPC C Meerkat Query Demo"
|
||||||
|
#define VERSION "1.0"
|
||||||
|
#define MEERKAT_URL "http://www.oreillynet.com/meerkat/xml-rpc/server.php"
|
||||||
|
|
||||||
|
struct cmdline {
|
||||||
|
const char * searchArg;
|
||||||
|
int hours;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
parseCommandLine(int const argc,
|
||||||
|
const char ** const argv,
|
||||||
|
struct cmdline * const cmdlineP) {
|
||||||
|
|
||||||
|
if (argc-1 < 1) {
|
||||||
|
fprintf(stderr, "Need at least one argument: "
|
||||||
|
"A mysql regular expression "
|
||||||
|
"search pattern. Try 'query-meerkat Linux'\n");
|
||||||
|
exit(1);
|
||||||
|
} else {
|
||||||
|
cmdlineP->searchArg = argv[1];
|
||||||
|
|
||||||
|
if (argc-1 < 2) {
|
||||||
|
cmdlineP->hours = 24;
|
||||||
|
} else {
|
||||||
|
cmdlineP->hours = atoi(argv[2]);
|
||||||
|
if (cmdlineP->hours > 49) {
|
||||||
|
fprintf(stderr, "It's not nice to ask for > 49 hours "
|
||||||
|
"at once.\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
if (argc-1 > 2) {
|
||||||
|
fprintf(stderr, "There are at most 2 arguments: "
|
||||||
|
"search pattern "
|
||||||
|
"and number of hours.");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
die_if_fault_occurred(xmlrpc_env * const env) {
|
||||||
|
/* We're a command-line utility, so we abort if an error occurs. */
|
||||||
|
if (env->fault_occurred) {
|
||||||
|
fprintf(stderr, "XML-RPC Fault #%d: %s\n",
|
||||||
|
env->fault_code, env->fault_string);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Hey! We fit in one function. */
|
||||||
|
int
|
||||||
|
main(int const argc,
|
||||||
|
const char** const argv) {
|
||||||
|
|
||||||
|
struct cmdline cmdline;
|
||||||
|
char time_period[16];
|
||||||
|
xmlrpc_env env;
|
||||||
|
xmlrpc_value *stories, *story;
|
||||||
|
size_t size, i;
|
||||||
|
int first;
|
||||||
|
|
||||||
|
parseCommandLine(argc, argv, &cmdline);
|
||||||
|
|
||||||
|
snprintf(time_period, sizeof(time_period), "%dHOUR", cmdline.hours);
|
||||||
|
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
/* Set up our client. */
|
||||||
|
xmlrpc_client_init2(&env, XMLRPC_CLIENT_NO_FLAGS, NAME, VERSION, NULL, 0);
|
||||||
|
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
/* Ask Meerkat to look for matching stories. */
|
||||||
|
stories = xmlrpc_client_call(&env, MEERKAT_URL,
|
||||||
|
"meerkat.getItems", "({s:s,s:i,s:s})",
|
||||||
|
"search", cmdline.searchArg,
|
||||||
|
"descriptions", (xmlrpc_int32) 76,
|
||||||
|
"time_period", time_period);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
/* Loop over the stories. */
|
||||||
|
size = xmlrpc_array_size(&env, stories);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
first = 1;
|
||||||
|
for (i = 0; i < size; i++) {
|
||||||
|
const char * title;
|
||||||
|
const char * link;
|
||||||
|
const char * description;
|
||||||
|
|
||||||
|
/* Extract the useful information from our story. */
|
||||||
|
story = xmlrpc_array_get_item(&env, stories, i);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
xmlrpc_decompose_value(&env, story, "{s:s,s:s,s:s,*}",
|
||||||
|
"title", &title,
|
||||||
|
"link", &link,
|
||||||
|
"description", &description);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
/* Print a separator line if necessary. */
|
||||||
|
if (first)
|
||||||
|
first = 0;
|
||||||
|
else
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
/* Print the story. */
|
||||||
|
if (strlen(description) > 0) {
|
||||||
|
printf("%s\n%s\n%s\n", title, description, link);
|
||||||
|
} else {
|
||||||
|
printf("%s\n%s\n", title, link);
|
||||||
|
}
|
||||||
|
free((char*)title);
|
||||||
|
free((char*)link);
|
||||||
|
free((char*)description);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Shut down our client. */
|
||||||
|
xmlrpc_DECREF(stories);
|
||||||
|
xmlrpc_env_clean(&env);
|
||||||
|
xmlrpc_client_cleanup();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
66
libs/xmlrpc-c/examples/synch_client.c
Normal file
66
libs/xmlrpc-c/examples/synch_client.c
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
/* A simple synchronous XML-RPC client written in C. */
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/client.h>
|
||||||
|
|
||||||
|
#include "config.h" /* information about this build environment */
|
||||||
|
|
||||||
|
#define NAME "XML-RPC C Test Client synch_client"
|
||||||
|
#define VERSION "1.0"
|
||||||
|
|
||||||
|
static void die_if_fault_occurred (xmlrpc_env *env)
|
||||||
|
{
|
||||||
|
if (env->fault_occurred) {
|
||||||
|
fprintf(stderr, "XML-RPC Fault: %s (%d)\n",
|
||||||
|
env->fault_string, env->fault_code);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int const argc,
|
||||||
|
const char ** const argv ATTR_UNUSED) {
|
||||||
|
|
||||||
|
xmlrpc_env env;
|
||||||
|
xmlrpc_value * resultP;
|
||||||
|
const char * state_name;
|
||||||
|
|
||||||
|
if (argc-1 > 0) {
|
||||||
|
fprintf(stderr, "No arguments");
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Start up our XML-RPC client library. */
|
||||||
|
xmlrpc_client_init(XMLRPC_CLIENT_NO_FLAGS, NAME, VERSION);
|
||||||
|
|
||||||
|
/* Initialize our error-handling environment. */
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
/* Call the famous server at UserLand. */
|
||||||
|
resultP = xmlrpc_client_call(&env, "http://betty.userland.com/RPC2",
|
||||||
|
"examples.getStateName",
|
||||||
|
"(i)", (xmlrpc_int32) 41);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
/* Get our state name and print it out. */
|
||||||
|
xmlrpc_read_string(&env, resultP, &state_name);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
printf("%s\n", state_name);
|
||||||
|
free((char*)state_name);
|
||||||
|
|
||||||
|
/* Dispose of our result value. */
|
||||||
|
xmlrpc_DECREF(resultP);
|
||||||
|
|
||||||
|
/* Clean up our error-handling environment. */
|
||||||
|
xmlrpc_env_clean(&env);
|
||||||
|
|
||||||
|
/* Shutdown our XML-RPC client library. */
|
||||||
|
xmlrpc_client_cleanup();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
112
libs/xmlrpc-c/examples/xmlrpc_asynch_client.c
Normal file
112
libs/xmlrpc-c/examples/xmlrpc_asynch_client.c
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
/* A simple asynchronous XML-RPC client written in C, as an example of
|
||||||
|
Xmlrpc-c asynchronous RPC facilities. This is the same as the
|
||||||
|
simpler synchronous client xmlprc_sample_add_client.c, except that
|
||||||
|
it adds 3 different pairs of numbers with the summation RPCs going on
|
||||||
|
simultaneously.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/client.h>
|
||||||
|
|
||||||
|
#include "config.h" /* information about this build environment */
|
||||||
|
|
||||||
|
#define NAME "Xmlrpc-c Asynchronous Test Client"
|
||||||
|
#define VERSION "1.0"
|
||||||
|
|
||||||
|
static void
|
||||||
|
die_if_fault_occurred (xmlrpc_env *env) {
|
||||||
|
if (env->fault_occurred) {
|
||||||
|
fprintf(stderr, "Something failed. %s (XML-RPC fault code %d)\n",
|
||||||
|
env->fault_string, env->fault_code);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
handle_sample_add_response(const char * const server_url,
|
||||||
|
const char * const method_name,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ATTR_UNUSED,
|
||||||
|
xmlrpc_env * const faultP,
|
||||||
|
xmlrpc_value * const resultP) {
|
||||||
|
|
||||||
|
xmlrpc_env env;
|
||||||
|
xmlrpc_int addend, adder;
|
||||||
|
|
||||||
|
/* Initialize our error environment variable */
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
/* Our first four arguments provide helpful context. Let's grab the
|
||||||
|
addends from our parameter array.
|
||||||
|
*/
|
||||||
|
xmlrpc_decompose_value(&env, param_array, "(ii)", &addend, &adder);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
printf("RPC with method '%s' at URL '%s' to add %d and %d "
|
||||||
|
"has completed\n", method_name, server_url, addend, adder);
|
||||||
|
|
||||||
|
if (faultP->fault_occurred)
|
||||||
|
printf("The RPC failed. %s", faultP->fault_string);
|
||||||
|
else {
|
||||||
|
xmlrpc_int sum;
|
||||||
|
|
||||||
|
xmlrpc_read_int(&env, resultP, &sum);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
printf("The sum is %d\n", sum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int const argc,
|
||||||
|
const char ** const argv ATTR_UNUSED) {
|
||||||
|
|
||||||
|
char * const url = "http://localhost:8080/RPC2";
|
||||||
|
char * const methodName = "sample.add";
|
||||||
|
|
||||||
|
xmlrpc_env env;
|
||||||
|
xmlrpc_int adder;
|
||||||
|
|
||||||
|
if (argc-1 > 0) {
|
||||||
|
fprintf(stderr, "This program has no arguments\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize our error environment variable */
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
/* Create the Xmlrpc-c client object */
|
||||||
|
xmlrpc_client_init2(&env, XMLRPC_CLIENT_NO_FLAGS, NAME, VERSION, NULL, 0);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
for (adder = 0; adder < 3; ++adder) {
|
||||||
|
printf("Making XMLRPC call to server url '%s' method '%s' "
|
||||||
|
"to request the sum "
|
||||||
|
"of 5 and %d...\n", url, methodName, adder);
|
||||||
|
|
||||||
|
/* request the remote procedure call */
|
||||||
|
xmlrpc_client_call_asynch(url, methodName,
|
||||||
|
handle_sample_add_response, NULL,
|
||||||
|
"(ii)", (xmlrpc_int32) 5, adder);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("RPCs all requested. Waiting for & handling responses...\n");
|
||||||
|
|
||||||
|
/* The following is what calls handle_sample_add_response() (3 times) */
|
||||||
|
xmlrpc_client_event_loop_finish_asynch();
|
||||||
|
|
||||||
|
printf("All RPCs finished.\n");
|
||||||
|
|
||||||
|
/* Destroy the Xmlrpc-c client object */
|
||||||
|
xmlrpc_client_cleanup();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
107
libs/xmlrpc-c/examples/xmlrpc_loop_server.c
Normal file
107
libs/xmlrpc-c/examples/xmlrpc_loop_server.c
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
/* A simple standalone XML-RPC server based on Abyss that contains a
|
||||||
|
simple one-thread request processing loop.
|
||||||
|
|
||||||
|
xmlrpc_sample_add_server.c is a server that does the same thing, but
|
||||||
|
does it by running a full Abyss daemon in the background, so it has
|
||||||
|
less control over how the requests are served.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/abyss.h>
|
||||||
|
#include <xmlrpc-c/server.h>
|
||||||
|
#include <xmlrpc-c/server_abyss.h>
|
||||||
|
|
||||||
|
#include "config.h" /* information about this build environment */
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
setupSignalHandlers(void) {
|
||||||
|
|
||||||
|
/* In UNIX, when you try to write to a socket that has been closed
|
||||||
|
from the other end, your write fails, but you also get a SIGPIPE
|
||||||
|
signal. That signal will kill you before you even have a chance
|
||||||
|
to see the write fail unless you catch, block, or ignore it.
|
||||||
|
If a client should connect to us and then disconnect before we've
|
||||||
|
sent our response, we see this socket-closed behavior. We
|
||||||
|
obviously don't want to die just because a client didn't complete
|
||||||
|
an RPC, so we ignore SIGPIPE.
|
||||||
|
*/
|
||||||
|
struct sigaction mysigaction;
|
||||||
|
|
||||||
|
sigemptyset(&mysigaction.sa_mask);
|
||||||
|
mysigaction.sa_flags = 0;
|
||||||
|
mysigaction.sa_handler = SIG_IGN;
|
||||||
|
sigaction(SIGPIPE, &mysigaction, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
sample_add(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const paramArrayP,
|
||||||
|
void * const userData ATTR_UNUSED) {
|
||||||
|
|
||||||
|
xmlrpc_int x, y, z;
|
||||||
|
|
||||||
|
/* Parse our argument array. */
|
||||||
|
xmlrpc_decompose_value(envP, paramArrayP, "(ii)", &x, &y);
|
||||||
|
if (envP->fault_occurred)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
/* Add our two numbers. */
|
||||||
|
z = x + y;
|
||||||
|
|
||||||
|
/* Return our result. */
|
||||||
|
return xmlrpc_build_value(envP, "i", z);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int const argc,
|
||||||
|
const char ** const argv) {
|
||||||
|
|
||||||
|
TServer abyssServer;
|
||||||
|
xmlrpc_registry * registryP;
|
||||||
|
xmlrpc_env env;
|
||||||
|
|
||||||
|
if (argc-1 != 1) {
|
||||||
|
fprintf(stderr, "You must specify 1 argument: The TCP port number "
|
||||||
|
"on which to listen for XML-RPC calls. "
|
||||||
|
"You specified %d.\n", argc-1);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
registryP = xmlrpc_registry_new(&env);
|
||||||
|
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "sample.add", &sample_add, NULL);
|
||||||
|
|
||||||
|
MIMETypeInit();
|
||||||
|
|
||||||
|
ServerCreate(&abyssServer, "XmlRpcServer", atoi(argv[1]),
|
||||||
|
NULL, NULL);
|
||||||
|
|
||||||
|
xmlrpc_server_abyss_set_handlers(&abyssServer, registryP);
|
||||||
|
|
||||||
|
ServerInit(&abyssServer);
|
||||||
|
|
||||||
|
setupSignalHandlers();
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
printf("Waiting for next RPC...\n");
|
||||||
|
|
||||||
|
ServerRunOnce2(&abyssServer, ABYSS_FOREGROUND);
|
||||||
|
/* This waits for the next connection, accepts it, reads the
|
||||||
|
HTTP POST request, executes the indicated RPC, and closes
|
||||||
|
the connection.
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
76
libs/xmlrpc-c/examples/xmlrpc_sample_add_client.c
Normal file
76
libs/xmlrpc-c/examples/xmlrpc_sample_add_client.c
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
/* A simple synchronous XML-RPC client written in C, as an example of
|
||||||
|
an Xmlrpc-c client. This invokes the sample.add procedure that the
|
||||||
|
Xmlrpc-c example server.c server provides. I.e. it adds to numbers
|
||||||
|
together, the hard way.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/client.h>
|
||||||
|
|
||||||
|
#include "config.h" /* information about this build environment */
|
||||||
|
|
||||||
|
#define NAME "Xmlrpc-c Test Client"
|
||||||
|
#define VERSION "1.0"
|
||||||
|
|
||||||
|
static void
|
||||||
|
die_if_fault_occurred (xmlrpc_env *env) {
|
||||||
|
if (env->fault_occurred) {
|
||||||
|
fprintf(stderr, "XML-RPC Fault: %s (%d)\n",
|
||||||
|
env->fault_string, env->fault_code);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int const argc,
|
||||||
|
const char ** const argv ATTR_UNUSED) {
|
||||||
|
|
||||||
|
xmlrpc_env env;
|
||||||
|
xmlrpc_value *result;
|
||||||
|
xmlrpc_int32 sum;
|
||||||
|
char * const serverUrl = "http://localhost:8080/RPC2";
|
||||||
|
char * const methodName = "sample.add";
|
||||||
|
|
||||||
|
if (argc-1 > 0) {
|
||||||
|
fprintf(stderr, "This program has no arguments\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Initialize our error-handling environment. */
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
/* Start up our XML-RPC client library. */
|
||||||
|
xmlrpc_client_init2(&env, XMLRPC_CLIENT_NO_FLAGS, NAME, VERSION, NULL, 0);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
printf("Making XMLRPC call to server url '%s' method '%s' "
|
||||||
|
"to request the sum "
|
||||||
|
"of 5 and 7...\n", serverUrl, methodName);
|
||||||
|
|
||||||
|
/* Make the remote procedure call */
|
||||||
|
result = xmlrpc_client_call(&env, serverUrl, methodName,
|
||||||
|
"(ii)", (xmlrpc_int32) 5, (xmlrpc_int32) 7);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
|
||||||
|
/* Get our sum and print it out. */
|
||||||
|
xmlrpc_read_int(&env, result, &sum);
|
||||||
|
die_if_fault_occurred(&env);
|
||||||
|
printf("The sum is %d\n", sum);
|
||||||
|
|
||||||
|
/* Dispose of our result value. */
|
||||||
|
xmlrpc_DECREF(result);
|
||||||
|
|
||||||
|
/* Clean up our error-handling environment. */
|
||||||
|
xmlrpc_env_clean(&env);
|
||||||
|
|
||||||
|
/* Shutdown our XML-RPC client library. */
|
||||||
|
xmlrpc_client_cleanup();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
71
libs/xmlrpc-c/examples/xmlrpc_sample_add_server.c
Normal file
71
libs/xmlrpc-c/examples/xmlrpc_sample_add_server.c
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
/* A simple standalone XML-RPC server written in C. */
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/server.h>
|
||||||
|
#include <xmlrpc-c/server_abyss.h>
|
||||||
|
|
||||||
|
#include "config.h" /* information about this build environment */
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
sample_add(xmlrpc_env * const env,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ATTR_UNUSED) {
|
||||||
|
|
||||||
|
xmlrpc_int32 x, y, z;
|
||||||
|
|
||||||
|
/* Parse our argument array. */
|
||||||
|
xmlrpc_decompose_value(env, param_array, "(ii)", &x, &y);
|
||||||
|
if (env->fault_occurred)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
/* Add our two numbers. */
|
||||||
|
z = x + y;
|
||||||
|
|
||||||
|
/* Return our result. */
|
||||||
|
return xmlrpc_build_value(env, "i", z);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int const argc,
|
||||||
|
const char ** const argv) {
|
||||||
|
|
||||||
|
xmlrpc_server_abyss_parms serverparm;
|
||||||
|
xmlrpc_registry * registryP;
|
||||||
|
xmlrpc_env env;
|
||||||
|
|
||||||
|
if (argc-1 != 1) {
|
||||||
|
fprintf(stderr, "You must specify 1 argument: The TCP port "
|
||||||
|
"number on which the server will accept connections "
|
||||||
|
"for RPCs. You specified %d arguments.\n", argc-1);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
registryP = xmlrpc_registry_new(&env);
|
||||||
|
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "sample.add", &sample_add, NULL);
|
||||||
|
|
||||||
|
/* In the modern form of the Abyss API, we supply parameters in memory
|
||||||
|
like a normal API. We select the modern form by setting
|
||||||
|
config_file_name to NULL:
|
||||||
|
*/
|
||||||
|
serverparm.config_file_name = NULL;
|
||||||
|
serverparm.registryP = registryP;
|
||||||
|
serverparm.port_number = atoi(argv[1]);
|
||||||
|
serverparm.log_file_name = "/tmp/xmlrpc_log";
|
||||||
|
|
||||||
|
printf("Running XML-RPC server...\n");
|
||||||
|
|
||||||
|
xmlrpc_server_abyss(&env, &serverparm, XMLRPC_APSIZE(log_file_name));
|
||||||
|
|
||||||
|
/* xmlrpc_server_abyss() never returns */
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
57
libs/xmlrpc-c/examples/xmlrpc_sample_add_server_cgi.c
Normal file
57
libs/xmlrpc-c/examples/xmlrpc_sample_add_server_cgi.c
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/* A simple standalone XML-RPC server written in C. */
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/server.h>
|
||||||
|
#include <xmlrpc-c/server_cgi.h>
|
||||||
|
|
||||||
|
#include "config.h" /* information about this build environment */
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
sample_add(xmlrpc_env * const env,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ATTR_UNUSED) {
|
||||||
|
|
||||||
|
xmlrpc_int32 x, y, z;
|
||||||
|
|
||||||
|
/* Parse our argument array. */
|
||||||
|
xmlrpc_decompose_value(env, param_array, "(ii)", &x, &y);
|
||||||
|
if (env->fault_occurred)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
/* Add our two numbers. */
|
||||||
|
z = x + y;
|
||||||
|
|
||||||
|
/* Return our result. */
|
||||||
|
return xmlrpc_build_value(env, "i", z);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int const argc,
|
||||||
|
const char ** const argv) {
|
||||||
|
|
||||||
|
xmlrpc_registry * registryP;
|
||||||
|
xmlrpc_env env;
|
||||||
|
|
||||||
|
if (argc-1 > 0 && argv==argv) {
|
||||||
|
fprintf(stderr, "There are no arguments to a CGI script\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
registryP = xmlrpc_registry_new(&env);
|
||||||
|
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "sample.add", &sample_add, NULL);
|
||||||
|
|
||||||
|
xmlrpc_server_cgi_process_call(registryP);
|
||||||
|
|
||||||
|
xmlrpc_registry_free(registryP);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
190
libs/xmlrpc-c/examples/xmlrpc_sample_add_server_w32httpsys.c
Normal file
190
libs/xmlrpc-c/examples/xmlrpc_sample_add_server_w32httpsys.c
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
/* Copyright (C) 2005 by Steven A. Bone, sbone@pobox.com. All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
** SUCH DAMAGE. */
|
||||||
|
|
||||||
|
/* COMPILATION NOTE:
|
||||||
|
Note that the Platform SDK headers and
|
||||||
|
link libraries for Windows XP SP2 or newer are required to compile
|
||||||
|
xmlrpc-c for this module. If you are not using this server, it is
|
||||||
|
safe to exclude the xmlrpc_server_w32httpsys.c file from the xmlrpc
|
||||||
|
project and these dependencies will not be required. You can get the
|
||||||
|
latest platform SDK at
|
||||||
|
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
|
||||||
|
Be sure after installation to choose the program to "register the PSDK
|
||||||
|
directories with Visual Studio" so the newer headers are found.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/server.h>
|
||||||
|
#include <xmlrpc-c/server_w32httpsys.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* SECURITY NOTE: Using HTTP Authorization
|
||||||
|
|
||||||
|
The current implementation of HTTP Authorization in the win32httpsys
|
||||||
|
server only uses basic Authorization. This means the userid and password
|
||||||
|
is sent in clear-text over the network (Technically, it is Base64 encoded,
|
||||||
|
but this is essentially clear text). This method is not secure, as it
|
||||||
|
can be captured and decoded. The use of HTTP Basic Authorization with SSL
|
||||||
|
is considered much more secure. See the note below for configuring SSL
|
||||||
|
support.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
HOWTO: Configure SSL for the XMLRPC-C Server
|
||||||
|
|
||||||
|
To use SSL you need an SSL certificate. For testing purposes,
|
||||||
|
it is possible to create a self-signed SSL certificate. To do so,
|
||||||
|
you must download the IIS 6.0 Resource Kit tools. The current
|
||||||
|
URL to get the download link is http://support.microsoft.com/kb/840671
|
||||||
|
We will be using the SelfSSL version 1.0 from this toolkit for
|
||||||
|
this example. The other tool you will need is httpcfg.exe, which
|
||||||
|
can be compiled from the sources in the Windows XP SP2 (or newer) Platform SDK,
|
||||||
|
or downloaded as part of the Windows XP SP2 Support Tools at the following URL:
|
||||||
|
http://www.microsoft.com/downloads/details.aspx?FamilyID=49ae8576-9bb9-4126-9761-ba8011fabf38&displaylang=en
|
||||||
|
The last assumption is that this procedure is being done on the machine that is
|
||||||
|
hosting the XMLRPC-C server application.
|
||||||
|
|
||||||
|
1) Make sure that IIS is installed, and you are running at least Windows XP SP2
|
||||||
|
or Windows Server 2003. WARNING: This process will replace any existing IIS SSL
|
||||||
|
certificates currently installed.
|
||||||
|
|
||||||
|
2) In a command prompt, navigate to the directory of the
|
||||||
|
IIS Support Tools where the selfssl program exists (usually
|
||||||
|
C:\Program Files\IIS Resources\SelfSSL). Assuming (as we are for this example)
|
||||||
|
that we are going to run on port 8443, use the following command line (see the
|
||||||
|
documentation for all the flags):
|
||||||
|
|
||||||
|
selfssl /T /V:365 /P:8443
|
||||||
|
|
||||||
|
3) In the Control Panel, Administrative tools, run the Internet Information Services
|
||||||
|
program. Drill down to the Default Web Site. Right-click it and choose Properties.
|
||||||
|
On the "Web Site" tab, you will notice that the SSL port is now set to 8443. Change
|
||||||
|
it back to 443. On the Directory Security tab, pick "View Certificate". In the
|
||||||
|
"Details" tab, select the "Thumbprint" line. The edit box below the listbox will
|
||||||
|
display a series of hex numbers. Copy these to the clipboard and paste into notepad.
|
||||||
|
OK yourself out of the IIS program.
|
||||||
|
|
||||||
|
4) Remove all the spaces in the hex string so you are left with a string with no spaces.
|
||||||
|
This is your SSL Thumbprint hash which you will need in the next step.
|
||||||
|
|
||||||
|
5) At your command prompt, navigate to the support tools directory (or the location
|
||||||
|
where you built httpcfg.exe) - usually C:\Program Files\Support Tools. Run the following
|
||||||
|
command line, replacing both the brackets and text with your thumbprint hash from step 4 above:
|
||||||
|
|
||||||
|
httpcfg.exe set ssl -i 0.0.0.0:8443 -h <replace with thumbprint hash> -g "{2bb50d9c-7f6a-4d6f-873d-5aee7fb43290}" -c "MY" -t "" -n ""
|
||||||
|
|
||||||
|
6) You can check the setup by performing a "httpcfg.exe query ssl" if you wish.
|
||||||
|
|
||||||
|
7) Modify the example server code below to use SSL. Set the xmlrpc_server_httpsys_parms.useSSL
|
||||||
|
to '1' and the xmlrpc_server_httpsys_parms.portNum to be '8443'. You can test the server by using
|
||||||
|
IE to browse to the URL https://127.0.0.1:8443/rpc2. An error 405 (Resource not allowed) is the
|
||||||
|
expected result if everything is working properly.
|
||||||
|
|
||||||
|
NOTE: Testing clients with a 'test' or not real SSL certificate involves changing some of the default
|
||||||
|
code in the client samples, as by default the transports will fail if there are any issues with the
|
||||||
|
certificate. The WinInet transport as of 1.2 has a transport-specific setting to allow
|
||||||
|
invalid SSL certificates. See the libxmlrpc_client.html documentation for more details.
|
||||||
|
|
||||||
|
NOTE: Failure to follow all the steps listed above correctly will result in no application
|
||||||
|
errors, event log messages, or HTTP.SYS log messages indicating failure or the cause. If
|
||||||
|
anyone can provide information on debugging SSL certificate issues in HTTP.SYS, please
|
||||||
|
submit to us!
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
sample_add(xmlrpc_env * const env,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ) {
|
||||||
|
|
||||||
|
xmlrpc_int32 x, y, z;
|
||||||
|
|
||||||
|
/* Parse our argument array. */
|
||||||
|
xmlrpc_decompose_value(env, param_array, "(ii)", &x, &y);
|
||||||
|
if (env->fault_occurred)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
/* Add our two numbers. */
|
||||||
|
z = x + y;
|
||||||
|
|
||||||
|
/* Return our result. */
|
||||||
|
return xmlrpc_build_value(env, "i", z);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void handleAuthorization(
|
||||||
|
xmlrpc_env * envP,
|
||||||
|
char * userid,
|
||||||
|
char * password)
|
||||||
|
{
|
||||||
|
if (strcmp(userid,"jrandom")==0 && strcmp(password,"secret")==0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
xmlrpc_env_set_fault( envP, XMLRPC_REQUEST_REFUSED_ERROR,
|
||||||
|
"Username and/or password do not match.");
|
||||||
|
}
|
||||||
|
|
||||||
|
int __cdecl wmain( int argc, wchar_t * argv[])
|
||||||
|
{
|
||||||
|
xmlrpc_server_httpsys_parms serverparm;
|
||||||
|
xmlrpc_registry * registryP;
|
||||||
|
xmlrpc_env env;
|
||||||
|
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
registryP = xmlrpc_registry_new(&env);
|
||||||
|
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "sample.add", &sample_add, NULL);
|
||||||
|
|
||||||
|
wprintf(L"Starting XML-RPC server...\n");
|
||||||
|
|
||||||
|
//Sets the port number we are listening on
|
||||||
|
serverparm.portNum=8080;
|
||||||
|
|
||||||
|
//if this is set, we will use the authorization function
|
||||||
|
serverparm.authfn=NULL;
|
||||||
|
//serverparm.authfn=&handleAuthorization;
|
||||||
|
|
||||||
|
//set the logging level and log file
|
||||||
|
serverparm.logLevel=2;
|
||||||
|
serverparm.logFile="C:\\httpsysserverlog.txt";
|
||||||
|
|
||||||
|
//set the use of SSL
|
||||||
|
serverparm.useSSL=0;
|
||||||
|
|
||||||
|
serverparm.registryP = registryP;
|
||||||
|
|
||||||
|
xmlrpc_server_httpsys(&env, &serverparm, XMLRPC_HSSIZE(authfn));
|
||||||
|
|
||||||
|
wprintf(L"Stopping XML-RPC server...\n");
|
||||||
|
|
||||||
|
xmlrpc_registry_free(registryP);
|
||||||
|
xmlrpc_env_clean(&env);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
393
libs/xmlrpc-c/examples/xmlrpc_server_validatee.c
Normal file
393
libs/xmlrpc-c/examples/xmlrpc_server_validatee.c
Normal file
@ -0,0 +1,393 @@
|
|||||||
|
/* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
** SUCH DAMAGE. */
|
||||||
|
|
||||||
|
|
||||||
|
/*============================================================================
|
||||||
|
xmlrpc_server_validatee
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
This program runs an XMLRPC server, using the Xmlrpc-c libraries.
|
||||||
|
|
||||||
|
The server implements the methods that the Userland Validator1 test suite
|
||||||
|
invokes, which are supposed to exercise a broad range of XMLRPC server
|
||||||
|
function.
|
||||||
|
|
||||||
|
Coments here used to say you could get information about Validator1
|
||||||
|
from <http://validator.xmlrpc.com/>, but as of 2004.09.25, there's nothing
|
||||||
|
there (there's a web server, but it is not configured to serve that
|
||||||
|
particular URL).
|
||||||
|
|
||||||
|
============================================================================*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/server.h>
|
||||||
|
#include <xmlrpc-c/server_abyss.h>
|
||||||
|
|
||||||
|
#include "config.h" /* information about this build environment */
|
||||||
|
|
||||||
|
#define RETURN_IF_FAULT(env) \
|
||||||
|
do { \
|
||||||
|
if ((env)->fault_occurred) \
|
||||||
|
return NULL; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** validator1.arrayOfStructsTest
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
array_of_structs(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ATTR_UNUSED) {
|
||||||
|
|
||||||
|
xmlrpc_value * array;
|
||||||
|
xmlrpc_value * retval;
|
||||||
|
|
||||||
|
/* Parse our argument array. */
|
||||||
|
xmlrpc_decompose_value(envP, param_array, "(A)", &array);
|
||||||
|
if (envP->fault_occurred)
|
||||||
|
retval = NULL;
|
||||||
|
else {
|
||||||
|
/* Add up all the struct elements named "curly". */
|
||||||
|
size_t size;
|
||||||
|
size = xmlrpc_array_size(envP, array);
|
||||||
|
if (envP->fault_occurred)
|
||||||
|
retval = NULL;
|
||||||
|
else {
|
||||||
|
unsigned int sum;
|
||||||
|
unsigned int i;
|
||||||
|
sum = 0;
|
||||||
|
for (i = 0; i < size && !envP->fault_occurred; ++i) {
|
||||||
|
xmlrpc_value * strct;
|
||||||
|
strct = xmlrpc_array_get_item(envP, array, i);
|
||||||
|
if (!envP->fault_occurred) {
|
||||||
|
xmlrpc_int32 curly;
|
||||||
|
xmlrpc_decompose_value(envP, strct, "{s:i,*}",
|
||||||
|
"curly", &curly);
|
||||||
|
if (!envP->fault_occurred)
|
||||||
|
sum += curly;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xmlrpc_DECREF(array);
|
||||||
|
if (!envP->fault_occurred)
|
||||||
|
retval = xmlrpc_build_value(envP, "i", sum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** validator1.countTheEntities
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
count_entities(xmlrpc_env * const env,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ATTR_UNUSED) {
|
||||||
|
const char *str;
|
||||||
|
size_t len, i;
|
||||||
|
xmlrpc_int32 left, right, amp, apos, quote;
|
||||||
|
|
||||||
|
xmlrpc_decompose_value(env, param_array, "(s#)", &str, &len);
|
||||||
|
RETURN_IF_FAULT(env);
|
||||||
|
|
||||||
|
left = right = amp = apos = quote = 0;
|
||||||
|
for (i = 0; i < len; i++) {
|
||||||
|
switch (str[i]) {
|
||||||
|
case '<': left++; break;
|
||||||
|
case '>': right++; break;
|
||||||
|
case '&': amp++; break;
|
||||||
|
case '\'': apos++; break;
|
||||||
|
case '\"': quote++; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free((void*)str);
|
||||||
|
|
||||||
|
return xmlrpc_build_value(env, "{s:i,s:i,s:i,s:i,s:i}",
|
||||||
|
"ctLeftAngleBrackets", left,
|
||||||
|
"ctRightAngleBrackets", right,
|
||||||
|
"ctAmpersands", amp,
|
||||||
|
"ctApostrophes", apos,
|
||||||
|
"ctQuotes", quote);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** validator1.easyStructTest
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
easy_struct(xmlrpc_env * const env,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ATTR_UNUSED) {
|
||||||
|
|
||||||
|
xmlrpc_int32 larry, moe, curly;
|
||||||
|
|
||||||
|
/* Parse our argument array and get the stooges. */
|
||||||
|
xmlrpc_decompose_value(env, param_array, "({s:i,s:i,s:i,*})",
|
||||||
|
"larry", &larry,
|
||||||
|
"moe", &moe,
|
||||||
|
"curly", &curly);
|
||||||
|
RETURN_IF_FAULT(env);
|
||||||
|
|
||||||
|
/* Return our result. */
|
||||||
|
return xmlrpc_build_value(env, "i", larry + moe + curly);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** validator1.echoStructTest
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
echo_struct(xmlrpc_env * const env,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ATTR_UNUSED) {
|
||||||
|
xmlrpc_value *s;
|
||||||
|
|
||||||
|
/* Parse our argument array. */
|
||||||
|
xmlrpc_decompose_value(env, param_array, "(S)", &s);
|
||||||
|
RETURN_IF_FAULT(env);
|
||||||
|
|
||||||
|
return s; /* We transfer our reference on 's' to Caller */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** validator1.manyTypesTest
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
many_types(xmlrpc_env * const env ATTR_UNUSED,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ATTR_UNUSED) {
|
||||||
|
|
||||||
|
/* Create another reference to our argument array and return it as is. */
|
||||||
|
xmlrpc_INCREF(param_array);
|
||||||
|
return param_array;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** validator1.moderateSizeArrayCheck
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
static void
|
||||||
|
concatenate(xmlrpc_env * const envP,
|
||||||
|
const char * const str1,
|
||||||
|
size_t const str1_len,
|
||||||
|
const char * const str2,
|
||||||
|
size_t const str2_len,
|
||||||
|
xmlrpc_value ** const resultP) {
|
||||||
|
|
||||||
|
/* Concatenate the two strings. */
|
||||||
|
|
||||||
|
char * buffer;
|
||||||
|
|
||||||
|
buffer = (char*) malloc(str1_len + str2_len);
|
||||||
|
if (!buffer) {
|
||||||
|
xmlrpc_env_set_fault(envP, 1,
|
||||||
|
"Couldn't allocate concatenated string");
|
||||||
|
} else {
|
||||||
|
memcpy(buffer, str1, str1_len);
|
||||||
|
memcpy(&buffer[str1_len], str2, str2_len);
|
||||||
|
*resultP = xmlrpc_build_value(envP, "s#",
|
||||||
|
buffer, str1_len + str2_len);
|
||||||
|
free(buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
moderate_array(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ATTR_UNUSED) {
|
||||||
|
|
||||||
|
xmlrpc_value *array, *item, *result;
|
||||||
|
int size;
|
||||||
|
const char * str1;
|
||||||
|
const char * str2;
|
||||||
|
size_t str1_len, str2_len;
|
||||||
|
xmlrpc_value * retval;
|
||||||
|
|
||||||
|
/* Parse our argument array. */
|
||||||
|
xmlrpc_decompose_value(envP, param_array, "(A)", &array);
|
||||||
|
if (!envP->fault_occurred) {
|
||||||
|
size = xmlrpc_array_size(envP, array);
|
||||||
|
if (!envP->fault_occurred) {
|
||||||
|
/* Get our first string. */
|
||||||
|
item = xmlrpc_array_get_item(envP, array, 0);
|
||||||
|
if (!envP->fault_occurred) {
|
||||||
|
xmlrpc_read_string_lp(envP, item, &str1_len, &str1);
|
||||||
|
if (!envP->fault_occurred) {
|
||||||
|
/* Get our last string. */
|
||||||
|
item = xmlrpc_array_get_item(envP, array, size - 1);
|
||||||
|
if (!envP->fault_occurred) {
|
||||||
|
xmlrpc_read_string_lp(envP, item, &str2_len, &str2);
|
||||||
|
if (!envP->fault_occurred) {
|
||||||
|
concatenate(envP, str1, str1_len, str2, str2_len,
|
||||||
|
&retval);
|
||||||
|
free((char*)str2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free((char*)str1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xmlrpc_DECREF(array);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** validator1.nestedStructTest
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
nested_struct(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ATTR_UNUSED) {
|
||||||
|
|
||||||
|
xmlrpc_value * yearsP;
|
||||||
|
xmlrpc_value * retval;
|
||||||
|
|
||||||
|
/* Parse our argument array. */
|
||||||
|
xmlrpc_decompose_value(envP, param_array, "(S)", &yearsP);
|
||||||
|
if (!envP->fault_occurred) {
|
||||||
|
/* Get values of larry, moe and curly for 2000-04-01. */
|
||||||
|
xmlrpc_int32 larry, moe, curly;
|
||||||
|
xmlrpc_decompose_value(envP, yearsP,
|
||||||
|
"{s:{s:{s:{s:i,s:i,s:i,*},*},*},*}",
|
||||||
|
"2000", "04", "01",
|
||||||
|
"larry", &larry,
|
||||||
|
"moe", &moe,
|
||||||
|
"curly", &curly);
|
||||||
|
if (!envP->fault_occurred)
|
||||||
|
retval = xmlrpc_build_value(envP, "i", larry + moe + curly);
|
||||||
|
xmlrpc_DECREF(yearsP);
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** validator1.simpleStructReturnTest
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
static xmlrpc_value *
|
||||||
|
struct_return(xmlrpc_env * const env,
|
||||||
|
xmlrpc_value * const param_array,
|
||||||
|
void * const user_data ATTR_UNUSED) {
|
||||||
|
|
||||||
|
xmlrpc_int32 i;
|
||||||
|
|
||||||
|
xmlrpc_decompose_value(env, param_array, "(i)", &i);
|
||||||
|
RETURN_IF_FAULT(env);
|
||||||
|
|
||||||
|
return xmlrpc_build_value(env, "{s:i,s:i,s:i}",
|
||||||
|
"times10", (xmlrpc_int32) i * 10,
|
||||||
|
"times100", (xmlrpc_int32) i * 100,
|
||||||
|
"times1000", (xmlrpc_int32) i * 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** main
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
int main(int const argc,
|
||||||
|
const char ** const argv) {
|
||||||
|
|
||||||
|
xmlrpc_server_abyss_parms serverparm;
|
||||||
|
xmlrpc_registry * registryP;
|
||||||
|
xmlrpc_env env;
|
||||||
|
|
||||||
|
if (argc-1 != 1) {
|
||||||
|
fprintf(stderr, "You must specify 1 argument: The TCP port "
|
||||||
|
"number on which the server will accept connections "
|
||||||
|
"for RPCs. You specified %d arguments.\n", argc-1);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlrpc_env_init(&env);
|
||||||
|
|
||||||
|
registryP = xmlrpc_registry_new(&env);
|
||||||
|
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "validator1.arrayOfStructsTest",
|
||||||
|
&array_of_structs, NULL);
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "validator1.countTheEntities",
|
||||||
|
&count_entities, NULL);
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "validator1.easyStructTest",
|
||||||
|
&easy_struct, NULL);
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "validator1.echoStructTest",
|
||||||
|
&echo_struct, NULL);
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "validator1.manyTypesTest",
|
||||||
|
&many_types, NULL);
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "validator1.moderateSizeArrayCheck",
|
||||||
|
&moderate_array, NULL);
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "validator1.nestedStructTest",
|
||||||
|
&nested_struct, NULL);
|
||||||
|
xmlrpc_registry_add_method(
|
||||||
|
&env, registryP, NULL, "validator1.simpleStructReturnTest",
|
||||||
|
&struct_return, NULL);
|
||||||
|
|
||||||
|
serverparm.config_file_name = NULL;
|
||||||
|
serverparm.registryP = registryP;
|
||||||
|
serverparm.port_number = atoi(argv[1]);
|
||||||
|
serverparm.log_file_name = NULL;
|
||||||
|
|
||||||
|
printf("Running XML-RPC server...\n");
|
||||||
|
|
||||||
|
xmlrpc_server_abyss(&env, &serverparm, XMLRPC_APSIZE(log_file_name));
|
||||||
|
|
||||||
|
/* This never gets executed. */
|
||||||
|
return 0;
|
||||||
|
}
|
60
libs/xmlrpc-c/include/Makefile
Normal file
60
libs/xmlrpc-c/include/Makefile
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
ifeq ($(SRCDIR)x,x)
|
||||||
|
SRCDIR = $(CURDIR)/..
|
||||||
|
endif
|
||||||
|
SUBDIR = src
|
||||||
|
BUILDDIR = $(SRCDIR)
|
||||||
|
VPATH = .:$(SRCDIR)
|
||||||
|
|
||||||
|
include $(BUILDDIR)/Makefile.config
|
||||||
|
|
||||||
|
HEADERS_TO_INSTALL = \
|
||||||
|
xmlrpc-c/oldxmlrpc.h \
|
||||||
|
xmlrpc-c/base.h \
|
||||||
|
xmlrpc-c/abyss.h \
|
||||||
|
xmlrpc-c/server.h \
|
||||||
|
xmlrpc-c/server_abyss.h \
|
||||||
|
xmlrpc-c/server_w32httpsys.h \
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_CPLUSPLUS),yes)
|
||||||
|
HEADERS_TO_INSTALL += \
|
||||||
|
xmlrpc-c/oldcppwrapper.hpp \
|
||||||
|
xmlrpc-c/base.hpp \
|
||||||
|
xmlrpc-c/timeout.hpp \
|
||||||
|
xmlrpc-c/xml.hpp \
|
||||||
|
xmlrpc-c/registry.hpp \
|
||||||
|
xmlrpc-c/server_abyss.hpp\
|
||||||
|
xmlrpc-c/girerr.hpp\
|
||||||
|
xmlrpc-c/girmem.hpp\
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
HEADERINST_PREFIX = /xmlrpc-c
|
||||||
|
|
||||||
|
ifeq ($(MUST_BUILD_CLIENT),yes)
|
||||||
|
HEADERS_TO_INSTALL += \
|
||||||
|
xmlrpc-c/client.h \
|
||||||
|
xmlrpc-c/transport.h \
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_CPLUSPLUS),yes)
|
||||||
|
HEADERS_TO_INSTALL += xmlrpc-c/client.hpp xmlrpc-c/client_simple.hpp
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifeq ($(ENABLE_CGI_SERVER),yes)
|
||||||
|
HEADERS_TO_INSTALL += xmlrpc-c/server_cgi.h
|
||||||
|
endif
|
||||||
|
|
||||||
|
default: all
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
|
.PHONY: install
|
||||||
|
install: install-common
|
||||||
|
|
||||||
|
.PHONY: clean distclean dep
|
||||||
|
clean:
|
||||||
|
distclean:
|
||||||
|
dep:
|
||||||
|
|
||||||
|
include $(SRCDIR)/Makefile.common
|
751
libs/xmlrpc-c/include/xmlrpc-c/abyss.h
Normal file
751
libs/xmlrpc-c/include/xmlrpc-c/abyss.h
Normal file
@ -0,0 +1,751 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
abyss.h
|
||||||
|
******************************************************************************
|
||||||
|
|
||||||
|
This file is the interface header for the Abyss HTTP server component of
|
||||||
|
XML-RPC For C/C++ (Xmlrpc-c).
|
||||||
|
|
||||||
|
The Abyss component of Xmlrpc-c is based on the independently developed
|
||||||
|
and distributed Abyss web server package from 2001.
|
||||||
|
|
||||||
|
Copyright information is at the end of the file.
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef _ABYSS_H_
|
||||||
|
#define _ABYSS_H_
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef ABYSS_WIN32
|
||||||
|
#include "xmlrpc_config.h"
|
||||||
|
#else
|
||||||
|
#include <inttypes.h>
|
||||||
|
#endif
|
||||||
|
/*********************************************************************
|
||||||
|
** Paths and so on...
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#ifdef ABYSS_WIN32
|
||||||
|
#define DEFAULT_ROOT "c:\\abyss"
|
||||||
|
#define DEFAULT_DOCS DEFAULT_ROOT"\\htdocs"
|
||||||
|
#define DEFAULT_CONF_FILE DEFAULT_ROOT"\\conf\\abyss.conf"
|
||||||
|
#define DEFAULT_LOG_FILE DEFAULT_ROOT"\\log\\abyss.log"
|
||||||
|
#else
|
||||||
|
#ifdef __rtems__
|
||||||
|
#define DEFAULT_ROOT "/abyss"
|
||||||
|
#else
|
||||||
|
#define DEFAULT_ROOT "/usr/local/abyss"
|
||||||
|
#endif
|
||||||
|
#define DEFAULT_DOCS DEFAULT_ROOT"/htdocs"
|
||||||
|
#define DEFAULT_CONF_FILE DEFAULT_ROOT"/conf/abyss.conf"
|
||||||
|
#define DEFAULT_LOG_FILE DEFAULT_ROOT"/log/abyss.log"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Maximum numer of simultaneous connections
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#define MAX_CONN 16
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Server Info Definitions
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#define SERVER_VERSION "0.3"
|
||||||
|
#define SERVER_HVERSION "ABYSS/0.3"
|
||||||
|
#define SERVER_HTML_INFO \
|
||||||
|
"<p><HR><b><i><a href=\"http:\057\057abyss.linuxave.net\">" \
|
||||||
|
"ABYSS Web Server</a></i></b> version "SERVER_VERSION"<br>" \
|
||||||
|
"© <a href=\"mailto:mmoez@bigfoot.com\">Moez Mahfoudh</a> - 2000</p>"
|
||||||
|
#define SERVER_PLAIN_INFO \
|
||||||
|
CRLF "----------------------------------------" \
|
||||||
|
"----------------------------------------" \
|
||||||
|
CRLF "ABYSS Web Server version "SERVER_VERSION CRLF"(C) Moez Mahfoudh - 2000"
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** General purpose definitions
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#ifdef ABYSS_WIN32
|
||||||
|
#define strcasecmp(a,b) stricmp((a),(b))
|
||||||
|
#else
|
||||||
|
#define ioctlsocket(a,b,c) ioctl((a),(b),(c))
|
||||||
|
#endif /* ABYSS_WIN32 */
|
||||||
|
|
||||||
|
#ifndef NULL
|
||||||
|
#define NULL ((void *)0)
|
||||||
|
#endif /* NULL */
|
||||||
|
|
||||||
|
#ifndef TRUE
|
||||||
|
#define TRUE 1
|
||||||
|
#endif /* TRUE */
|
||||||
|
|
||||||
|
#ifndef FALSE
|
||||||
|
#define FALSE 0
|
||||||
|
#endif /* FALSE */
|
||||||
|
|
||||||
|
#ifdef ABYSS_WIN32
|
||||||
|
#define LBR "\n"
|
||||||
|
#else
|
||||||
|
#define LBR "\n"
|
||||||
|
#endif /* ABYSS_WIN32 */
|
||||||
|
|
||||||
|
typedef int abyss_bool;
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Buffer
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
void *data;
|
||||||
|
uint32_t size;
|
||||||
|
uint32_t staticid;
|
||||||
|
} TBuffer;
|
||||||
|
|
||||||
|
abyss_bool BufferAlloc(TBuffer *buf,uint32_t memsize);
|
||||||
|
abyss_bool BufferRealloc(TBuffer *buf,uint32_t memsize);
|
||||||
|
void BufferFree(TBuffer *buf);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** String
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
TBuffer buffer;
|
||||||
|
uint32_t size;
|
||||||
|
} TString;
|
||||||
|
|
||||||
|
abyss_bool StringAlloc(TString *s);
|
||||||
|
abyss_bool StringConcat(TString *s,char *s2);
|
||||||
|
abyss_bool StringBlockConcat(TString *s,char *s2,char **ref);
|
||||||
|
void StringFree(TString *s);
|
||||||
|
char *StringData(TString *s);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** List
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
void **item;
|
||||||
|
uint16_t size;
|
||||||
|
uint16_t maxsize;
|
||||||
|
abyss_bool autofree;
|
||||||
|
} TList;
|
||||||
|
|
||||||
|
void
|
||||||
|
ListInit(TList * const listP);
|
||||||
|
|
||||||
|
void
|
||||||
|
ListInitAutoFree(TList * const listP);
|
||||||
|
|
||||||
|
void
|
||||||
|
ListFree(TList * const listP);
|
||||||
|
|
||||||
|
void
|
||||||
|
ListFreeItems(TList * const listP);
|
||||||
|
|
||||||
|
abyss_bool
|
||||||
|
ListAdd(TList * const listP,
|
||||||
|
void * const str);
|
||||||
|
|
||||||
|
void
|
||||||
|
ListRemove(TList * const listP);
|
||||||
|
|
||||||
|
abyss_bool
|
||||||
|
ListAddFromString(TList * const listP,
|
||||||
|
char * const c);
|
||||||
|
|
||||||
|
abyss_bool
|
||||||
|
ListFindString(TList * const listP,
|
||||||
|
char * const str,
|
||||||
|
uint16_t * const indexP);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Table
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
char *name,*value;
|
||||||
|
uint16_t hash;
|
||||||
|
} TTableItem;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
TTableItem *item;
|
||||||
|
uint16_t size,maxsize;
|
||||||
|
} TTable;
|
||||||
|
|
||||||
|
void TableInit(TTable *t);
|
||||||
|
void TableFree(TTable *t);
|
||||||
|
abyss_bool TableAdd(TTable *t,char *name,char *value);
|
||||||
|
abyss_bool TableAddReplace(TTable *t,char *name,char *value);
|
||||||
|
abyss_bool TableFindIndex(TTable *t,char *name,uint16_t *index);
|
||||||
|
char *TableFind(TTable *t,char *name);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Thread
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#ifdef ABYSS_WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#define THREAD_ENTRYTYPE WINAPI
|
||||||
|
#else
|
||||||
|
#define THREAD_ENTRYTYPE
|
||||||
|
#include <pthread.h>
|
||||||
|
#endif /* ABYSS_WIN32 */
|
||||||
|
|
||||||
|
typedef uint32_t (THREAD_ENTRYTYPE *TThreadProc)(void *);
|
||||||
|
#ifdef ABYSS_WIN32
|
||||||
|
typedef HANDLE TThread;
|
||||||
|
#else
|
||||||
|
typedef pthread_t TThread;
|
||||||
|
typedef void* (*PTHREAD_START_ROUTINE)(void *);
|
||||||
|
#endif /* ABYSS_WIN32 */
|
||||||
|
|
||||||
|
abyss_bool ThreadCreate(TThread *t,TThreadProc func,void *arg);
|
||||||
|
abyss_bool ThreadRun(TThread *t);
|
||||||
|
abyss_bool ThreadStop(TThread *t);
|
||||||
|
abyss_bool ThreadKill(TThread *t);
|
||||||
|
void ThreadWait(uint32_t ms);
|
||||||
|
void ThreadExit( TThread *t, int ret_value );
|
||||||
|
void ThreadClose( TThread *t );
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Mutex
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#ifdef ABYSS_WIN32
|
||||||
|
typedef HANDLE TMutex;
|
||||||
|
#else
|
||||||
|
typedef pthread_mutex_t TMutex;
|
||||||
|
#endif /* ABYSS_WIN32 */
|
||||||
|
|
||||||
|
abyss_bool MutexCreate(TMutex *m);
|
||||||
|
abyss_bool MutexLock(TMutex *m);
|
||||||
|
abyss_bool MutexUnlock(TMutex *m);
|
||||||
|
abyss_bool MutexTryLock(TMutex *m);
|
||||||
|
void MutexFree(TMutex *m);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Pool
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
typedef struct _TPoolZone
|
||||||
|
{
|
||||||
|
char *pos,*maxpos;
|
||||||
|
struct _TPoolZone *next,*prev;
|
||||||
|
/* char data[0]; */
|
||||||
|
char data[1];
|
||||||
|
} TPoolZone;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
TPoolZone *firstzone,*currentzone;
|
||||||
|
uint32_t zonesize;
|
||||||
|
TMutex mutex;
|
||||||
|
} TPool;
|
||||||
|
|
||||||
|
abyss_bool PoolCreate(TPool *p,uint32_t zonesize);
|
||||||
|
void PoolFree(TPool *p);
|
||||||
|
|
||||||
|
void *PoolAlloc(TPool *p,uint32_t size);
|
||||||
|
char *PoolStrdup(TPool *p,char *s);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Socket
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#ifdef ABYSS_WIN32
|
||||||
|
#include <winsock.h>
|
||||||
|
#else
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_FILIO_H
|
||||||
|
#include <sys/filio.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_IOCTL_H
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* ABYSS_WIN32 */
|
||||||
|
|
||||||
|
#define TIME_INFINITE 0xffffffff
|
||||||
|
|
||||||
|
#ifdef ABYSS_WIN32
|
||||||
|
typedef SOCKET TSocket;
|
||||||
|
#else
|
||||||
|
typedef uint32_t TSocket;
|
||||||
|
#endif /* ABYSS_WIN32 */
|
||||||
|
|
||||||
|
typedef struct in_addr TIPAddr;
|
||||||
|
|
||||||
|
#define IPB1(x) (((unsigned char *)(&x))[0])
|
||||||
|
#define IPB2(x) (((unsigned char *)(&x))[1])
|
||||||
|
#define IPB3(x) (((unsigned char *)(&x))[2])
|
||||||
|
#define IPB4(x) (((unsigned char *)(&x))[3])
|
||||||
|
|
||||||
|
abyss_bool SocketInit(void);
|
||||||
|
|
||||||
|
abyss_bool SocketCreate(TSocket *s);
|
||||||
|
abyss_bool SocketClose(TSocket *s);
|
||||||
|
|
||||||
|
int SocketWrite(TSocket *s, char *buffer, uint32_t len);
|
||||||
|
uint32_t SocketRead(TSocket *s, char *buffer, uint32_t len);
|
||||||
|
uint32_t SocketPeek(TSocket *s, char *buffer, uint32_t len);
|
||||||
|
|
||||||
|
abyss_bool SocketConnect(TSocket *s, TIPAddr *addr, uint16_t port);
|
||||||
|
abyss_bool SocketBind(TSocket *s, TIPAddr *addr, uint16_t port);
|
||||||
|
|
||||||
|
abyss_bool SocketListen(TSocket *s, uint32_t backlog);
|
||||||
|
abyss_bool SocketAccept(TSocket *s, TSocket *ns,TIPAddr *ip);
|
||||||
|
|
||||||
|
uint32_t SocketError(void);
|
||||||
|
|
||||||
|
uint32_t SocketWait(TSocket *s,abyss_bool rd,abyss_bool wr,uint32_t timems);
|
||||||
|
|
||||||
|
abyss_bool SocketBlocking(TSocket *s, abyss_bool b);
|
||||||
|
uint32_t SocketAvailableReadBytes(TSocket *s);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** File
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
|
#ifndef NAME_MAX
|
||||||
|
#define NAME_MAX 1024
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef ABYSS_WIN32
|
||||||
|
#ifndef __BORLANDC__
|
||||||
|
#define O_APPEND _O_APPEND
|
||||||
|
#define O_CREAT _O_CREAT
|
||||||
|
#define O_EXCL _O_EXCL
|
||||||
|
#define O_RDONLY _O_RDONLY
|
||||||
|
#define O_RDWR _O_RDWR
|
||||||
|
#define O_TRUNC _O_TRUNC
|
||||||
|
#define O_WRONLY _O_WRONLY
|
||||||
|
#define O_TEXT _O_TEXT
|
||||||
|
#define O_BINARY _O_BINARY
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define A_HIDDEN _A_HIDDEN
|
||||||
|
#define A_NORMAL _A_NORMAL
|
||||||
|
#define A_RDONLY _A_RDONLY
|
||||||
|
#define A_SUBDIR _A_SUBDIR
|
||||||
|
#else
|
||||||
|
#define A_SUBDIR 1
|
||||||
|
#define O_BINARY 0
|
||||||
|
#define O_TEXT 0
|
||||||
|
#endif /* ABYSS_WIN32 */
|
||||||
|
|
||||||
|
#ifdef ABYSS_WIN32
|
||||||
|
|
||||||
|
#ifndef __BORLANDC__
|
||||||
|
typedef struct _stati64 TFileStat;
|
||||||
|
typedef struct _finddata_t TFileInfo;
|
||||||
|
typedef long TFileFind;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
typedef struct stat TFileStat;
|
||||||
|
typedef struct finddata_t
|
||||||
|
{
|
||||||
|
char name[NAME_MAX+1];
|
||||||
|
int attrib;
|
||||||
|
uint64_t size;
|
||||||
|
time_t time_write;
|
||||||
|
WIN32_FIND_DATA data;
|
||||||
|
} TFileInfo;
|
||||||
|
typedef HANDLE TFileFind;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
|
||||||
|
typedef struct stat TFileStat;
|
||||||
|
|
||||||
|
typedef struct finddata_t
|
||||||
|
{
|
||||||
|
char name[NAME_MAX+1];
|
||||||
|
int attrib;
|
||||||
|
uint64_t size;
|
||||||
|
time_t time_write;
|
||||||
|
} TFileInfo;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
char path[NAME_MAX+1];
|
||||||
|
DIR *handle;
|
||||||
|
} TFileFind;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef int TFile;
|
||||||
|
|
||||||
|
abyss_bool FileOpen(TFile *f, const char *name,uint32_t attrib);
|
||||||
|
abyss_bool FileOpenCreate(TFile *f, const char *name, uint32_t attrib);
|
||||||
|
abyss_bool FileClose(TFile *f);
|
||||||
|
|
||||||
|
abyss_bool FileWrite(TFile *f, void *buffer, uint32_t len);
|
||||||
|
int32_t FileRead(TFile *f, void *buffer, uint32_t len);
|
||||||
|
|
||||||
|
abyss_bool FileSeek(TFile *f, uint64_t pos, uint32_t attrib);
|
||||||
|
uint64_t FileSize(TFile *f);
|
||||||
|
|
||||||
|
abyss_bool FileStat(char *filename,TFileStat *filestat);
|
||||||
|
|
||||||
|
abyss_bool FileFindFirst(TFileFind *filefind,char *path,TFileInfo *fileinfo);
|
||||||
|
abyss_bool FileFindNext(TFileFind *filefind,TFileInfo *fileinfo);
|
||||||
|
void FileFindClose(TFileFind *filefind);
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Server (1/2)
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
typedef struct _TServer
|
||||||
|
{
|
||||||
|
TSocket listensock;
|
||||||
|
TFile logfile;
|
||||||
|
TMutex logmutex;
|
||||||
|
char *name;
|
||||||
|
char *filespath;
|
||||||
|
uint16_t port;
|
||||||
|
uint32_t keepalivetimeout,keepalivemaxconn,timeout;
|
||||||
|
TList handlers;
|
||||||
|
TList defaultfilenames;
|
||||||
|
void *defaulthandler;
|
||||||
|
abyss_bool advertise;
|
||||||
|
#ifndef _WIN32
|
||||||
|
uid_t uid;
|
||||||
|
gid_t gid;
|
||||||
|
TFile pidfile;
|
||||||
|
#endif
|
||||||
|
} TServer;
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Conn
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#define BUFFER_SIZE 4096
|
||||||
|
|
||||||
|
typedef struct _TConn
|
||||||
|
{
|
||||||
|
TServer *server;
|
||||||
|
uint32_t buffersize,bufferpos;
|
||||||
|
uint32_t inbytes,outbytes;
|
||||||
|
TSocket socket;
|
||||||
|
TIPAddr peerip;
|
||||||
|
abyss_bool hasOwnThread;
|
||||||
|
TThread thread;
|
||||||
|
abyss_bool connected;
|
||||||
|
abyss_bool inUse;
|
||||||
|
const char * trace;
|
||||||
|
void (*job)(struct _TConn *);
|
||||||
|
char buffer[BUFFER_SIZE];
|
||||||
|
} TConn;
|
||||||
|
|
||||||
|
TConn *ConnAlloc(void);
|
||||||
|
void ConnFree(TConn *c);
|
||||||
|
|
||||||
|
enum abyss_foreback {ABYSS_FOREGROUND, ABYSS_BACKGROUND};
|
||||||
|
|
||||||
|
abyss_bool ConnCreate(TConn *c, TSocket *s, void (*func)(TConn *));
|
||||||
|
abyss_bool ConnCreate2(TConn * const connectionP,
|
||||||
|
TServer * const serverP,
|
||||||
|
TSocket const connectedSocket,
|
||||||
|
TIPAddr const peerIpAddr,
|
||||||
|
void ( * func)(TConn *),
|
||||||
|
enum abyss_foreback const foregroundBackground);
|
||||||
|
abyss_bool ConnProcess(TConn *c);
|
||||||
|
abyss_bool ConnKill(TConn *c);
|
||||||
|
void ConnClose(TConn *c);
|
||||||
|
|
||||||
|
abyss_bool ConnWrite(TConn *c,void *buffer,uint32_t size);
|
||||||
|
abyss_bool ConnRead(TConn *c, uint32_t timems);
|
||||||
|
void ConnReadInit(TConn *c);
|
||||||
|
abyss_bool ConnReadLine(TConn *c,char **z,uint32_t timems);
|
||||||
|
|
||||||
|
abyss_bool ConnWriteFromFile(TConn *c,TFile *file,uint64_t start,uint64_t end,
|
||||||
|
void *buffer,uint32_t buffersize,uint32_t rate);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Range
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
abyss_bool RangeDecode(char *str,uint64_t filesize,uint64_t *start,uint64_t *end);
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Date
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
typedef struct tm TDate;
|
||||||
|
|
||||||
|
abyss_bool DateToString(TDate *tm,char *s);
|
||||||
|
abyss_bool DateToLogString(TDate *tm,char *s);
|
||||||
|
|
||||||
|
abyss_bool DateDecode(char *s,TDate *tm);
|
||||||
|
|
||||||
|
int32_t DateCompare(TDate *d1,TDate *d2);
|
||||||
|
|
||||||
|
abyss_bool DateFromGMT(TDate *d,time_t t);
|
||||||
|
abyss_bool DateFromLocal(TDate *d,time_t t);
|
||||||
|
|
||||||
|
abyss_bool DateInit(void);
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Base64
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
void Base64Encode(char *s,char *d);
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Session
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
m_unknown,m_get,m_put,m_head,m_post,m_delete,m_trace,m_options
|
||||||
|
} TMethod;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
TMethod method;
|
||||||
|
uint32_t nbfileds;
|
||||||
|
char *uri;
|
||||||
|
char *query;
|
||||||
|
char *host;
|
||||||
|
char *from;
|
||||||
|
char *useragent;
|
||||||
|
char *referer;
|
||||||
|
char *requestline;
|
||||||
|
char *user;
|
||||||
|
uint16_t port;
|
||||||
|
TList cookies;
|
||||||
|
TList ranges;
|
||||||
|
|
||||||
|
uint16_t status;
|
||||||
|
TString header;
|
||||||
|
|
||||||
|
abyss_bool keepalive,cankeepalive;
|
||||||
|
abyss_bool done;
|
||||||
|
|
||||||
|
TServer *server;
|
||||||
|
TConn *conn;
|
||||||
|
|
||||||
|
uint8_t versionminor,versionmajor;
|
||||||
|
|
||||||
|
TTable request_headers,response_headers;
|
||||||
|
|
||||||
|
TDate date;
|
||||||
|
|
||||||
|
abyss_bool chunkedwrite,chunkedwritemode;
|
||||||
|
} TSession;
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Request
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
#define CR '\r'
|
||||||
|
#define LF '\n'
|
||||||
|
#define CRLF "\r\n"
|
||||||
|
|
||||||
|
abyss_bool RequestValidURI(TSession *r);
|
||||||
|
abyss_bool RequestValidURIPath(TSession *r);
|
||||||
|
abyss_bool RequestUnescapeURI(TSession *r);
|
||||||
|
|
||||||
|
char *RequestHeaderValue(TSession *r,char *name);
|
||||||
|
|
||||||
|
abyss_bool RequestRead(TSession *r);
|
||||||
|
void RequestInit(TSession *r,TConn *c);
|
||||||
|
void RequestFree(TSession *r);
|
||||||
|
|
||||||
|
abyss_bool RequestAuth(TSession *r,char *credential,char *user,char *pass);
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Response
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
abyss_bool ResponseAddField(TSession *r,char *name,char *value);
|
||||||
|
void ResponseWrite(TSession *r);
|
||||||
|
|
||||||
|
abyss_bool ResponseChunked(TSession *s);
|
||||||
|
|
||||||
|
void ResponseStatus(TSession *r,uint16_t code);
|
||||||
|
void ResponseStatusErrno(TSession *r);
|
||||||
|
|
||||||
|
abyss_bool ResponseContentType(TSession *r,char *type);
|
||||||
|
abyss_bool ResponseContentLength(TSession *r,uint64_t len);
|
||||||
|
|
||||||
|
void ResponseError(TSession *r);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** HTTP
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
char *HTTPReasonByStatus(uint16_t status);
|
||||||
|
|
||||||
|
int32_t HTTPRead(TSession *s,char *buffer,uint32_t len);
|
||||||
|
|
||||||
|
abyss_bool HTTPWrite(TSession *s,char *buffer,uint32_t len);
|
||||||
|
abyss_bool HTTPWriteEnd(TSession *s);
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Server (2/2)
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
abyss_bool ServerCreate(TServer *srv,
|
||||||
|
const char *name,
|
||||||
|
uint16_t port,
|
||||||
|
const char *filespath,
|
||||||
|
const char *logfilename);
|
||||||
|
|
||||||
|
void ServerFree(TServer *srv);
|
||||||
|
|
||||||
|
void ServerInit(TServer *srv);
|
||||||
|
void ServerRun(TServer *srv);
|
||||||
|
void ServerRunOnce(TServer *srv);
|
||||||
|
void ServerRunOnce2(TServer * const srv,
|
||||||
|
enum abyss_foreback const foregroundBackground);
|
||||||
|
|
||||||
|
typedef abyss_bool (*URIHandler) (TSession *); /* deprecated */
|
||||||
|
|
||||||
|
struct URIHandler2;
|
||||||
|
|
||||||
|
typedef void (*initHandlerFn)(struct URIHandler2 *,
|
||||||
|
abyss_bool *);
|
||||||
|
|
||||||
|
typedef void (*termHandlerFn)(struct URIHandler2 *);
|
||||||
|
|
||||||
|
typedef void (*handleReq2Fn)(struct URIHandler2 *,
|
||||||
|
TSession *,
|
||||||
|
abyss_bool *);
|
||||||
|
|
||||||
|
typedef struct URIHandler2 {
|
||||||
|
initHandlerFn init;
|
||||||
|
termHandlerFn term;
|
||||||
|
handleReq2Fn handleReq2;
|
||||||
|
URIHandler handleReq1; /* deprecated */
|
||||||
|
void * userdata;
|
||||||
|
} URIHandler2;
|
||||||
|
|
||||||
|
void
|
||||||
|
ServerAddHandler2(TServer * const srvP,
|
||||||
|
URIHandler2 * const handlerP,
|
||||||
|
abyss_bool * const successP);
|
||||||
|
|
||||||
|
abyss_bool
|
||||||
|
ServerAddHandler(TServer * const srvP,
|
||||||
|
URIHandler const handler);
|
||||||
|
|
||||||
|
void
|
||||||
|
ServerDefaultHandler(TServer * const srvP,
|
||||||
|
URIHandler const handler);
|
||||||
|
|
||||||
|
abyss_bool LogOpen(TServer *srv, const char *filename);
|
||||||
|
void LogWrite(TServer *srv,char *c);
|
||||||
|
void LogClose(TServer *srv);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** MIMEType
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
void MIMETypeInit(void);
|
||||||
|
abyss_bool MIMETypeAdd(char *type,char *ext);
|
||||||
|
char *MIMETypeFromExt(char *ext);
|
||||||
|
char *MIMETypeFromFileName(char *filename);
|
||||||
|
char *MIMETypeGuessFromFile(char *filename);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Conf
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
abyss_bool ConfReadMIMETypes(char *filename);
|
||||||
|
abyss_bool ConfReadServerFile(const char *filename,TServer *srv);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Trace
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
void TraceMsg(char *fmt,...);
|
||||||
|
void TraceExit(char *fmt,...);
|
||||||
|
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
** Session
|
||||||
|
*********************************************************************/
|
||||||
|
|
||||||
|
abyss_bool SessionLog(TSession *s);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*****************************************************************************
|
||||||
|
** Here is the copyright notice from the Abyss web server project file from
|
||||||
|
** which this file is derived.
|
||||||
|
**
|
||||||
|
** Copyright (C) 2000 by Moez Mahfoudh <mmoez@bigfoot.com>.
|
||||||
|
** All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
** SUCH DAMAGE.
|
||||||
|
**
|
||||||
|
******************************************************************************/
|
||||||
|
#endif /* _ABYSS_H_ */
|
886
libs/xmlrpc-c/include/xmlrpc-c/base.h
Normal file
886
libs/xmlrpc-c/include/xmlrpc-c/base.h
Normal file
@ -0,0 +1,886 @@
|
|||||||
|
/* Copyright and license information is at the end of the file */
|
||||||
|
|
||||||
|
#ifndef XMLRPC_H_INCLUDED
|
||||||
|
#define XMLRPC_H_INCLUDED
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_UNICODE_WCHAR
|
||||||
|
#include <wchar.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Typedefs
|
||||||
|
**=========================================================================
|
||||||
|
** We define names for these types, because they may change from platform
|
||||||
|
** to platform.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef signed int xmlrpc_int;
|
||||||
|
/* An integer of the type defined by XML-RPC <int>; i.e. 32 bit */
|
||||||
|
typedef signed int xmlrpc_int32;
|
||||||
|
/* An integer of the type defined by XML-RPC <int4>; i.e. 32 bit */
|
||||||
|
typedef int xmlrpc_bool;
|
||||||
|
/* A boolean (of the type defined by XML-RPC <boolean>, but there's
|
||||||
|
really only one kind)
|
||||||
|
*/
|
||||||
|
typedef double xmlrpc_double;
|
||||||
|
/* A double precision floating point number as defined by
|
||||||
|
XML-RPC <float>. But the C "double" type is universally the same,
|
||||||
|
so it's probably clearer just to use that. This typedef is here
|
||||||
|
for mathematical completeness.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define XMLRPC_INT32_MAX (2147483647)
|
||||||
|
#define XMLRPC_INT32_MIN (-XMLRPC_INT32_MAX - 1)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** C struct size computations
|
||||||
|
**=======================================================================*/
|
||||||
|
|
||||||
|
/* Use XMLRPC_STRUCT_MEMBER_SIZE() to determine how big a structure is
|
||||||
|
up to and including a specified member. E.g. if you have
|
||||||
|
struct mystruct {int red; int green; int blue};, then
|
||||||
|
XMLRPC_STRUCT_MEMBER_SIZE(mystruct, green) is (8).
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define _XMLRPC_STRUCT_MEMBER_OFFSET(TYPE, MBRNAME) \
|
||||||
|
((unsigned long)(char*)&((TYPE *)0)->MBRNAME)
|
||||||
|
#define _XMLRPC_STRUCT_MEMBER_SIZE(TYPE, MBRNAME) \
|
||||||
|
sizeof(((TYPE *)0)->MBRNAME)
|
||||||
|
#define XMLRPC_STRUCTSIZE(TYPE, MBRNAME) \
|
||||||
|
(_XMLRPC_STRUCT_MEMBER_OFFSET(TYPE, MBRNAME) + \
|
||||||
|
_XMLRPC_STRUCT_MEMBER_SIZE(TYPE, MBRNAME))
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Assertions and Debugging
|
||||||
|
**=========================================================================
|
||||||
|
** Note that an assertion is _not_ a directive to check a condition and
|
||||||
|
** crash if it isn't true. It is an assertion that the condition _is_
|
||||||
|
** true. This assertion helps people to read the code. The program
|
||||||
|
** may also check the assertion as it runs, and if it conflicts with reality,
|
||||||
|
** recognize that the program is incorrect and abort it. In practice,
|
||||||
|
** it does this checking when the program was compiled without the NDEBUG
|
||||||
|
** macro defined.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
|
||||||
|
#define XMLRPC_ASSERT(cond) \
|
||||||
|
do \
|
||||||
|
if (!(cond)) \
|
||||||
|
xmlrpc_assertion_failed(__FILE__, __LINE__); \
|
||||||
|
while (0)
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define XMLRPC_ASSERT(cond) (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern void xmlrpc_assertion_failed (char* file, int line);
|
||||||
|
|
||||||
|
/* Validate a pointer. */
|
||||||
|
#define XMLRPC_ASSERT_PTR_OK(ptr) \
|
||||||
|
XMLRPC_ASSERT((ptr) != NULL)
|
||||||
|
|
||||||
|
/* We only call this if something truly drastic happens. */
|
||||||
|
#define XMLRPC_FATAL_ERROR(msg) xmlrpc_fatal_error(__FILE__, __LINE__, (msg))
|
||||||
|
|
||||||
|
extern void xmlrpc_fatal_error (char* file, int line, char* msg);
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Strings
|
||||||
|
**=======================================================================*/
|
||||||
|
|
||||||
|
/* Traditional C strings are char *, because they come from a time before
|
||||||
|
there was 'const'. Now, const char * makes a lot more sense. Also,
|
||||||
|
in modern times, we tend to dynamically allocate memory for strings.
|
||||||
|
We need this free function accordingly. Ordinary free() doesn't check
|
||||||
|
the type, and can generate a warning due to the 'const'.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xmlrpc_strfree(const char * const string);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** xmlrpc_env
|
||||||
|
**=========================================================================
|
||||||
|
** XML-RPC represents runtime errors as <fault> elements. These contain
|
||||||
|
** <faultCode> and <faultString> elements.
|
||||||
|
**
|
||||||
|
** Since we need as much thread-safety as possible, we borrow an idea from
|
||||||
|
** CORBA--we store exception information in an "environment" object.
|
||||||
|
** You'll pass this to many different functions, and it will get filled
|
||||||
|
** out appropriately.
|
||||||
|
**
|
||||||
|
** For example:
|
||||||
|
**
|
||||||
|
** xmlrpc_env env;
|
||||||
|
**
|
||||||
|
** xmlrpc_env_init(&env);
|
||||||
|
**
|
||||||
|
** xmlrpc_do_something(&env);
|
||||||
|
** if (env.fault_occurred)
|
||||||
|
** report_error_appropriately();
|
||||||
|
**
|
||||||
|
** xmlrpc_env_clean(&env);
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define XMLRPC_INTERNAL_ERROR (-500)
|
||||||
|
#define XMLRPC_TYPE_ERROR (-501)
|
||||||
|
#define XMLRPC_INDEX_ERROR (-502)
|
||||||
|
#define XMLRPC_PARSE_ERROR (-503)
|
||||||
|
#define XMLRPC_NETWORK_ERROR (-504)
|
||||||
|
#define XMLRPC_TIMEOUT_ERROR (-505)
|
||||||
|
#define XMLRPC_NO_SUCH_METHOD_ERROR (-506)
|
||||||
|
#define XMLRPC_REQUEST_REFUSED_ERROR (-507)
|
||||||
|
#define XMLRPC_INTROSPECTION_DISABLED_ERROR (-508)
|
||||||
|
#define XMLRPC_LIMIT_EXCEEDED_ERROR (-509)
|
||||||
|
#define XMLRPC_INVALID_UTF8_ERROR (-510)
|
||||||
|
|
||||||
|
typedef struct _xmlrpc_env {
|
||||||
|
int fault_occurred;
|
||||||
|
xmlrpc_int32 fault_code;
|
||||||
|
char* fault_string;
|
||||||
|
} xmlrpc_env;
|
||||||
|
|
||||||
|
/* Initialize and destroy the contents of the provided xmlrpc_env object.
|
||||||
|
** These functions will never fail. */
|
||||||
|
void xmlrpc_env_init (xmlrpc_env* env);
|
||||||
|
void xmlrpc_env_clean (xmlrpc_env* env);
|
||||||
|
|
||||||
|
/* Fill out an xmlrpc_fault with the specified values, and set the
|
||||||
|
** fault_occurred flag. This function will make a private copy of 'string',
|
||||||
|
** so you retain responsibility for your copy. */
|
||||||
|
void
|
||||||
|
xmlrpc_env_set_fault(xmlrpc_env * const env,
|
||||||
|
int const faultCode,
|
||||||
|
const char * const faultDescription);
|
||||||
|
|
||||||
|
/* The same as the above, but using a printf-style format string. */
|
||||||
|
void
|
||||||
|
xmlrpc_env_set_fault_formatted (xmlrpc_env * const envP,
|
||||||
|
int const code,
|
||||||
|
const char * const format,
|
||||||
|
...);
|
||||||
|
|
||||||
|
/* This one infers XMLRPC_INTERNAL_ERROR and has a shorter name.
|
||||||
|
So a call takes up less source code space.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xmlrpc_faultf(xmlrpc_env * const envP,
|
||||||
|
const char * const format,
|
||||||
|
...);
|
||||||
|
|
||||||
|
/* A simple debugging assertion. */
|
||||||
|
#define XMLRPC_ASSERT_ENV_OK(env) \
|
||||||
|
XMLRPC_ASSERT((env) != NULL && !(env)->fault_occurred)
|
||||||
|
|
||||||
|
/* This version must *not* interpret 'str' as a format string, to avoid
|
||||||
|
** several evil attacks. */
|
||||||
|
#define XMLRPC_FAIL(env,code,str) \
|
||||||
|
do { xmlrpc_env_set_fault((env),(code),(str)); goto cleanup; } while (0)
|
||||||
|
|
||||||
|
#define XMLRPC_FAIL1(env,code,str,arg1) \
|
||||||
|
do { \
|
||||||
|
xmlrpc_env_set_fault_formatted((env),(code),(str),(arg1)); \
|
||||||
|
goto cleanup; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define XMLRPC_FAIL2(env,code,str,arg1,arg2) \
|
||||||
|
do { \
|
||||||
|
xmlrpc_env_set_fault_formatted((env),(code),(str),(arg1),(arg2)); \
|
||||||
|
goto cleanup; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define XMLRPC_FAIL3(env,code,str,arg1,arg2,arg3) \
|
||||||
|
do { \
|
||||||
|
xmlrpc_env_set_fault_formatted((env),(code), \
|
||||||
|
(str),(arg1),(arg2),(arg3)); \
|
||||||
|
goto cleanup; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define XMLRPC_FAIL_IF_NULL(ptr,env,code,str) \
|
||||||
|
do { \
|
||||||
|
if ((ptr) == NULL) \
|
||||||
|
XMLRPC_FAIL((env),(code),(str)); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define XMLRPC_FAIL_IF_FAULT(env) \
|
||||||
|
do { if ((env)->fault_occurred) goto cleanup; } while (0)
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Resource Limits
|
||||||
|
**=========================================================================
|
||||||
|
** To discourage denial-of-service attacks, we provide several adjustable
|
||||||
|
** resource limits. These functions are *not* re-entrant.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Limit IDs. There will be more of these as time goes on. */
|
||||||
|
#define XMLRPC_NESTING_LIMIT_ID (0)
|
||||||
|
#define XMLRPC_XML_SIZE_LIMIT_ID (1)
|
||||||
|
#define XMLRPC_LAST_LIMIT_ID (XMLRPC_XML_SIZE_LIMIT_ID)
|
||||||
|
|
||||||
|
/* By default, deserialized data may be no more than 64 levels deep. */
|
||||||
|
#define XMLRPC_NESTING_LIMIT_DEFAULT (64)
|
||||||
|
|
||||||
|
/* By default, XML data from the network may be no larger than 512K.
|
||||||
|
** Some client and server modules may fail to enforce this properly. */
|
||||||
|
#define XMLRPC_XML_SIZE_LIMIT_DEFAULT (512*1024)
|
||||||
|
|
||||||
|
/* Set a specific limit to the specified value. */
|
||||||
|
extern void xmlrpc_limit_set (int limit_id, size_t value);
|
||||||
|
|
||||||
|
/* Get the value of a specified limit. */
|
||||||
|
extern size_t xmlrpc_limit_get (int limit_id);
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** xmlrpc_mem_block
|
||||||
|
**=========================================================================
|
||||||
|
** A resizable chunk of memory. This is mostly used internally, but it is
|
||||||
|
** also used by the public API in a few places.
|
||||||
|
** The struct fields are private!
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct _xmlrpc_mem_block {
|
||||||
|
size_t _size;
|
||||||
|
size_t _allocated;
|
||||||
|
void* _block;
|
||||||
|
} xmlrpc_mem_block;
|
||||||
|
|
||||||
|
/* Allocate a new xmlrpc_mem_block. */
|
||||||
|
xmlrpc_mem_block* xmlrpc_mem_block_new (xmlrpc_env* env, size_t size);
|
||||||
|
|
||||||
|
/* Destroy an existing xmlrpc_mem_block, and everything it contains. */
|
||||||
|
void xmlrpc_mem_block_free (xmlrpc_mem_block* block);
|
||||||
|
|
||||||
|
/* Initialize the contents of the provided xmlrpc_mem_block. */
|
||||||
|
void xmlrpc_mem_block_init
|
||||||
|
(xmlrpc_env* env, xmlrpc_mem_block* block, size_t size);
|
||||||
|
|
||||||
|
/* Deallocate the contents of the provided xmlrpc_mem_block, but not the
|
||||||
|
** block itself. */
|
||||||
|
void xmlrpc_mem_block_clean (xmlrpc_mem_block* block);
|
||||||
|
|
||||||
|
/* Get the size and contents of the xmlrpc_mem_block. */
|
||||||
|
size_t
|
||||||
|
xmlrpc_mem_block_size(const xmlrpc_mem_block * const block);
|
||||||
|
|
||||||
|
void *
|
||||||
|
xmlrpc_mem_block_contents(const xmlrpc_mem_block * const block);
|
||||||
|
|
||||||
|
/* Resize an xmlrpc_mem_block, preserving as much of the contents as
|
||||||
|
** possible. */
|
||||||
|
void xmlrpc_mem_block_resize
|
||||||
|
(xmlrpc_env* env, xmlrpc_mem_block* block, size_t size);
|
||||||
|
|
||||||
|
/* Append data to an existing xmlrpc_mem_block. */
|
||||||
|
void xmlrpc_mem_block_append
|
||||||
|
(xmlrpc_env* env, xmlrpc_mem_block* block, const void *data, size_t len);
|
||||||
|
|
||||||
|
#define XMLRPC_MEMBLOCK_NEW(type,env,size) \
|
||||||
|
xmlrpc_mem_block_new((env), sizeof(type) * (size))
|
||||||
|
#define XMLRPC_MEMBLOCK_FREE(type,block) \
|
||||||
|
xmlrpc_mem_block_free(block)
|
||||||
|
#define XMLRPC_MEMBLOCK_INIT(type,env,block,size) \
|
||||||
|
xmlrpc_mem_block_init((env), (block), sizeof(type) * (size))
|
||||||
|
#define XMLRPC_MEMBLOCK_CLEAN(type,block) \
|
||||||
|
xmlrpc_mem_block_clean(block)
|
||||||
|
#define XMLRPC_MEMBLOCK_SIZE(type,block) \
|
||||||
|
(xmlrpc_mem_block_size(block) / sizeof(type))
|
||||||
|
#define XMLRPC_MEMBLOCK_CONTENTS(type,block) \
|
||||||
|
((type*) xmlrpc_mem_block_contents(block))
|
||||||
|
#define XMLRPC_MEMBLOCK_RESIZE(type,env,block,size) \
|
||||||
|
xmlrpc_mem_block_resize(env, block, sizeof(type) * (size))
|
||||||
|
#define XMLRPC_MEMBLOCK_APPEND(type,env,block,data,size) \
|
||||||
|
xmlrpc_mem_block_append(env, block, data, sizeof(type) * (size))
|
||||||
|
|
||||||
|
/* Here are some backward compatibility definitions. These longer names
|
||||||
|
used to be the only ones and typed memory blocks were considered
|
||||||
|
special.
|
||||||
|
*/
|
||||||
|
#define XMLRPC_TYPED_MEM_BLOCK_NEW(type,env,size) \
|
||||||
|
XMLRPC_MEMBLOCK_NEW(type,env,size)
|
||||||
|
#define XMLRPC_TYPED_MEM_BLOCK_FREE(type,block) \
|
||||||
|
XMLRPC_MEMBLOCK_FREE(type,block)
|
||||||
|
#define XMLRPC_TYPED_MEM_BLOCK_INIT(type,env,block,size) \
|
||||||
|
XMLRPC_MEMBLOCK_INIT(type,env,block,size)
|
||||||
|
#define XMLRPC_TYPED_MEM_BLOCK_CLEAN(type,block) \
|
||||||
|
XMLRPC_MEMBLOCK_CLEAN(type,block)
|
||||||
|
#define XMLRPC_TYPED_MEM_BLOCK_SIZE(type,block) \
|
||||||
|
XMLRPC_MEMBLOCK_SIZE(type,block)
|
||||||
|
#define XMLRPC_TYPED_MEM_BLOCK_CONTENTS(type,block) \
|
||||||
|
XMLRPC_MEMBLOCK_CONTENTS(type,block)
|
||||||
|
#define XMLRPC_TYPED_MEM_BLOCK_RESIZE(type,env,block,size) \
|
||||||
|
XMLRPC_MEMBLOCK_RESIZE(type,env,block,size)
|
||||||
|
#define XMLRPC_TYPED_MEM_BLOCK_APPEND(type,env,block,data,size) \
|
||||||
|
XMLRPC_MEMBLOCK_APPEND(type,env,block,data,size)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** xmlrpc_value
|
||||||
|
**=========================================================================
|
||||||
|
** An XML-RPC value (of any type).
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
XMLRPC_TYPE_INT = 0,
|
||||||
|
XMLRPC_TYPE_BOOL = 1,
|
||||||
|
XMLRPC_TYPE_DOUBLE = 2,
|
||||||
|
XMLRPC_TYPE_DATETIME = 3,
|
||||||
|
XMLRPC_TYPE_STRING = 4,
|
||||||
|
XMLRPC_TYPE_BASE64 = 5,
|
||||||
|
XMLRPC_TYPE_ARRAY = 6,
|
||||||
|
XMLRPC_TYPE_STRUCT = 7,
|
||||||
|
XMLRPC_TYPE_C_PTR = 8,
|
||||||
|
XMLRPC_TYPE_NIL = 9,
|
||||||
|
XMLRPC_TYPE_DEAD = 0xDEAD
|
||||||
|
} xmlrpc_type;
|
||||||
|
|
||||||
|
/* These are *always* allocated on the heap. No exceptions. */
|
||||||
|
typedef struct _xmlrpc_value xmlrpc_value;
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_abort_if_array_bad(xmlrpc_value * const arrayP);
|
||||||
|
|
||||||
|
#define XMLRPC_ASSERT_ARRAY_OK(val) \
|
||||||
|
xmlrpc_abort_if_array_bad(val)
|
||||||
|
|
||||||
|
/* Increment the reference count of an xmlrpc_value. */
|
||||||
|
extern void xmlrpc_INCREF (xmlrpc_value* value);
|
||||||
|
|
||||||
|
/* Decrement the reference count of an xmlrpc_value. If there
|
||||||
|
** are no more references, free it. */
|
||||||
|
extern void xmlrpc_DECREF (xmlrpc_value* value);
|
||||||
|
|
||||||
|
/* Get the type of an XML-RPC value. */
|
||||||
|
extern xmlrpc_type xmlrpc_value_type (xmlrpc_value* value);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_int_new(xmlrpc_env * const envP,
|
||||||
|
int const intValue);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_int(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
int * const intValueP);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_bool_new(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_bool const boolValue);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_bool(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
xmlrpc_bool * const boolValueP);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_double_new(xmlrpc_env * const envP,
|
||||||
|
double const doubleValue);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_double(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
xmlrpc_double * const doubleValueP);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_datetime_new_str(xmlrpc_env * const envP,
|
||||||
|
const char * const value);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_datetime_new_sec(xmlrpc_env * const envP,
|
||||||
|
time_t const value);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_datetime_str(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
const char ** const stringValueP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_datetime_sec(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
time_t * const timeValueP);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_string_new(xmlrpc_env * const envP,
|
||||||
|
const char * const stringValue);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_string_new_lp(xmlrpc_env * const envP,
|
||||||
|
size_t const length,
|
||||||
|
const char * const stringValue);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_string(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
const char ** const stringValueP);
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_string_lp(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
size_t * const lengthP,
|
||||||
|
const char ** const stringValueP);
|
||||||
|
|
||||||
|
#ifdef HAVE_UNICODE_WCHAR
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_string_w_new(xmlrpc_env * const envP,
|
||||||
|
const wchar_t * const stringValue);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_string_w_new_lp(xmlrpc_env * const envP,
|
||||||
|
size_t const length,
|
||||||
|
const wchar_t * const stringValue);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_string_w(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const valueP,
|
||||||
|
const wchar_t ** const stringValueP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_string_w_lp(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const valueP,
|
||||||
|
size_t * const lengthP,
|
||||||
|
const wchar_t ** const stringValueP);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_base64_new(xmlrpc_env * const envP,
|
||||||
|
size_t const length,
|
||||||
|
const unsigned char * const value);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_base64(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
size_t * const lengthP,
|
||||||
|
const unsigned char ** const bytestringValueP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_base64_size(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
size_t * const lengthP);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_array_new(xmlrpc_env * const envP);
|
||||||
|
|
||||||
|
/* Return the number of elements in an XML-RPC array.
|
||||||
|
** Sets XMLRPC_TYPE_ERROR if 'array' is not an array. */
|
||||||
|
int
|
||||||
|
xmlrpc_array_size(xmlrpc_env * const env,
|
||||||
|
const xmlrpc_value * const array);
|
||||||
|
|
||||||
|
/* Append an item to an XML-RPC array.
|
||||||
|
** Sets XMLRPC_TYPE_ERROR if 'array' is not an array. */
|
||||||
|
extern void
|
||||||
|
xmlrpc_array_append_item (xmlrpc_env * envP,
|
||||||
|
xmlrpc_value * arrayP,
|
||||||
|
xmlrpc_value * valueP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_array_read_item(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const arrayP,
|
||||||
|
unsigned int const index,
|
||||||
|
xmlrpc_value ** const valuePP);
|
||||||
|
|
||||||
|
/* Deprecated. Use xmlrpc_array_read_item() instead.
|
||||||
|
|
||||||
|
Get an item from an XML-RPC array.
|
||||||
|
Does not increment the reference count of the returned value.
|
||||||
|
Sets XMLRPC_TYPE_ERROR if 'array' is not an array.
|
||||||
|
Sets XMLRPC_INDEX_ERROR if 'index' is out of bounds.
|
||||||
|
*/
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_array_get_item(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const arrayP,
|
||||||
|
int const index);
|
||||||
|
|
||||||
|
/* Not implemented--we don't need it yet.
|
||||||
|
extern
|
||||||
|
int xmlrpc_array_set_item (xmlrpc_env* env,
|
||||||
|
xmlrpc_value* array,
|
||||||
|
int index,
|
||||||
|
xmlrpc_value* value);
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_nil(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const valueP);
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_cptr(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
void ** const ptrValueP);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_struct_new(xmlrpc_env * env);
|
||||||
|
|
||||||
|
/* Return the number of key/value pairs in a struct.
|
||||||
|
** Sets XMLRPC_TYPE_ERROR if 'strct' is not a struct. */
|
||||||
|
int
|
||||||
|
xmlrpc_struct_size (xmlrpc_env * env,
|
||||||
|
xmlrpc_value * strct);
|
||||||
|
|
||||||
|
/* Returns true iff 'strct' contains 'key'.
|
||||||
|
** Sets XMLRPC_TYPE_ERROR if 'strct' is not a struct. */
|
||||||
|
int
|
||||||
|
xmlrpc_struct_has_key(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const strctP,
|
||||||
|
const char * const key);
|
||||||
|
|
||||||
|
/* The same as the above, but the key may contain zero bytes.
|
||||||
|
Deprecated. xmlrpc_struct_get_value_v() is more general, and this
|
||||||
|
case is not common enough to warrant a shortcut.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
xmlrpc_struct_has_key_n(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const strctP,
|
||||||
|
const char * const key,
|
||||||
|
size_t const key_len);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* Not implemented yet, but needed for completeness. */
|
||||||
|
int
|
||||||
|
xmlrpc_struct_has_key_v(xmlrpc_env * env,
|
||||||
|
xmlrpc_value * strct,
|
||||||
|
xmlrpc_value * const keyval);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_struct_find_value(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const structP,
|
||||||
|
const char * const key,
|
||||||
|
xmlrpc_value ** const valuePP);
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_struct_find_value_v(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const structP,
|
||||||
|
xmlrpc_value * const keyP,
|
||||||
|
xmlrpc_value ** const valuePP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_struct_read_value_v(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const structP,
|
||||||
|
xmlrpc_value * const keyP,
|
||||||
|
xmlrpc_value ** const valuePP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_struct_read_value(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const strctP,
|
||||||
|
const char * const key,
|
||||||
|
xmlrpc_value ** const valuePP);
|
||||||
|
|
||||||
|
/* The "get_value" functions are deprecated. Use the "find_value"
|
||||||
|
and "read_value" functions instead.
|
||||||
|
*/
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_struct_get_value(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const strctP,
|
||||||
|
const char * const key);
|
||||||
|
|
||||||
|
/* The same as above, but the key may contain zero bytes.
|
||||||
|
Deprecated. xmlrpc_struct_get_value_v() is more general, and this
|
||||||
|
case is not common enough to warrant a shortcut.
|
||||||
|
*/
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_struct_get_value_n(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const strctP,
|
||||||
|
const char * const key,
|
||||||
|
size_t const key_len);
|
||||||
|
|
||||||
|
/* Set the value associated with 'key' in 'strct' to 'value'.
|
||||||
|
Sets XMLRPC_TYPE_ERROR if 'strct' is not a struct.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xmlrpc_struct_set_value(xmlrpc_env * const env,
|
||||||
|
xmlrpc_value * const strct,
|
||||||
|
const char * const key,
|
||||||
|
xmlrpc_value * const value);
|
||||||
|
|
||||||
|
/* The same as above, but the key may contain zero bytes. Deprecated.
|
||||||
|
The general way to set a structure value is xmlrpc_struct_set_value_v(),
|
||||||
|
and this case is not common enough to deserve a shortcut.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xmlrpc_struct_set_value_n(xmlrpc_env * const env,
|
||||||
|
xmlrpc_value * const strct,
|
||||||
|
const char * const key,
|
||||||
|
size_t const key_len,
|
||||||
|
xmlrpc_value * const value);
|
||||||
|
|
||||||
|
/* The same as above, but the key must be an XML-RPC string.
|
||||||
|
** Fails with XMLRPC_TYPE_ERROR if 'keyval' is not a string. */
|
||||||
|
void
|
||||||
|
xmlrpc_struct_set_value_v(xmlrpc_env * const env,
|
||||||
|
xmlrpc_value * const strct,
|
||||||
|
xmlrpc_value * const keyval,
|
||||||
|
xmlrpc_value * const value);
|
||||||
|
|
||||||
|
/* Given a zero-based index, return the matching key and value. This
|
||||||
|
** is normally used in conjunction with xmlrpc_struct_size.
|
||||||
|
** Fails with XMLRPC_TYPE_ERROR if 'struct' is not a struct.
|
||||||
|
** Fails with XMLRPC_INDEX_ERROR if 'index' is out of bounds. */
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_struct_read_member(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const structP,
|
||||||
|
unsigned int const index,
|
||||||
|
xmlrpc_value ** const keyvalP,
|
||||||
|
xmlrpc_value ** const valueP);
|
||||||
|
|
||||||
|
/* The same as above, but does not increment the reference count of the
|
||||||
|
two values it returns, and return NULL for both if it fails, and
|
||||||
|
takes a signed integer for the index (but fails if it is negative).
|
||||||
|
|
||||||
|
Deprecated. Use xmlrpc_struct_read_member() instead.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xmlrpc_struct_get_key_and_value(xmlrpc_env * env,
|
||||||
|
xmlrpc_value * strct,
|
||||||
|
int index,
|
||||||
|
xmlrpc_value ** out_keyval,
|
||||||
|
xmlrpc_value ** out_value);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_cptr_new(xmlrpc_env * const envP,
|
||||||
|
void * const value);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_nil_new(xmlrpc_env * const envP);
|
||||||
|
|
||||||
|
|
||||||
|
/* Build an xmlrpc_value from a format string. */
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_build_value(xmlrpc_env * const env,
|
||||||
|
const char * const format,
|
||||||
|
...);
|
||||||
|
|
||||||
|
/* The same as the above, but using a va_list and more general */
|
||||||
|
void
|
||||||
|
xmlrpc_build_value_va(xmlrpc_env * const env,
|
||||||
|
const char * const format,
|
||||||
|
va_list args,
|
||||||
|
xmlrpc_value ** const valPP,
|
||||||
|
const char ** const tailP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_decompose_value(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const value,
|
||||||
|
const char * const format,
|
||||||
|
...);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_decompose_value_va(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const value,
|
||||||
|
const char * const format,
|
||||||
|
va_list args);
|
||||||
|
|
||||||
|
/* xmlrpc_parse_value... is the same as xmlrpc_decompose_value... except
|
||||||
|
that it doesn't do proper memory management -- it returns xmlrpc_value's
|
||||||
|
without incrementing the reference count and returns pointers to data
|
||||||
|
inside an xmlrpc_value structure.
|
||||||
|
|
||||||
|
These are deprecated. Use xmlrpc_decompose_value... instead.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xmlrpc_parse_value(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const value,
|
||||||
|
const char * const format,
|
||||||
|
...);
|
||||||
|
|
||||||
|
/* The same as the above, but using a va_list. */
|
||||||
|
void
|
||||||
|
xmlrpc_parse_value_va(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const value,
|
||||||
|
const char * const format,
|
||||||
|
va_list args);
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Encoding XML
|
||||||
|
**=======================================================================*/
|
||||||
|
|
||||||
|
/* Serialize an XML value without any XML header. This is primarily used
|
||||||
|
** for testing purposes. */
|
||||||
|
void
|
||||||
|
xmlrpc_serialize_value(xmlrpc_env * env,
|
||||||
|
xmlrpc_mem_block * output,
|
||||||
|
xmlrpc_value * value);
|
||||||
|
|
||||||
|
/* Serialize a list of parameters without any XML header. This is
|
||||||
|
** primarily used for testing purposes. */
|
||||||
|
void
|
||||||
|
xmlrpc_serialize_params(xmlrpc_env * env,
|
||||||
|
xmlrpc_mem_block * output,
|
||||||
|
xmlrpc_value * param_array);
|
||||||
|
|
||||||
|
/* Serialize an XML-RPC call. */
|
||||||
|
void
|
||||||
|
xmlrpc_serialize_call (xmlrpc_env * const env,
|
||||||
|
xmlrpc_mem_block * const output,
|
||||||
|
const char * const method_name,
|
||||||
|
xmlrpc_value * const param_array);
|
||||||
|
|
||||||
|
/* Serialize an XML-RPC return value. */
|
||||||
|
extern void
|
||||||
|
xmlrpc_serialize_response(xmlrpc_env * env,
|
||||||
|
xmlrpc_mem_block * output,
|
||||||
|
xmlrpc_value * value);
|
||||||
|
|
||||||
|
/* Serialize an XML-RPC fault (as specified by 'fault'). */
|
||||||
|
extern void
|
||||||
|
xmlrpc_serialize_fault(xmlrpc_env * env,
|
||||||
|
xmlrpc_mem_block * output,
|
||||||
|
xmlrpc_env * fault);
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Decoding XML
|
||||||
|
**=======================================================================*/
|
||||||
|
|
||||||
|
/* Parse an XML-RPC call. If an error occurs, set a fault and set
|
||||||
|
** the output variables to NULL.
|
||||||
|
** The caller is responsible for calling free(*out_method_name) and
|
||||||
|
** xmlrpc_DECREF(*out_param_array). */
|
||||||
|
void
|
||||||
|
xmlrpc_parse_call(xmlrpc_env * const envP,
|
||||||
|
const char * const xml_data,
|
||||||
|
size_t const xml_len,
|
||||||
|
const char ** const out_method_name,
|
||||||
|
xmlrpc_value ** const out_param_array);
|
||||||
|
|
||||||
|
/* Parse an XML-RPC response. If a fault occurs (or was received over the
|
||||||
|
** wire), return NULL and set up 'env'. The calling is responsible for
|
||||||
|
** calling xmlrpc_DECREF on the return value (if it isn't NULL). */
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_parse_response(xmlrpc_env * env,
|
||||||
|
const char * xml_data,
|
||||||
|
size_t xml_len);
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** XML-RPC Base64 Utilities
|
||||||
|
**=========================================================================
|
||||||
|
** Here are some lightweight utilities which can be used to encode and
|
||||||
|
** decode Base64 data. These are exported mainly for testing purposes.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* This routine inserts newlines every 76 characters, as required by the
|
||||||
|
** Base64 specification. */
|
||||||
|
xmlrpc_mem_block *
|
||||||
|
xmlrpc_base64_encode(xmlrpc_env * env,
|
||||||
|
unsigned char * bin_data,
|
||||||
|
size_t bin_len);
|
||||||
|
|
||||||
|
/* This routine encodes everything in one line. This is needed for HTTP
|
||||||
|
** authentication and similar tasks. */
|
||||||
|
xmlrpc_mem_block *
|
||||||
|
xmlrpc_base64_encode_without_newlines(xmlrpc_env * env,
|
||||||
|
unsigned char * bin_data,
|
||||||
|
size_t bin_len);
|
||||||
|
|
||||||
|
/* This decodes Base64 data with or without newlines. */
|
||||||
|
extern xmlrpc_mem_block *
|
||||||
|
xmlrpc_base64_decode(xmlrpc_env * const envP,
|
||||||
|
const char * const ascii_data,
|
||||||
|
size_t const ascii_len);
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** UTF-8 Encoding and Decoding
|
||||||
|
**=========================================================================
|
||||||
|
** We need a correct, reliable and secure UTF-8 decoder. This decoder
|
||||||
|
** raises a fault if it encounters invalid UTF-8.
|
||||||
|
**
|
||||||
|
** Note that ANSI C does not precisely define the representation used
|
||||||
|
** by wchar_t--it may be UCS-2, UTF-16, UCS-4, or something from outer
|
||||||
|
** space. If your platform does something especially bizarre, you may
|
||||||
|
** need to reimplement these routines.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_UNICODE_WCHAR
|
||||||
|
|
||||||
|
/* Ensure that a string contains valid, legally-encoded UTF-8 data.
|
||||||
|
** (Incorrectly-encoded UTF-8 strings are often used to bypass security
|
||||||
|
** checks.) */
|
||||||
|
void
|
||||||
|
xmlrpc_validate_utf8 (xmlrpc_env * const env,
|
||||||
|
const char * const utf8_data,
|
||||||
|
size_t const utf8_len);
|
||||||
|
|
||||||
|
/* Decode a UTF-8 string. */
|
||||||
|
xmlrpc_mem_block *
|
||||||
|
xmlrpc_utf8_to_wcs(xmlrpc_env * env,
|
||||||
|
char * utf8_data,
|
||||||
|
size_t utf8_len);
|
||||||
|
|
||||||
|
/* Encode a UTF-8 string. */
|
||||||
|
xmlrpc_mem_block *
|
||||||
|
xmlrpc_wcs_to_utf8(xmlrpc_env * env,
|
||||||
|
wchar_t * wcs_data,
|
||||||
|
size_t wcs_len);
|
||||||
|
|
||||||
|
#endif /* HAVE_UNICODE_WCHAR */
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Authorization Cookie Handling
|
||||||
|
**=========================================================================
|
||||||
|
** Routines to get and set values for authorizing via authorization
|
||||||
|
** cookies. Both the client and server use HTTP_COOKIE_AUTH to store
|
||||||
|
** the representation of the authorization value, which is actually
|
||||||
|
** just a base64 hash of username:password. (This entire method is
|
||||||
|
** a cookie replacement of basic authentication.)
|
||||||
|
**/
|
||||||
|
|
||||||
|
extern void xmlrpc_authcookie_set(xmlrpc_env * env,
|
||||||
|
const char * username,
|
||||||
|
const char * password);
|
||||||
|
|
||||||
|
char *xmlrpc_authcookie(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
** SUCH DAMAGE. */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
312
libs/xmlrpc-c/include/xmlrpc-c/base.hpp
Normal file
312
libs/xmlrpc-c/include/xmlrpc-c/base.hpp
Normal file
@ -0,0 +1,312 @@
|
|||||||
|
#ifndef XMLRPC_HPP_INCLUDED
|
||||||
|
#define XMLRPC_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include <climits>
|
||||||
|
#include <cfloat>
|
||||||
|
#include <ctime>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "xmlrpc-c/base.h"
|
||||||
|
|
||||||
|
namespace xmlrpc_c {
|
||||||
|
|
||||||
|
|
||||||
|
class value {
|
||||||
|
// This is a handle. You don't want to create a pointer to this;
|
||||||
|
// it is in fact a pointer itself.
|
||||||
|
public:
|
||||||
|
value();
|
||||||
|
// This creates a placeholder. It can't be used for anything, but
|
||||||
|
// holds memory. instantiate() can turn it into a real object.
|
||||||
|
|
||||||
|
value(xmlrpc_c::value const &value); // copy constructor
|
||||||
|
|
||||||
|
~value();
|
||||||
|
|
||||||
|
enum type_t {
|
||||||
|
TYPE_INT = 0,
|
||||||
|
TYPE_BOOLEAN = 1,
|
||||||
|
TYPE_DOUBLE = 2,
|
||||||
|
TYPE_DATETIME = 3,
|
||||||
|
TYPE_STRING = 4,
|
||||||
|
TYPE_BYTESTRING = 5,
|
||||||
|
TYPE_ARRAY = 6,
|
||||||
|
TYPE_STRUCT = 7,
|
||||||
|
TYPE_C_PTR = 8,
|
||||||
|
TYPE_NIL = 9,
|
||||||
|
TYPE_DEAD = 0xDEAD
|
||||||
|
};
|
||||||
|
|
||||||
|
type_t type() const;
|
||||||
|
|
||||||
|
xmlrpc_c::value&
|
||||||
|
operator=(xmlrpc_c::value const&);
|
||||||
|
|
||||||
|
// The following are not meant to be public to users, but just to
|
||||||
|
// other Xmlrpc-c library modules. If we ever go to a pure C++
|
||||||
|
// implementation, not based on C xmlrpc_value objects, this shouldn't
|
||||||
|
// be necessary.
|
||||||
|
|
||||||
|
void
|
||||||
|
appendToCArray(xmlrpc_value * const arrayP) const;
|
||||||
|
|
||||||
|
void
|
||||||
|
addToCStruct(xmlrpc_value * const structP,
|
||||||
|
std::string const key) const;
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
cValue() const;
|
||||||
|
|
||||||
|
value(xmlrpc_value * const valueP);
|
||||||
|
|
||||||
|
void
|
||||||
|
instantiate(xmlrpc_value * const valueP);
|
||||||
|
// Work only on a placeholder object created by the no-argument
|
||||||
|
// constructor.
|
||||||
|
|
||||||
|
xmlrpc_value * cValueP;
|
||||||
|
// NULL means this is merely a placeholder object.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class value_int : public value {
|
||||||
|
public:
|
||||||
|
value_int(int const cvalue);
|
||||||
|
|
||||||
|
value_int(xmlrpc_c::value const baseValue);
|
||||||
|
|
||||||
|
operator int() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class value_boolean : public value {
|
||||||
|
public:
|
||||||
|
value_boolean(bool const cvalue);
|
||||||
|
|
||||||
|
value_boolean(xmlrpc_c::value const baseValue);
|
||||||
|
|
||||||
|
operator bool() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class value_string : public value {
|
||||||
|
public:
|
||||||
|
value_string(std::string const& cvalue);
|
||||||
|
|
||||||
|
value_string(xmlrpc_c::value const baseValue);
|
||||||
|
|
||||||
|
operator std::string() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class value_double : public value {
|
||||||
|
public:
|
||||||
|
value_double(double const cvalue);
|
||||||
|
|
||||||
|
value_double(xmlrpc_c::value const baseValue);
|
||||||
|
|
||||||
|
operator double() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class value_datetime : public value {
|
||||||
|
public:
|
||||||
|
value_datetime(std::string const cvalue);
|
||||||
|
value_datetime(time_t const cvalue);
|
||||||
|
value_datetime(struct timeval const& cvalue);
|
||||||
|
value_datetime(struct timespec const& cvalue);
|
||||||
|
|
||||||
|
value_datetime(xmlrpc_c::value const baseValue);
|
||||||
|
|
||||||
|
operator time_t() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class value_bytestring : public value {
|
||||||
|
public:
|
||||||
|
value_bytestring(std::vector<unsigned char> const& cvalue);
|
||||||
|
|
||||||
|
value_bytestring(xmlrpc_c::value const baseValue);
|
||||||
|
|
||||||
|
// You can't cast to a vector because the compiler can't tell which
|
||||||
|
// constructor to use (complains about ambiguity). So we have this:
|
||||||
|
std::vector<unsigned char>
|
||||||
|
vectorUcharValue() const;
|
||||||
|
|
||||||
|
size_t
|
||||||
|
length() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class value_nil : public value {
|
||||||
|
public:
|
||||||
|
value_nil();
|
||||||
|
|
||||||
|
value_nil(xmlrpc_c::value const baseValue);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class value_struct : public value {
|
||||||
|
public:
|
||||||
|
value_struct(std::map<std::string, xmlrpc_c::value> const& cvalue);
|
||||||
|
|
||||||
|
value_struct(xmlrpc_c::value const baseValue);
|
||||||
|
|
||||||
|
operator std::map<std::string, xmlrpc_c::value>() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class value_array : public value {
|
||||||
|
public:
|
||||||
|
value_array(std::vector<xmlrpc_c::value> const& cvalue);
|
||||||
|
|
||||||
|
value_array(xmlrpc_c::value const baseValue);
|
||||||
|
|
||||||
|
std::vector<xmlrpc_c::value>
|
||||||
|
vectorValueValue() const;
|
||||||
|
|
||||||
|
size_t
|
||||||
|
size() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class fault {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
This is an XML-RPC fault.
|
||||||
|
|
||||||
|
This object is not intended to be used to represent a fault in the
|
||||||
|
execution of XML-RPC client/server software -- just a fault in an
|
||||||
|
XML-RPC RPC as described by the XML-RPC spec.
|
||||||
|
|
||||||
|
There is no way to represent "no fault" with this object. The object is
|
||||||
|
meaningful only in the context of some fault.
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
public:
|
||||||
|
enum code_t {
|
||||||
|
CODE_UNSPECIFIED = 0,
|
||||||
|
CODE_INTERNAL = -500,
|
||||||
|
CODE_TYPE = -501,
|
||||||
|
CODE_INDEX = -502,
|
||||||
|
CODE_PARSE = -503,
|
||||||
|
CODE_NETWORK = -504,
|
||||||
|
CODE_TIMEOUT = -505,
|
||||||
|
CODE_NO_SUCH_METHOD = -506,
|
||||||
|
CODE_REQUEST_REFUSED = -507,
|
||||||
|
CODE_INTROSPECTION_DISABLED = -508,
|
||||||
|
CODE_LIMIT_EXCEEDED = -509,
|
||||||
|
CODE_INVALID_UTF8 = -510
|
||||||
|
};
|
||||||
|
|
||||||
|
fault();
|
||||||
|
|
||||||
|
fault(std::string const _faultString,
|
||||||
|
xmlrpc_c::fault::code_t const _faultCode
|
||||||
|
= xmlrpc_c::fault::CODE_UNSPECIFIED
|
||||||
|
);
|
||||||
|
|
||||||
|
xmlrpc_c::fault::code_t getCode() const;
|
||||||
|
|
||||||
|
std::string getDescription() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool valid;
|
||||||
|
xmlrpc_c::fault::code_t code;
|
||||||
|
std::string description;
|
||||||
|
};
|
||||||
|
|
||||||
|
class rpcOutcome {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
The outcome of a validly executed RPC -- either an XML-RPC fault
|
||||||
|
or an XML-RPC value of the result.
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
public:
|
||||||
|
rpcOutcome();
|
||||||
|
rpcOutcome(xmlrpc_c::value const result);
|
||||||
|
rpcOutcome(xmlrpc_c::fault const fault);
|
||||||
|
bool succeeded() const;
|
||||||
|
xmlrpc_c::fault getFault() const;
|
||||||
|
xmlrpc_c::value getResult() const;
|
||||||
|
private:
|
||||||
|
bool valid;
|
||||||
|
// This is false in a placeholder variable -- i.e. an object you
|
||||||
|
// create with the no-argument constructor, which is waiting to be
|
||||||
|
// assigned a value. When false, nothing below is valid.
|
||||||
|
bool _succeeded;
|
||||||
|
xmlrpc_c::value result; // valid if 'succeeded'
|
||||||
|
xmlrpc_c::fault fault; // valid if not 'succeeded'
|
||||||
|
};
|
||||||
|
|
||||||
|
class paramList {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
A parameter list of an XML-RPC call.
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
public:
|
||||||
|
paramList(unsigned int const paramCount = 0);
|
||||||
|
|
||||||
|
void
|
||||||
|
add(xmlrpc_c::value const param);
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
size() const;
|
||||||
|
|
||||||
|
xmlrpc_c::value operator[](unsigned int const subscript) const;
|
||||||
|
|
||||||
|
int
|
||||||
|
getInt(unsigned int const paramNumber,
|
||||||
|
int const minimum = INT_MIN,
|
||||||
|
int const maximum = INT_MAX) const;
|
||||||
|
|
||||||
|
bool
|
||||||
|
getBoolean(unsigned int const paramNumber) const;
|
||||||
|
|
||||||
|
double
|
||||||
|
getDouble(unsigned int const paramNumber,
|
||||||
|
double const minimum = -DBL_MAX,
|
||||||
|
double const maximum = DBL_MAX) const;
|
||||||
|
|
||||||
|
enum timeConstraint {TC_ANY, TC_NO_PAST, TC_NO_FUTURE};
|
||||||
|
|
||||||
|
time_t
|
||||||
|
getDatetime_sec(unsigned int const paramNumber,
|
||||||
|
timeConstraint const constraint
|
||||||
|
= paramList::TC_ANY) const;
|
||||||
|
|
||||||
|
std::string
|
||||||
|
getString(unsigned int const paramNumber) const;
|
||||||
|
|
||||||
|
std::vector<unsigned char>
|
||||||
|
getBytestring(unsigned int const paramNumber) const;
|
||||||
|
|
||||||
|
std::vector<xmlrpc_c::value>
|
||||||
|
getArray(unsigned int const paramNumber,
|
||||||
|
unsigned int const minSize = 0,
|
||||||
|
unsigned int const maxSize = UINT_MAX) const;
|
||||||
|
|
||||||
|
std::map<std::string, xmlrpc_c::value>
|
||||||
|
getStruct(unsigned int const paramNumber) const;
|
||||||
|
|
||||||
|
void
|
||||||
|
getNil(unsigned int const paramNumber) const;
|
||||||
|
|
||||||
|
void
|
||||||
|
verifyEnd(unsigned int const paramNumber) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::vector<xmlrpc_c::value> paramVector;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif
|
190
libs/xmlrpc-c/include/xmlrpc-c/base_int.h
Normal file
190
libs/xmlrpc-c/include/xmlrpc-c/base_int.h
Normal file
@ -0,0 +1,190 @@
|
|||||||
|
/*============================================================================
|
||||||
|
xmlrpc_client_int.h
|
||||||
|
==============================================================================
|
||||||
|
This header file defines the interface between modules inside
|
||||||
|
xmlrpc-c.
|
||||||
|
|
||||||
|
Use this in addition to xmlrpc.h, which defines the external
|
||||||
|
interface.
|
||||||
|
|
||||||
|
Copyright information is at the end of the file.
|
||||||
|
============================================================================*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef XMLRPC_INT_H_INCLUDED
|
||||||
|
#define XMLRPC_INT_H_INCLUDED
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
|
||||||
|
struct _xmlrpc_value {
|
||||||
|
xmlrpc_type _type;
|
||||||
|
int _refcount;
|
||||||
|
|
||||||
|
/* Certain data types store their data directly in the xmlrpc_value. */
|
||||||
|
union {
|
||||||
|
xmlrpc_int32 i;
|
||||||
|
xmlrpc_bool b;
|
||||||
|
double d;
|
||||||
|
/* time_t t */
|
||||||
|
void *c_ptr;
|
||||||
|
} _value;
|
||||||
|
|
||||||
|
/* Other data types use a memory block.
|
||||||
|
|
||||||
|
For a string, this is the characters of the string in UTF-8, plus
|
||||||
|
a NUL added to the end.
|
||||||
|
*/
|
||||||
|
xmlrpc_mem_block _block;
|
||||||
|
|
||||||
|
#ifdef HAVE_UNICODE_WCHAR
|
||||||
|
xmlrpc_mem_block *_wcs_block;
|
||||||
|
/* This is a copy of the string value in _block, but in UTF-16
|
||||||
|
instead of UTF-8. This member is not always present. If NULL,
|
||||||
|
it is not present.
|
||||||
|
|
||||||
|
We keep this copy for convenience. The value is totally
|
||||||
|
redundant with _block.
|
||||||
|
|
||||||
|
This member is always NULL when the data type is not string.
|
||||||
|
*/
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#define XMLRPC_ASSERT_VALUE_OK(val) \
|
||||||
|
XMLRPC_ASSERT((val) != NULL && (val)->_type != XMLRPC_TYPE_DEAD)
|
||||||
|
|
||||||
|
/* A handy type-checking routine. */
|
||||||
|
#define XMLRPC_TYPE_CHECK(env,v,t) \
|
||||||
|
do \
|
||||||
|
if ((v)->_type != (t)) \
|
||||||
|
XMLRPC_FAIL(env, XMLRPC_TYPE_ERROR, "Expected " #t); \
|
||||||
|
while (0)
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
unsigned char key_hash;
|
||||||
|
xmlrpc_value *key;
|
||||||
|
xmlrpc_value *value;
|
||||||
|
} _struct_member;
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_createXmlrpcValue(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value ** const valPP);
|
||||||
|
|
||||||
|
const char *
|
||||||
|
xmlrpc_typeName(xmlrpc_type const type);
|
||||||
|
|
||||||
|
|
||||||
|
struct _xmlrpc_registry {
|
||||||
|
int _introspection_enabled;
|
||||||
|
xmlrpc_value *_methods;
|
||||||
|
xmlrpc_value *_default_method;
|
||||||
|
xmlrpc_value *_preinvoke_method;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/* When we deallocate a pointer in a struct, we often replace it with
|
||||||
|
** this and throw in a few assertions here and there. */
|
||||||
|
#define XMLRPC_BAD_POINTER ((void*) 0xDEADBEEF)
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_traceXml(const char * const label,
|
||||||
|
const char * const xml,
|
||||||
|
unsigned int const xmlLength);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_destroyStruct(xmlrpc_value * const structP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_destroyArrayContents(xmlrpc_value * const arrayP);
|
||||||
|
|
||||||
|
const char *
|
||||||
|
xmlrpc_makePrintable(const char * const input);
|
||||||
|
|
||||||
|
const char *
|
||||||
|
xmlrpc_makePrintableChar(char const input);
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
The following are for use by the legacy xmlrpc_parse_value(). They don't
|
||||||
|
do proper memory management, so they aren't appropriate for general use,
|
||||||
|
but there are old users that do xmlrpc_parse_value() and compensate for
|
||||||
|
the memory management, so we have to continue to offer this style of
|
||||||
|
memory management.
|
||||||
|
|
||||||
|
In particular, the functions that return xmlrpc_values don't increment
|
||||||
|
the reference count, and the functions that return strings don't allocate
|
||||||
|
new memory for them.
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_datetime_str_old(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
const char ** const stringValueP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_string_old(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
const char ** const stringValueP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_string_lp_old(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
size_t * const lengthP,
|
||||||
|
const char ** const stringValueP);
|
||||||
|
|
||||||
|
#ifdef HAVE_UNICODE_WCHAR
|
||||||
|
void
|
||||||
|
xmlrpc_read_string_w_old(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const valueP,
|
||||||
|
const wchar_t ** const stringValueP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_string_w_lp_old(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_value * const valueP,
|
||||||
|
size_t * const lengthP,
|
||||||
|
const wchar_t ** const stringValueP);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_read_base64_old(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_value * const valueP,
|
||||||
|
size_t * const lengthP,
|
||||||
|
const unsigned char ** const byteStringValueP);
|
||||||
|
|
||||||
|
|
||||||
|
/* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
** SUCH DAMAGE. */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif
|
291
libs/xmlrpc-c/include/xmlrpc-c/client.h
Normal file
291
libs/xmlrpc-c/include/xmlrpc-c/client.h
Normal file
@ -0,0 +1,291 @@
|
|||||||
|
/*============================================================================
|
||||||
|
xmlrpc_client.h
|
||||||
|
==============================================================================
|
||||||
|
This header file defines the interface between xmlrpc.c and its users,
|
||||||
|
related to clients.
|
||||||
|
|
||||||
|
Copyright information is at the end of the file.
|
||||||
|
============================================================================*/
|
||||||
|
|
||||||
|
#ifndef XMLRPC_CLIENT_H_INCLUDED
|
||||||
|
#define XMLRPC_CLIENT_H_INCLUDED
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Initialization and Shutdown
|
||||||
|
**=========================================================================
|
||||||
|
** These routines initialize and terminate the XML-RPC client. If you're
|
||||||
|
** already using libwww on your own, you can pass
|
||||||
|
** XMLRPC_CLIENT_SKIP_LIBWWW_INIT to avoid initializing it twice.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define XMLRPC_CLIENT_NO_FLAGS (0)
|
||||||
|
#define XMLRPC_CLIENT_SKIP_LIBWWW_INIT (1)
|
||||||
|
|
||||||
|
extern void
|
||||||
|
xmlrpc_client_init(int const flags,
|
||||||
|
const char * const appname,
|
||||||
|
const char * const appversion);
|
||||||
|
|
||||||
|
struct xmlrpc_xportparms;
|
||||||
|
/* This is a "base class". The struct is never complete; you're
|
||||||
|
supposed to cast between struct xmlrpc_xportparms * and
|
||||||
|
"struct xmlrpc_..._xportparms *" in order to use it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct xmlrpc_curl_xportparms {
|
||||||
|
const char * network_interface;
|
||||||
|
xmlrpc_bool no_ssl_verifypeer;
|
||||||
|
xmlrpc_bool no_ssl_verifyhost;
|
||||||
|
const char * user_agent;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#define XMLRPC_CXPSIZE(mbrname) \
|
||||||
|
XMLRPC_STRUCTSIZE(struct xmlrpc_curl_xportparms, mbrname)
|
||||||
|
|
||||||
|
/* XMLRPC_CXPSIZE(xyz) is analogous to XMLRPC_CPSIZE, below */
|
||||||
|
|
||||||
|
struct xmlrpc_wininet_xportparms {
|
||||||
|
int allowInvalidSSLCerts;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define XMLRPC_WXPSIZE(mbrname) \
|
||||||
|
XMLRPC_STRUCTSIZE(struct xmlrpc_wininet_xportparms, mbrname)
|
||||||
|
|
||||||
|
/* XMLRPC_WXPSIZE(xyz) is analogous to XMLRPC_CPSIZE, below */
|
||||||
|
|
||||||
|
struct xmlrpc_clientparms {
|
||||||
|
const char * transport;
|
||||||
|
struct xmlrpc_xportparms * transportparmsP;
|
||||||
|
/* Cast a "struct ..._xportparms *" to fit here */
|
||||||
|
size_t transportparm_size;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define XMLRPC_CPSIZE(mbrname) \
|
||||||
|
XMLRPC_STRUCTSIZE(struct xmlrpc_clientparms, mbrname)
|
||||||
|
|
||||||
|
/* XMLRPC_CPSIZE(xyz) is the minimum size a struct xmlrpc_clientparms
|
||||||
|
must be to include the 'xyz' member. This is essential to forward and
|
||||||
|
backward compatbility, as new members will be added to the end of the
|
||||||
|
struct in future releases. This is how the callee knows whether or
|
||||||
|
not the caller is new enough to have supplied a certain parameter.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_client_init2(xmlrpc_env * const env,
|
||||||
|
int const flags,
|
||||||
|
const char * const appname,
|
||||||
|
const char * const appversion,
|
||||||
|
const struct xmlrpc_clientparms * const clientparms,
|
||||||
|
unsigned int const parm_size);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
xmlrpc_client_cleanup(void);
|
||||||
|
|
||||||
|
const char *
|
||||||
|
xmlrpc_client_get_default_transport(xmlrpc_env * const env);
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Required for both internal and external development.
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
/* A callback function to handle the response to an asynchronous call.
|
||||||
|
** If 'fault->fault_occurred' is true, then response will be NULL. All
|
||||||
|
** arguments except 'user_data' will be deallocated internally; please do
|
||||||
|
** not free any of them yourself.
|
||||||
|
** WARNING: param_array may (or may not) be NULL if fault->fault_occurred
|
||||||
|
** is true, and you set up the call using xmlrpc_client_call_asynch.
|
||||||
|
** WARNING: If asynchronous calls are still pending when the library is
|
||||||
|
** shut down, your handler may (or may not) be called with a fault. */
|
||||||
|
typedef void (*xmlrpc_response_handler) (const char *server_url,
|
||||||
|
const char *method_name,
|
||||||
|
xmlrpc_value *param_array,
|
||||||
|
void *user_data,
|
||||||
|
xmlrpc_env *fault,
|
||||||
|
xmlrpc_value *result);
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** xmlrpc_server_info
|
||||||
|
**=========================================================================
|
||||||
|
** We normally refer to servers by URL. But sometimes we need to do extra
|
||||||
|
** setup for particular servers. In that case, we can create an
|
||||||
|
** xmlrpc_server_info object, configure it in various ways, and call the
|
||||||
|
** remote server.
|
||||||
|
**
|
||||||
|
** (This interface is also designed to discourage further multiplication
|
||||||
|
** of xmlrpc_client_call APIs. We have enough of those already. Please
|
||||||
|
** add future options and flags using xmlrpc_server_info.)
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct _xmlrpc_server_info xmlrpc_server_info;
|
||||||
|
|
||||||
|
/* Create a new server info record, pointing to the specified server. */
|
||||||
|
xmlrpc_server_info *
|
||||||
|
xmlrpc_server_info_new(xmlrpc_env * const env,
|
||||||
|
const char * const server_url);
|
||||||
|
|
||||||
|
/* Create a new server info record, with a copy of the old server. */
|
||||||
|
extern xmlrpc_server_info *
|
||||||
|
xmlrpc_server_info_copy(xmlrpc_env *env, xmlrpc_server_info *src_server);
|
||||||
|
|
||||||
|
/* Delete a server info record. */
|
||||||
|
extern void
|
||||||
|
xmlrpc_server_info_free (xmlrpc_server_info *server);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_server_info_set_basic_auth(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_server_info * const serverP,
|
||||||
|
const char * const username,
|
||||||
|
const char * const password);
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** xmlrpc_client_call
|
||||||
|
**=========================================================================
|
||||||
|
** A synchronous XML-RPC client. Do not attempt to call any of these
|
||||||
|
** functions from inside an asynchronous callback!
|
||||||
|
*/
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_client_call(xmlrpc_env * const envP,
|
||||||
|
const char * const server_url,
|
||||||
|
const char * const method_name,
|
||||||
|
const char * const format,
|
||||||
|
...);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_client_call_params(xmlrpc_env * const envP,
|
||||||
|
const char * const serverUrl,
|
||||||
|
const char * const methodName,
|
||||||
|
xmlrpc_value * const paramArrayP);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_client_call_server(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_server_info * const server,
|
||||||
|
const char * const method_name,
|
||||||
|
const char * const format,
|
||||||
|
...);
|
||||||
|
|
||||||
|
xmlrpc_value *
|
||||||
|
xmlrpc_client_call_server_params(
|
||||||
|
xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_server_info * const serverP,
|
||||||
|
const char * const method_name,
|
||||||
|
xmlrpc_value * const paramArrayP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_client_transport_call(
|
||||||
|
xmlrpc_env * const envP,
|
||||||
|
void * const reserved, /* for client handle */
|
||||||
|
const xmlrpc_server_info * const serverP,
|
||||||
|
xmlrpc_mem_block * const callXmlP,
|
||||||
|
xmlrpc_mem_block ** const respXmlPP);
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** xmlrpc_client_call_asynch
|
||||||
|
**=========================================================================
|
||||||
|
** An asynchronous XML-RPC client.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Make an asynchronous XML-RPC call. We make internal copies of all
|
||||||
|
** arguments except user_data, so you can deallocate them safely as soon
|
||||||
|
** as you return. Errors will be passed to the callback. You will need
|
||||||
|
** to run the event loop somehow; see below.
|
||||||
|
** WARNING: If an error occurs while building the argument, the
|
||||||
|
** response handler will be called with a NULL param_array. */
|
||||||
|
void
|
||||||
|
xmlrpc_client_call_asynch(const char * const server_url,
|
||||||
|
const char * const method_name,
|
||||||
|
xmlrpc_response_handler callback,
|
||||||
|
void * const user_data,
|
||||||
|
const char * const format,
|
||||||
|
...);
|
||||||
|
|
||||||
|
/* As above, but use an xmlrpc_server_info object. The server object can be
|
||||||
|
** safely destroyed as soon as this function returns. */
|
||||||
|
void
|
||||||
|
xmlrpc_client_call_server_asynch(xmlrpc_server_info * const server,
|
||||||
|
const char * const method_name,
|
||||||
|
xmlrpc_response_handler callback,
|
||||||
|
void * const user_data,
|
||||||
|
const char * const format,
|
||||||
|
...);
|
||||||
|
|
||||||
|
/* As above, but the parameter list is supplied as an xmlrpc_value
|
||||||
|
** containing an array.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xmlrpc_client_call_asynch_params(const char * const server_url,
|
||||||
|
const char * const method_name,
|
||||||
|
xmlrpc_response_handler callback,
|
||||||
|
void * const user_data,
|
||||||
|
xmlrpc_value * const paramArrayP);
|
||||||
|
|
||||||
|
/* As above, but use an xmlrpc_server_info object. The server object can be
|
||||||
|
** safely destroyed as soon as this function returns. */
|
||||||
|
void
|
||||||
|
xmlrpc_client_call_server_asynch_params(
|
||||||
|
xmlrpc_server_info * const server,
|
||||||
|
const char * const method_name,
|
||||||
|
xmlrpc_response_handler callback,
|
||||||
|
void * const user_data,
|
||||||
|
xmlrpc_value * const paramArrayP);
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Event Loop Interface
|
||||||
|
**=========================================================================
|
||||||
|
** These functions can be used to run the XML-RPC event loop. If you
|
||||||
|
** don't like these, you can also run the libwww event loop directly.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Finish all outstanding asynchronous calls. Alternatively, the loop
|
||||||
|
** will exit if someone calls xmlrpc_client_event_loop_end. */
|
||||||
|
extern void
|
||||||
|
xmlrpc_client_event_loop_finish_asynch(void);
|
||||||
|
|
||||||
|
|
||||||
|
/* Finish all outstanding asynchronous calls. */
|
||||||
|
extern void
|
||||||
|
xmlrpc_client_event_loop_finish_asynch_timeout(unsigned long milliseconds);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
** SUCH DAMAGE. */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif /* _XMLRPC_CLIENT_H_ */
|
401
libs/xmlrpc-c/include/xmlrpc-c/client.hpp
Normal file
401
libs/xmlrpc-c/include/xmlrpc-c/client.hpp
Normal file
@ -0,0 +1,401 @@
|
|||||||
|
#ifndef CLIENT_HPP_INCLUDED
|
||||||
|
#define CLIENT_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/girerr.hpp>
|
||||||
|
#include <xmlrpc-c/girmem.hpp>
|
||||||
|
#include <xmlrpc-c/base.hpp>
|
||||||
|
#include <xmlrpc-c/timeout.hpp>
|
||||||
|
#include <xmlrpc-c/client.h>
|
||||||
|
|
||||||
|
namespace xmlrpc_c {
|
||||||
|
|
||||||
|
|
||||||
|
class carriageParm {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
The parameter to a client for an individual RPC. It tells specifics
|
||||||
|
of how to carry the call to the server and the response back. For
|
||||||
|
example, it may identify the server. It may identify communication
|
||||||
|
protocols to use. It may indicate permission and accounting
|
||||||
|
information.
|
||||||
|
|
||||||
|
This is a base class; the carriage parameter is specific to the
|
||||||
|
class of client. For example, an HTTP-based client would have a
|
||||||
|
URL and HTTP basic authentication info as parameter.
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
protected:
|
||||||
|
virtual ~carriageParm();
|
||||||
|
carriageParm();
|
||||||
|
};
|
||||||
|
|
||||||
|
class clientTransactionPtr;
|
||||||
|
|
||||||
|
class clientTransaction : public girmem::autoObject {
|
||||||
|
|
||||||
|
friend class clientTransactionPtr;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual void
|
||||||
|
finish(xmlrpc_c::rpcOutcome const& outcome) = 0;
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
finishErr(girerr::error const& error) = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
clientTransaction();
|
||||||
|
};
|
||||||
|
|
||||||
|
class clientTransactionPtr : public girmem::autoObjectPtr {
|
||||||
|
|
||||||
|
public:
|
||||||
|
clientTransactionPtr();
|
||||||
|
virtual ~clientTransactionPtr();
|
||||||
|
|
||||||
|
virtual xmlrpc_c::clientTransaction *
|
||||||
|
operator->() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class client {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
A generic client -- a means of performing an RPC. This is so generic
|
||||||
|
that it can be used for clients that are not XML-RPC.
|
||||||
|
|
||||||
|
This is a base class. Derived classes define things such as that
|
||||||
|
XML and HTTP get used to perform the RPC.
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
public:
|
||||||
|
virtual ~client();
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
call(carriageParm * const carriageParmP,
|
||||||
|
std::string const methodName,
|
||||||
|
xmlrpc_c::paramList const& paramList,
|
||||||
|
xmlrpc_c::rpcOutcome * const outcomeP) = 0;
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
start(xmlrpc_c::carriageParm * const carriageParmP,
|
||||||
|
std::string const methodName,
|
||||||
|
xmlrpc_c::paramList const& paramList,
|
||||||
|
xmlrpc_c::clientTransactionPtr const& tranP);
|
||||||
|
};
|
||||||
|
|
||||||
|
class connection {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
A nexus of a particular client and a particular server, along with
|
||||||
|
carriage parameters for performing RPCs between the two.
|
||||||
|
|
||||||
|
This is a minor convenience for client programs that always talk to
|
||||||
|
the same server the same way.
|
||||||
|
|
||||||
|
Use this as a parameter to rpc.call().
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
public:
|
||||||
|
connection(xmlrpc_c::client * const clientP,
|
||||||
|
xmlrpc_c::carriageParm * const carriageParmP);
|
||||||
|
|
||||||
|
~connection();
|
||||||
|
|
||||||
|
xmlrpc_c::client * clientP;
|
||||||
|
xmlrpc_c::carriageParm * carriageParmP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class carriageParm_http0 : public carriageParm {
|
||||||
|
|
||||||
|
public:
|
||||||
|
carriageParm_http0(std::string const serverUrl);
|
||||||
|
|
||||||
|
~carriageParm_http0();
|
||||||
|
|
||||||
|
void
|
||||||
|
setBasicAuth(std::string const userid,
|
||||||
|
std::string const password);
|
||||||
|
|
||||||
|
xmlrpc_server_info * c_serverInfoP;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Only a derived class is allowed to create an object with no
|
||||||
|
// server URL, and the derived class expected to follow it up
|
||||||
|
// with an instantiate() to establish the server URL.
|
||||||
|
|
||||||
|
carriageParm_http0();
|
||||||
|
|
||||||
|
void
|
||||||
|
instantiate(std::string const serverUrl);
|
||||||
|
};
|
||||||
|
|
||||||
|
class carriageParm_curl0 : public xmlrpc_c::carriageParm_http0 {
|
||||||
|
|
||||||
|
public:
|
||||||
|
carriageParm_curl0(std::string const serverUrl);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class carriageParm_libwww0 : public xmlrpc_c::carriageParm_http0 {
|
||||||
|
|
||||||
|
public:
|
||||||
|
carriageParm_libwww0(std::string const serverUrl);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class carriageParm_wininet0 : public xmlrpc_c::carriageParm_http0 {
|
||||||
|
|
||||||
|
public:
|
||||||
|
carriageParm_wininet0(std::string const serverUrl);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class xmlTransactionPtr;
|
||||||
|
|
||||||
|
class xmlTransaction : public girmem::autoObject {
|
||||||
|
|
||||||
|
friend class xmlTransactionPtr;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual void
|
||||||
|
finish(std::string const& responseXml) const;
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
finishErr(girerr::error const& error) const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
xmlTransaction();
|
||||||
|
};
|
||||||
|
|
||||||
|
class xmlTransactionPtr : public girmem::autoObjectPtr {
|
||||||
|
public:
|
||||||
|
xmlTransactionPtr();
|
||||||
|
|
||||||
|
xmlrpc_c::xmlTransaction *
|
||||||
|
operator->() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class clientXmlTransport {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
An object which transports XML to and from an XML-RPC server for an
|
||||||
|
XML-RPC client.
|
||||||
|
|
||||||
|
This is a base class. Derived classes define methods to perform the
|
||||||
|
transportation in particular ways.
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
public:
|
||||||
|
virtual ~clientXmlTransport();
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
call(xmlrpc_c::carriageParm * const carriageParmP,
|
||||||
|
std::string const& callXml,
|
||||||
|
std::string * const responseXmlP) = 0;
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
start(xmlrpc_c::carriageParm * const carriageParmP,
|
||||||
|
std::string const& callXml,
|
||||||
|
xmlrpc_c::xmlTransactionPtr const& xmlTranP);
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
finishAsync(xmlrpc_c::timeout const timeout);
|
||||||
|
|
||||||
|
static void
|
||||||
|
asyncComplete(
|
||||||
|
struct xmlrpc_call_info * const callInfoP,
|
||||||
|
xmlrpc_mem_block * const responseXmlMP,
|
||||||
|
xmlrpc_env const transportEnv);
|
||||||
|
};
|
||||||
|
|
||||||
|
class clientXmlTransport_http : public xmlrpc_c::clientXmlTransport {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
A base class for client XML transports that use the simple, classic
|
||||||
|
C HTTP transports.
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
public:
|
||||||
|
virtual ~clientXmlTransport_http();
|
||||||
|
|
||||||
|
void
|
||||||
|
call(xmlrpc_c::carriageParm * const carriageParmP,
|
||||||
|
std::string const& callXml,
|
||||||
|
std::string * const responseXmlP);
|
||||||
|
|
||||||
|
void
|
||||||
|
start(xmlrpc_c::carriageParm * const carriageParmP,
|
||||||
|
std::string const& callXml,
|
||||||
|
xmlrpc_c::xmlTransactionPtr const& xmlTranP);
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
finishAsync(xmlrpc_c::timeout const timeout);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
clientXmlTransport_http() {} // ensure no one can create
|
||||||
|
struct xmlrpc_client_transport * c_transportP;
|
||||||
|
const struct xmlrpc_client_transport_ops * c_transportOpsP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class clientXmlTransport_curl : public xmlrpc_c::clientXmlTransport_http {
|
||||||
|
|
||||||
|
public:
|
||||||
|
clientXmlTransport_curl(std::string const networkInterface = "",
|
||||||
|
bool const noSslVerifyPeer = false,
|
||||||
|
bool const noSslVerifyHost = false,
|
||||||
|
std::string const userAgent = "");
|
||||||
|
|
||||||
|
~clientXmlTransport_curl();
|
||||||
|
};
|
||||||
|
|
||||||
|
class clientXmlTransport_libwww : public xmlrpc_c::clientXmlTransport_http {
|
||||||
|
|
||||||
|
public:
|
||||||
|
clientXmlTransport_libwww(std::string const appname = "",
|
||||||
|
std::string const appversion = "");
|
||||||
|
|
||||||
|
~clientXmlTransport_libwww();
|
||||||
|
};
|
||||||
|
|
||||||
|
class clientXmlTransport_wininet : public xmlrpc_c::clientXmlTransport_http {
|
||||||
|
|
||||||
|
public:
|
||||||
|
clientXmlTransport_wininet(bool const allowInvalidSslCerts = false);
|
||||||
|
|
||||||
|
~clientXmlTransport_wininet();
|
||||||
|
};
|
||||||
|
|
||||||
|
class client_xml : public xmlrpc_c::client {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
A client that uses XML-RPC XML in the RPC. This class does not define
|
||||||
|
how the XML gets transported, though (i.e. does not require HTTP).
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
public:
|
||||||
|
client_xml(xmlrpc_c::clientXmlTransport * const transportP);
|
||||||
|
|
||||||
|
void
|
||||||
|
call(carriageParm * const carriageParmP,
|
||||||
|
std::string const methodName,
|
||||||
|
xmlrpc_c::paramList const& paramList,
|
||||||
|
xmlrpc_c::rpcOutcome * const outcomeP);
|
||||||
|
|
||||||
|
void
|
||||||
|
start(xmlrpc_c::carriageParm * const carriageParmP,
|
||||||
|
std::string const methodName,
|
||||||
|
xmlrpc_c::paramList const& paramList,
|
||||||
|
xmlrpc_c::clientTransactionPtr const& tranP);
|
||||||
|
|
||||||
|
void
|
||||||
|
finishAsync(xmlrpc_c::timeout const timeout);
|
||||||
|
|
||||||
|
private:
|
||||||
|
xmlrpc_c::clientXmlTransport * transportP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class xmlTransaction_client : public xmlrpc_c::xmlTransaction {
|
||||||
|
|
||||||
|
public:
|
||||||
|
xmlTransaction_client(xmlrpc_c::clientTransactionPtr const& tranP);
|
||||||
|
|
||||||
|
void
|
||||||
|
finish(std::string const& responseXml) const;
|
||||||
|
|
||||||
|
void
|
||||||
|
finishErr(girerr::error const& error) const;
|
||||||
|
private:
|
||||||
|
xmlrpc_c::clientTransactionPtr const tranP;
|
||||||
|
};
|
||||||
|
|
||||||
|
class xmlTransaction_clientPtr : public xmlTransactionPtr {
|
||||||
|
public:
|
||||||
|
xmlTransaction_clientPtr();
|
||||||
|
|
||||||
|
xmlTransaction_clientPtr(xmlrpc_c::clientTransactionPtr const& tranP);
|
||||||
|
|
||||||
|
xmlrpc_c::xmlTransaction_client *
|
||||||
|
operator->() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class rpcPtr;
|
||||||
|
|
||||||
|
class rpc : public clientTransaction {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
An RPC. An RPC consists of method name, parameters, and result. It
|
||||||
|
does not specify in any way how the method name and parameters get
|
||||||
|
turned into a result. It does not presume XML or HTTP.
|
||||||
|
|
||||||
|
You don't create an object of this class directly. All references to
|
||||||
|
an rpc object should be by an rpcPtr object. Create a new RPC by
|
||||||
|
creating a new rpcPtr. Accordingly, our constructors and destructors
|
||||||
|
are protected, but available to our friend class rpcPtr.
|
||||||
|
|
||||||
|
In order to do asynchronous RPCs, you normally have to create a derived
|
||||||
|
class that defines a useful notifyComplete(). If you do that, you'll
|
||||||
|
want to make sure the derived class objects get accessed only via rpcPtrs
|
||||||
|
as well.
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
friend class xmlrpc_c::rpcPtr;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void
|
||||||
|
call(xmlrpc_c::client * const clientP,
|
||||||
|
xmlrpc_c::carriageParm * const carriageParmP);
|
||||||
|
|
||||||
|
void
|
||||||
|
call(xmlrpc_c::connection const& connection);
|
||||||
|
|
||||||
|
void
|
||||||
|
start(xmlrpc_c::client * const clientP,
|
||||||
|
xmlrpc_c::carriageParm * const carriageParmP);
|
||||||
|
|
||||||
|
void
|
||||||
|
start(xmlrpc_c::connection const& connection);
|
||||||
|
|
||||||
|
void
|
||||||
|
finish(xmlrpc_c::rpcOutcome const& outcome);
|
||||||
|
|
||||||
|
void
|
||||||
|
finishErr(girerr::error const& error);
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
notifyComplete();
|
||||||
|
|
||||||
|
bool
|
||||||
|
isFinished() const;
|
||||||
|
|
||||||
|
bool
|
||||||
|
isSuccessful() const;
|
||||||
|
|
||||||
|
xmlrpc_c::value
|
||||||
|
getResult() const;
|
||||||
|
|
||||||
|
xmlrpc_c::fault
|
||||||
|
getFault() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
rpc(std::string const methodName,
|
||||||
|
xmlrpc_c::paramList const& paramList);
|
||||||
|
|
||||||
|
virtual ~rpc();
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum state {
|
||||||
|
STATE_UNFINISHED, // RPC is running or not started yet
|
||||||
|
STATE_ERROR, // We couldn't execute the RPC
|
||||||
|
STATE_FAILED, // RPC executed successfully, but failed per XML-RPC
|
||||||
|
STATE_SUCCEEDED // RPC is done, no exception
|
||||||
|
};
|
||||||
|
enum state state;
|
||||||
|
girerr::error * errorP; // Defined only in STATE_ERROR
|
||||||
|
xmlrpc_c::rpcOutcome outcome;
|
||||||
|
// Defined only in STATE_FAILED and STATE_SUCCEEDED
|
||||||
|
std::string methodName;
|
||||||
|
xmlrpc_c::paramList paramList;
|
||||||
|
};
|
||||||
|
|
||||||
|
class rpcPtr : public clientTransactionPtr {
|
||||||
|
public:
|
||||||
|
rpcPtr();
|
||||||
|
|
||||||
|
rpcPtr(xmlrpc_c::rpc * const rpcP);
|
||||||
|
|
||||||
|
rpcPtr(std::string const methodName,
|
||||||
|
xmlrpc_c::paramList const& paramList);
|
||||||
|
|
||||||
|
xmlrpc_c::rpc *
|
||||||
|
operator->() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
#endif
|
102
libs/xmlrpc-c/include/xmlrpc-c/client_int.h
Normal file
102
libs/xmlrpc-c/include/xmlrpc-c/client_int.h
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
/*============================================================================
|
||||||
|
xmlrpc_client_int.h
|
||||||
|
==============================================================================
|
||||||
|
This header file defines the interface between client modules inside
|
||||||
|
xmlrpc-c.
|
||||||
|
|
||||||
|
Use this in addition to xmlrpc_client.h, which defines the external
|
||||||
|
interface.
|
||||||
|
|
||||||
|
Copyright information is at the end of the file.
|
||||||
|
============================================================================*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef XMLRPC_CLIENT_INT_H_INCLUDED
|
||||||
|
#define XMLRPC_CLIENT_INT_H_INCLUDED
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
struct _xmlrpc_server_info {
|
||||||
|
char *_server_url;
|
||||||
|
char *_http_basic_auth;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Create a new server info record, with a copy of the old server. */
|
||||||
|
extern xmlrpc_server_info *
|
||||||
|
xmlrpc_server_info_copy(xmlrpc_env *env, xmlrpc_server_info *aserver);
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Transport Implementation functions.
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
#include "xmlrpc-c/transport.h"
|
||||||
|
|
||||||
|
/* The generalized event loop. This uses the above flags. For more details,
|
||||||
|
** see the wrapper functions below. If you're not using the timeout, the
|
||||||
|
** 'milliseconds' parameter will be ignored.
|
||||||
|
** Note that ANY event loop call will return immediately if there are
|
||||||
|
** no outstanding XML-RPC calls. */
|
||||||
|
extern void
|
||||||
|
xmlrpc_client_event_loop_run_general (int flags, xmlrpc_timeout milliseconds);
|
||||||
|
|
||||||
|
/* Run the event loop forever. The loop will exit if someone calls
|
||||||
|
** xmlrpc_client_event_loop_end. */
|
||||||
|
extern void
|
||||||
|
xmlrpc_client_event_loop_run (void);
|
||||||
|
|
||||||
|
/* Run the event loop forever. The loop will exit if someone calls
|
||||||
|
** xmlrpc_client_event_loop_end or the timeout expires.
|
||||||
|
** (Note that ANY event loop call will return immediately if there are
|
||||||
|
** no outstanding XML-RPC calls.) */
|
||||||
|
extern void
|
||||||
|
xmlrpc_client_event_loop_run_timeout (xmlrpc_timeout milliseconds);
|
||||||
|
|
||||||
|
/* End the running event loop immediately. This can also be accomplished
|
||||||
|
** by calling the corresponding function in libwww.
|
||||||
|
** (Note that ANY event loop call will return immediately if there are
|
||||||
|
** no outstanding XML-RPC calls.) */
|
||||||
|
extern void
|
||||||
|
xmlrpc_client_event_loop_end (void);
|
||||||
|
|
||||||
|
|
||||||
|
/* Return true if there are uncompleted asynchronous calls.
|
||||||
|
** The exact value of this during a response callback is undefined. */
|
||||||
|
extern int
|
||||||
|
xmlrpc_client_asynch_calls_are_unfinished (void);
|
||||||
|
|
||||||
|
/* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
** SUCH DAMAGE. */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
47
libs/xmlrpc-c/include/xmlrpc-c/client_simple.hpp
Normal file
47
libs/xmlrpc-c/include/xmlrpc-c/client_simple.hpp
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#ifndef CLIENT_SIMPLE_HPP_INCLUDED
|
||||||
|
#define CLIENT_SIMPLE_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.hpp>
|
||||||
|
#include <xmlrpc-c/client.hpp>
|
||||||
|
|
||||||
|
namespace xmlrpc_c {
|
||||||
|
|
||||||
|
|
||||||
|
class clientSimple {
|
||||||
|
|
||||||
|
public:
|
||||||
|
clientSimple();
|
||||||
|
|
||||||
|
~clientSimple();
|
||||||
|
|
||||||
|
void
|
||||||
|
call(std::string const serverUrl,
|
||||||
|
std::string const methodName,
|
||||||
|
xmlrpc_c::value * const resultP);
|
||||||
|
|
||||||
|
void
|
||||||
|
call(std::string const serverUrl,
|
||||||
|
std::string const methodName,
|
||||||
|
std::string const format,
|
||||||
|
xmlrpc_c::value * const resultP,
|
||||||
|
...);
|
||||||
|
|
||||||
|
void
|
||||||
|
call(std::string const serverUrl,
|
||||||
|
std::string const methodName,
|
||||||
|
xmlrpc_c::paramList const& paramList,
|
||||||
|
xmlrpc_c::value * const resultP);
|
||||||
|
|
||||||
|
private:
|
||||||
|
xmlrpc_c::client * clientP;
|
||||||
|
xmlrpc_c::clientXmlTransport * transportP;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
26
libs/xmlrpc-c/include/xmlrpc-c/girerr.hpp
Normal file
26
libs/xmlrpc-c/include/xmlrpc-c/girerr.hpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#ifndef GIRERR_HPP_INCLUDED
|
||||||
|
#define GIRERR_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
|
#define HAVE_GIRERR_ERROR
|
||||||
|
|
||||||
|
namespace girerr {
|
||||||
|
|
||||||
|
class error : public std::exception {
|
||||||
|
public:
|
||||||
|
error(std::string const& what_arg) : _what(what_arg) {}
|
||||||
|
|
||||||
|
~error() throw() {}
|
||||||
|
|
||||||
|
virtual const char *
|
||||||
|
what() const throw() { return this->_what.c_str(); };
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string _what;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif
|
68
libs/xmlrpc-c/include/xmlrpc-c/girmem.hpp
Normal file
68
libs/xmlrpc-c/include/xmlrpc-c/girmem.hpp
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
#ifndef GIRMEM_HPP_INCLUDED
|
||||||
|
#define GIRMEM_HPP_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
/* The following pthread crap mirrors what is in pthreadx.h, which is
|
||||||
|
what girmem.cpp uses to declare the lock interface. We can't simply
|
||||||
|
include pthreadx.h here, because it's an internal Xmlrpc-c header file,
|
||||||
|
and this is an external one.
|
||||||
|
|
||||||
|
This is a stopgap measure until we do something cleaner, such as expose
|
||||||
|
pthreadx.h as an external interface (class girlock, maybe?) or create
|
||||||
|
a lock class with virtual methods.
|
||||||
|
|
||||||
|
The problem we're solving is that class autoObject contains
|
||||||
|
a pthread_mutex_t member, and on Windows, there's no such type.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
# include <pthread.h>
|
||||||
|
typedef pthread_mutex_t girmem_lock;
|
||||||
|
#else
|
||||||
|
typedef CRITICAL_SECTION girmem_lock;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace girmem {
|
||||||
|
|
||||||
|
class autoObjectPtr;
|
||||||
|
|
||||||
|
class autoObject {
|
||||||
|
friend class autoObjectPtr;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void incref();
|
||||||
|
void decref(bool * const unreferencedP);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
autoObject();
|
||||||
|
virtual ~autoObject();
|
||||||
|
|
||||||
|
private:
|
||||||
|
girmem_lock refcountLock;
|
||||||
|
unsigned int refcount;
|
||||||
|
};
|
||||||
|
|
||||||
|
class autoObjectPtr {
|
||||||
|
public:
|
||||||
|
autoObjectPtr();
|
||||||
|
autoObjectPtr(girmem::autoObject * objectP);
|
||||||
|
autoObjectPtr(girmem::autoObjectPtr const& autoObjectPtr);
|
||||||
|
|
||||||
|
~autoObjectPtr();
|
||||||
|
|
||||||
|
void
|
||||||
|
instantiate(girmem::autoObject * const objectP);
|
||||||
|
|
||||||
|
autoObjectPtr
|
||||||
|
operator=(girmem::autoObjectPtr const& objectPtr);
|
||||||
|
|
||||||
|
girmem::autoObject *
|
||||||
|
operator->() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
girmem::autoObject * objectP;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif
|
418
libs/xmlrpc-c/include/xmlrpc-c/oldcppwrapper.hpp
Normal file
418
libs/xmlrpc-c/include/xmlrpc-c/oldcppwrapper.hpp
Normal file
@ -0,0 +1,418 @@
|
|||||||
|
// -*- C++ -*- <-- an Emacs control
|
||||||
|
|
||||||
|
// Copyright information is at the bottom of the file.
|
||||||
|
|
||||||
|
//=========================================================================
|
||||||
|
// XML-RPC C++ API
|
||||||
|
//=========================================================================
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef XMLRPCCPP_H_INCLUDED
|
||||||
|
#define XMLRPCCPP_H_INCLUDED
|
||||||
|
|
||||||
|
// There used to be a "using namespace std" here and some confusing old
|
||||||
|
// comments about it having something to do with what header file you
|
||||||
|
// include to get string functions.
|
||||||
|
//
|
||||||
|
// "using namespace std" was under "#if defined(__GNUC__) && (__GNUC__ >= 3)"
|
||||||
|
// until December 2003, and then unconditional until Release 1.1 (March 2005).
|
||||||
|
// Older GNU Compilers apparently imply namespace std, so they don't need it.
|
||||||
|
//
|
||||||
|
// But "using namespace std" is a bad idea. This is an interface header
|
||||||
|
// file, and we don't want to suck all of namespace std into the user's
|
||||||
|
// namespace just because he's using Xmlrpc-c. So we took it out.
|
||||||
|
// We refer to std names like std::string.
|
||||||
|
// -Bryan 2005.03.12.
|
||||||
|
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/client.h>
|
||||||
|
#include <xmlrpc-c/server.h>
|
||||||
|
|
||||||
|
|
||||||
|
//=========================================================================
|
||||||
|
// XmlRpcFault
|
||||||
|
//=========================================================================
|
||||||
|
// A C++ exception class representing an XML-RPC fault.
|
||||||
|
|
||||||
|
class XmlRpcFault {
|
||||||
|
|
||||||
|
private:
|
||||||
|
xmlrpc_env mFault;
|
||||||
|
|
||||||
|
XmlRpcFault& operator= (XmlRpcFault const& f)
|
||||||
|
{ if (true || f.getFaultCode()) abort(); return (XmlRpcFault&) f; }
|
||||||
|
|
||||||
|
public:
|
||||||
|
XmlRpcFault (const XmlRpcFault &fault);
|
||||||
|
XmlRpcFault (const int faultCode, const std::string faultString);
|
||||||
|
XmlRpcFault (const xmlrpc_env *env);
|
||||||
|
~XmlRpcFault (void);
|
||||||
|
|
||||||
|
int getFaultCode (void) const;
|
||||||
|
std::string getFaultString (void) const;
|
||||||
|
xmlrpc_env *getFaultEnv (void);
|
||||||
|
};
|
||||||
|
|
||||||
|
inline int XmlRpcFault::getFaultCode (void) const {
|
||||||
|
return mFault.fault_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline xmlrpc_env *XmlRpcFault::getFaultEnv (void) {
|
||||||
|
return &mFault;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//=========================================================================
|
||||||
|
// XmlRpcEnv
|
||||||
|
//=========================================================================
|
||||||
|
// This class can be used to wrap xmlrpc_env object. Use it as follows:
|
||||||
|
//
|
||||||
|
// XmlRpcEnv env;
|
||||||
|
// xmlrpc_parse_value(env, v, "(i)", &i);
|
||||||
|
// env.throwIfFaultOccurred();
|
||||||
|
|
||||||
|
class XmlRpcEnv {
|
||||||
|
|
||||||
|
private:
|
||||||
|
xmlrpc_env mEnv;
|
||||||
|
|
||||||
|
void throwMe (void) const;
|
||||||
|
XmlRpcEnv& operator= (XmlRpcEnv const& e)
|
||||||
|
{ if (true || e.faultOccurred()) abort(); return (XmlRpcEnv&) e;}
|
||||||
|
|
||||||
|
public:
|
||||||
|
XmlRpcEnv (const XmlRpcEnv &env);
|
||||||
|
XmlRpcEnv (void) { xmlrpc_env_init(&mEnv); }
|
||||||
|
~XmlRpcEnv (void) { xmlrpc_env_clean(&mEnv); }
|
||||||
|
|
||||||
|
bool faultOccurred (void) const { return mEnv.fault_occurred; };
|
||||||
|
bool hasFaultOccurred (void) const { return faultOccurred(); };
|
||||||
|
/* hasFaultOccurred() is for backward compatibility.
|
||||||
|
faultOccurred() is a superior name for this.
|
||||||
|
*/
|
||||||
|
std::string getFaultString() const { return mEnv.fault_string; };
|
||||||
|
XmlRpcFault getFault (void) const;
|
||||||
|
|
||||||
|
void throwIfFaultOccurred (void) const;
|
||||||
|
|
||||||
|
operator xmlrpc_env * (void) { return &mEnv; }
|
||||||
|
};
|
||||||
|
|
||||||
|
inline void XmlRpcEnv::throwIfFaultOccurred (void) const {
|
||||||
|
if (faultOccurred())
|
||||||
|
throwMe();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//=========================================================================
|
||||||
|
// XmlRpcValue
|
||||||
|
//=========================================================================
|
||||||
|
// An object in this class is an XML-RPC value.
|
||||||
|
//
|
||||||
|
// We have a complex structure to allow C code mixed in with C++ code
|
||||||
|
// which uses this class to refer to the same XML-RPC value object.
|
||||||
|
// This is especially important because there aren't proper C++ facilities
|
||||||
|
// for much of Xmlrpc-c; you have to use the C facilities even if you'd
|
||||||
|
// rather use proper C++.
|
||||||
|
//
|
||||||
|
// The XmlRpcValue object internally represents the value as an
|
||||||
|
// xmlrpc_value. It holds one reference to the xmlrpc_value. Users
|
||||||
|
// of XmlRpcValue never see that xmlrpc_value, but C code can. the
|
||||||
|
// C code might create the xmlrpc_value and then bind it to an XmlRpcValue,
|
||||||
|
// or it might get the xmlrpc_value handle from the XmlRpcValue. Finally,
|
||||||
|
// C code can simply use the XmlRpcValue where an xmlrpc_value handle is
|
||||||
|
// required and it gets converted automatically.
|
||||||
|
//
|
||||||
|
// So reference counting for the xmlrpc_value is quite a nightmare.
|
||||||
|
|
||||||
|
class XmlRpcValue {
|
||||||
|
|
||||||
|
private:
|
||||||
|
xmlrpc_value *mValue;
|
||||||
|
|
||||||
|
public:
|
||||||
|
enum ReferenceBehavior {
|
||||||
|
MAKE_REFERENCE,
|
||||||
|
CONSUME_REFERENCE
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef xmlrpc_int32 int32;
|
||||||
|
|
||||||
|
XmlRpcValue (void);
|
||||||
|
XmlRpcValue (xmlrpc_value *value,
|
||||||
|
ReferenceBehavior behavior = MAKE_REFERENCE);
|
||||||
|
XmlRpcValue (const XmlRpcValue& value);
|
||||||
|
~XmlRpcValue (void);
|
||||||
|
|
||||||
|
XmlRpcValue& operator= (const XmlRpcValue& value);
|
||||||
|
|
||||||
|
// Accessing the value's type (think of this as lightweight RTTI).
|
||||||
|
xmlrpc_type getType(void) const;
|
||||||
|
|
||||||
|
// We don't supply an automatic conversion operator--you need to say
|
||||||
|
// whether you want to make or borrow this object's reference.
|
||||||
|
// XXX - Is it really OK for these to be const?
|
||||||
|
xmlrpc_value *makeReference (void) const;
|
||||||
|
xmlrpc_value *borrowReference (void) const;
|
||||||
|
|
||||||
|
// Some static "constructor" functions.
|
||||||
|
static XmlRpcValue makeInt (const XmlRpcValue::int32 i);
|
||||||
|
static XmlRpcValue makeBool (const bool b);
|
||||||
|
static XmlRpcValue makeDouble (const double d);
|
||||||
|
static XmlRpcValue makeDateTime (const std::string& dateTime);
|
||||||
|
static XmlRpcValue makeString (const std::string& str);
|
||||||
|
static XmlRpcValue makeString (const char *const str);
|
||||||
|
static XmlRpcValue makeString (const char *const str, size_t len);
|
||||||
|
static XmlRpcValue makeArray (void);
|
||||||
|
static XmlRpcValue makeStruct (void);
|
||||||
|
static XmlRpcValue makeBase64 (const unsigned char *const data,
|
||||||
|
size_t len);
|
||||||
|
/*
|
||||||
|
// An interface to xmlrpc_build_value.
|
||||||
|
static XmlRpcValue buildValue (const char *const format, ...);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Some functions to get the underlying data.
|
||||||
|
// These will throw an XmlRpcFault if the data is the wrong type.
|
||||||
|
XmlRpcValue::int32 getInt (void) const;
|
||||||
|
bool getBool (void) const;
|
||||||
|
double getDouble (void) const;
|
||||||
|
std::string getRawDateTime (void) const;
|
||||||
|
std::string getString (void) const;
|
||||||
|
XmlRpcValue getArray (void) const;
|
||||||
|
XmlRpcValue getStruct (void) const;
|
||||||
|
|
||||||
|
// This returns an internal pointer which will become invalid when
|
||||||
|
// all references to the underlying value are destroyed.
|
||||||
|
void getBase64 (const unsigned char *& out_data,
|
||||||
|
size_t& out_len) const;
|
||||||
|
|
||||||
|
/*
|
||||||
|
// An interface to xmlrpc_parse_value.
|
||||||
|
void parseValue (const char *const format, ...);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Array functions. These will throw an XmlRpcFault if the value
|
||||||
|
// isn't an array.
|
||||||
|
size_t arraySize (void) const;
|
||||||
|
void arrayAppendItem (const XmlRpcValue& value);
|
||||||
|
XmlRpcValue arrayGetItem (int index) const;
|
||||||
|
|
||||||
|
// Struct functions. These will throw an XmlRpcFault if the value
|
||||||
|
// isn't a struct.
|
||||||
|
size_t structSize (void) const;
|
||||||
|
bool structHasKey (const std::string& key) const;
|
||||||
|
XmlRpcValue structGetValue (const std::string& key) const;
|
||||||
|
void structSetValue (const std::string& key,
|
||||||
|
const XmlRpcValue& value);
|
||||||
|
void structGetKeyAndValue (const int index,
|
||||||
|
std::string& out_key,
|
||||||
|
XmlRpcValue& out_value) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
inline XmlRpcValue::XmlRpcValue (xmlrpc_value *value,
|
||||||
|
ReferenceBehavior behavior)
|
||||||
|
{
|
||||||
|
mValue = value;
|
||||||
|
|
||||||
|
if (behavior == MAKE_REFERENCE)
|
||||||
|
xmlrpc_INCREF(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline XmlRpcValue::XmlRpcValue (const XmlRpcValue& value) {
|
||||||
|
mValue = value.mValue;
|
||||||
|
xmlrpc_INCREF(mValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline XmlRpcValue::~XmlRpcValue (void) {
|
||||||
|
xmlrpc_DECREF(mValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline XmlRpcValue& XmlRpcValue::operator= (const XmlRpcValue& value) {
|
||||||
|
// Must increment before we decrement, in case of assignment to self.
|
||||||
|
xmlrpc_INCREF(value.mValue);
|
||||||
|
xmlrpc_DECREF(mValue);
|
||||||
|
mValue = value.mValue;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline xmlrpc_type XmlRpcValue::getType (void) const {
|
||||||
|
return xmlrpc_value_type(mValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline xmlrpc_value *XmlRpcValue::makeReference (void) const {
|
||||||
|
xmlrpc_INCREF(mValue);
|
||||||
|
return mValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline xmlrpc_value *XmlRpcValue::borrowReference (void) const {
|
||||||
|
return mValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//=========================================================================
|
||||||
|
// XmlRpcClient
|
||||||
|
//=========================================================================
|
||||||
|
|
||||||
|
class XmlRpcClient {
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string mServerUrl;
|
||||||
|
|
||||||
|
public:
|
||||||
|
static void Initialize (std::string appname, std::string appversion);
|
||||||
|
static void Terminate (void);
|
||||||
|
|
||||||
|
XmlRpcClient (const std::string& server_url) : mServerUrl(server_url) {}
|
||||||
|
~XmlRpcClient (void) {}
|
||||||
|
|
||||||
|
XmlRpcClient (const XmlRpcClient& client);
|
||||||
|
XmlRpcClient& operator= (const XmlRpcClient& client);
|
||||||
|
|
||||||
|
XmlRpcValue call (std::string method_name, XmlRpcValue param_array);
|
||||||
|
void call_asynch (std::string method_name,
|
||||||
|
XmlRpcValue param_array,
|
||||||
|
xmlrpc_response_handler callback,
|
||||||
|
void* user_data);
|
||||||
|
void event_loop_asynch (unsigned long milliseconds);
|
||||||
|
};
|
||||||
|
|
||||||
|
inline void XmlRpcClient::call_asynch(std::string method_name,
|
||||||
|
XmlRpcValue param_array,
|
||||||
|
xmlrpc_response_handler callback,
|
||||||
|
void* user_data)
|
||||||
|
{
|
||||||
|
xmlrpc_client_call_asynch_params(
|
||||||
|
mServerUrl.c_str(),
|
||||||
|
method_name.c_str(),
|
||||||
|
callback,
|
||||||
|
user_data,
|
||||||
|
param_array.borrowReference());
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void XmlRpcClient::event_loop_asynch(unsigned long milliseconds)
|
||||||
|
{
|
||||||
|
xmlrpc_client_event_loop_finish_asynch_timeout(milliseconds);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//=========================================================================
|
||||||
|
// XmlRpcClient Methods
|
||||||
|
//=========================================================================
|
||||||
|
// These are inline for now, so we don't need to screw with linker issues
|
||||||
|
// and build a separate client library.
|
||||||
|
|
||||||
|
inline XmlRpcClient::XmlRpcClient (const XmlRpcClient& client)
|
||||||
|
: mServerUrl(client.mServerUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
inline XmlRpcClient& XmlRpcClient::operator= (const XmlRpcClient& client) {
|
||||||
|
if (this != &client)
|
||||||
|
mServerUrl = client.mServerUrl;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void XmlRpcClient::Initialize (std::string appname,
|
||||||
|
std::string appversion) {
|
||||||
|
xmlrpc_client_init(XMLRPC_CLIENT_NO_FLAGS,
|
||||||
|
appname.c_str(),
|
||||||
|
appversion.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void XmlRpcClient::Terminate (void) {
|
||||||
|
xmlrpc_client_cleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline XmlRpcValue XmlRpcClient::call (std::string method_name,
|
||||||
|
XmlRpcValue param_array)
|
||||||
|
{
|
||||||
|
XmlRpcEnv env;
|
||||||
|
xmlrpc_value *result =
|
||||||
|
xmlrpc_client_call_params(env,
|
||||||
|
mServerUrl.c_str(),
|
||||||
|
method_name.c_str(),
|
||||||
|
param_array.borrowReference());
|
||||||
|
env.throwIfFaultOccurred();
|
||||||
|
return XmlRpcValue(result, XmlRpcValue::CONSUME_REFERENCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
//=========================================================================
|
||||||
|
// XmlRpcGenSrv
|
||||||
|
//=========================================================================
|
||||||
|
|
||||||
|
class XmlRpcGenSrv {
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
xmlrpc_registry* mRegistry;
|
||||||
|
|
||||||
|
xmlrpc_mem_block* alloc (XmlRpcEnv& env, const std::string& body) const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
XmlRpcGenSrv (int flags);
|
||||||
|
~XmlRpcGenSrv (void);
|
||||||
|
|
||||||
|
xmlrpc_registry* getRegistry (void) const;
|
||||||
|
|
||||||
|
XmlRpcGenSrv& addMethod (const std::string& name,
|
||||||
|
xmlrpc_method method,
|
||||||
|
void *data);
|
||||||
|
XmlRpcGenSrv& addMethod (const std::string& name,
|
||||||
|
xmlrpc_method method,
|
||||||
|
void* data,
|
||||||
|
const std::string& signature,
|
||||||
|
const std::string& help);
|
||||||
|
|
||||||
|
std::string handle (const std::string& body) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
inline XmlRpcGenSrv::XmlRpcGenSrv (int) {
|
||||||
|
|
||||||
|
XmlRpcEnv env;
|
||||||
|
|
||||||
|
mRegistry = xmlrpc_registry_new (env);
|
||||||
|
env.throwIfFaultOccurred();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline XmlRpcGenSrv::~XmlRpcGenSrv (void) {
|
||||||
|
|
||||||
|
xmlrpc_registry_free (mRegistry);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline xmlrpc_registry* XmlRpcGenSrv::getRegistry () const {
|
||||||
|
|
||||||
|
return mRegistry;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Copyright (C) 2001 by Eric Kidd. All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions
|
||||||
|
// are met:
|
||||||
|
// 1. Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
// 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer in the
|
||||||
|
// documentation and/or other materials provided with the distribution.
|
||||||
|
// 3. The name of the author may not be used to endorse or promote products
|
||||||
|
// derived from this software without specific prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
// ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
// OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
// SUCH DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _XMLRPCCPP_H_ */
|
2
libs/xmlrpc-c/include/xmlrpc-c/oldxmlrpc.h
Normal file
2
libs/xmlrpc-c/include/xmlrpc-c/oldxmlrpc.h
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
#include <xmlrpc-c/server.h>
|
167
libs/xmlrpc-c/include/xmlrpc-c/registry.hpp
Normal file
167
libs/xmlrpc-c/include/xmlrpc-c/registry.hpp
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
#ifndef REGISTRY_HPP_INCLUDED
|
||||||
|
#define REGISTRY_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <list>
|
||||||
|
|
||||||
|
#include <xmlrpc-c/server.h>
|
||||||
|
#include <xmlrpc-c/girmem.hpp>
|
||||||
|
#include <xmlrpc-c/base.hpp>
|
||||||
|
|
||||||
|
namespace xmlrpc_c {
|
||||||
|
|
||||||
|
|
||||||
|
class method : public girmem::autoObject {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
An XML-RPC method.
|
||||||
|
|
||||||
|
This base class is abstract. You can't create an object in it.
|
||||||
|
Define a useful method with this as a base class, with an
|
||||||
|
execute() method.
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
public:
|
||||||
|
method();
|
||||||
|
|
||||||
|
virtual ~method();
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
execute(xmlrpc_c::paramList const& paramList,
|
||||||
|
xmlrpc_c::value * const resultP) = 0;
|
||||||
|
|
||||||
|
std::string signature() const { return _signature; };
|
||||||
|
std::string help() const { return _help; };
|
||||||
|
|
||||||
|
// self() is a strange concession to the fact that we interface with
|
||||||
|
// C code. C code needs a regular pointer to this method, but our
|
||||||
|
// C++ interface carefully prevents one from making such a pointer,
|
||||||
|
// since it would be an uncounted reference. So users of self() must
|
||||||
|
// make sure that the reference it returns is always subordinate to a
|
||||||
|
// methodPtr reference.
|
||||||
|
|
||||||
|
xmlrpc_c::method * self();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
std::string _signature;
|
||||||
|
std::string _help;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Example of a specific method class:
|
||||||
|
|
||||||
|
class sample_add : public xmlrpc_c::method {
|
||||||
|
public:
|
||||||
|
sample_add() {
|
||||||
|
this->_signature = "ii";
|
||||||
|
this->_help = "This method adds two integers together";
|
||||||
|
}
|
||||||
|
void
|
||||||
|
execute(xmlrpc_c::param_list const paramList,
|
||||||
|
const xmlrpc_c::value * const retvalP) {
|
||||||
|
|
||||||
|
int const addend(paramList.getInt(0));
|
||||||
|
int const adder(paramList.getInt(1));
|
||||||
|
|
||||||
|
*retvalP = xmlrpc_c::value(addend, adder);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Example of creating such a method:
|
||||||
|
|
||||||
|
methodPtr const sampleAddMethodP(new sample_add);
|
||||||
|
|
||||||
|
You pass around, copy, etc. the handle sampleAddMethodP and when
|
||||||
|
the last copy of the handle is gone, the sample_add object itself
|
||||||
|
gets deleted.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class methodPtr : public girmem::autoObjectPtr {
|
||||||
|
|
||||||
|
public:
|
||||||
|
methodPtr(xmlrpc_c::method * const methodP);
|
||||||
|
|
||||||
|
xmlrpc_c::method *
|
||||||
|
operator->() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class defaultMethod : public girmem::autoObject {
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~defaultMethod();
|
||||||
|
|
||||||
|
virtual void
|
||||||
|
execute(std::string const& methodName,
|
||||||
|
xmlrpc_c::paramList const& paramList,
|
||||||
|
xmlrpc_c::value * const resultP) = 0;
|
||||||
|
|
||||||
|
xmlrpc_c::defaultMethod * self(); // analogous to 'method' class
|
||||||
|
};
|
||||||
|
|
||||||
|
class defaultMethodPtr : public girmem::autoObjectPtr {
|
||||||
|
|
||||||
|
public:
|
||||||
|
defaultMethodPtr();
|
||||||
|
|
||||||
|
defaultMethodPtr(xmlrpc_c::defaultMethod * const methodP);
|
||||||
|
|
||||||
|
xmlrpc_c::defaultMethod *
|
||||||
|
operator->() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class registry {
|
||||||
|
/*----------------------------------------------------------------------------
|
||||||
|
An Xmlrpc-c server method registry. An Xmlrpc-c server transport
|
||||||
|
(e.g. an HTTP server) uses this object to process an incoming
|
||||||
|
Xmlrpc-c call.
|
||||||
|
-----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
registry();
|
||||||
|
~registry();
|
||||||
|
|
||||||
|
void
|
||||||
|
addMethod(std::string const name,
|
||||||
|
xmlrpc_c::methodPtr const methodP);
|
||||||
|
|
||||||
|
void
|
||||||
|
setDefaultMethod(xmlrpc_c::defaultMethodPtr const methodP);
|
||||||
|
|
||||||
|
void
|
||||||
|
disableIntrospection();
|
||||||
|
|
||||||
|
void
|
||||||
|
processCall(std::string const& body,
|
||||||
|
std::string * const responseP) const;
|
||||||
|
|
||||||
|
xmlrpc_registry *
|
||||||
|
c_registry() const;
|
||||||
|
/* This is meant to be private except to other objects in the
|
||||||
|
Xmlrpc-c library.
|
||||||
|
*/
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
xmlrpc_registry * c_registryP;
|
||||||
|
/* Pointer to the C registry object we use to implement this
|
||||||
|
object.
|
||||||
|
*/
|
||||||
|
|
||||||
|
std::list<xmlrpc_c::methodPtr> methodList;
|
||||||
|
/* This is a list of all the method objects (actually, pointers
|
||||||
|
to them). But since the real registry is the C registry object,
|
||||||
|
all this list is for is to maintain references to the objects
|
||||||
|
to which the C registry points so that they continue to exist.
|
||||||
|
*/
|
||||||
|
xmlrpc_c::defaultMethodPtr defaultMethodP;
|
||||||
|
/* The real identifier of the default method is the C registry
|
||||||
|
object; this member exists only to maintain a reference to the
|
||||||
|
object to which the C registry points so that it will continue
|
||||||
|
to exist.
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif
|
179
libs/xmlrpc-c/include/xmlrpc-c/server.h
Normal file
179
libs/xmlrpc-c/include/xmlrpc-c/server.h
Normal file
@ -0,0 +1,179 @@
|
|||||||
|
/* Copyright and license information is at the end of the file */
|
||||||
|
|
||||||
|
#ifndef XMLRPC_SERVER_H_INCLUDED
|
||||||
|
#define XMLRPC_SERVER_H_INCLUDED
|
||||||
|
|
||||||
|
#include <xmlrpc-c/base.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** XML-RPC Server Method Registry
|
||||||
|
**=========================================================================
|
||||||
|
** A method registry maintains a list of functions, and handles
|
||||||
|
** dispatching. To build an XML-RPC server, just add an XML-RPC protocol
|
||||||
|
** driver.
|
||||||
|
**
|
||||||
|
** Methods are C functions which take some combination of the following
|
||||||
|
** parameters. All pointers except user_data belong to the library, and
|
||||||
|
** must not be freed by the callback or used after the callback returns.
|
||||||
|
**
|
||||||
|
** env: An XML-RPC error-handling environment. No faults will be
|
||||||
|
** set when the function is called. If an error occurs,
|
||||||
|
** set an appropriate fault and return NULL. (If a fault is
|
||||||
|
** set, the NULL return value will be enforced!)
|
||||||
|
** host: The 'Host:' header passed by the XML-RPC client, or NULL,
|
||||||
|
** if no 'Host:' header has been provided.
|
||||||
|
** method_name: The name used to call this method.
|
||||||
|
** user_data: The user_data used to register this method.
|
||||||
|
** param_array: The parameters passed to this function, stored in an
|
||||||
|
** XML-RPC array. You are *not* responsible for calling
|
||||||
|
** xmlrpc_DECREF on this array.
|
||||||
|
**
|
||||||
|
** Return value: If no fault has been set, the function must return a
|
||||||
|
** valid xmlrpc_value. This will be serialized, returned
|
||||||
|
** to the caller, and xmlrpc_DECREF'd.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* A function to call before invoking a method for doing things like access
|
||||||
|
** control or sanity checks. If a fault is set from this function, the
|
||||||
|
** method will not be called and the fault will be returned. */
|
||||||
|
typedef void
|
||||||
|
(*xmlrpc_preinvoke_method)(xmlrpc_env * env,
|
||||||
|
const char * method_name,
|
||||||
|
xmlrpc_value * param_array,
|
||||||
|
void * user_data);
|
||||||
|
|
||||||
|
/* An ordinary method. */
|
||||||
|
typedef xmlrpc_value *
|
||||||
|
(*xmlrpc_method)(xmlrpc_env * env,
|
||||||
|
xmlrpc_value * param_array,
|
||||||
|
void * user_data);
|
||||||
|
|
||||||
|
/* A default method to call if no method can be found. */
|
||||||
|
typedef xmlrpc_value *
|
||||||
|
(*xmlrpc_default_method)(xmlrpc_env * env,
|
||||||
|
const char * host,
|
||||||
|
const char * method_name,
|
||||||
|
xmlrpc_value * param_array,
|
||||||
|
void * user_data);
|
||||||
|
|
||||||
|
/* Our registry structure. This has no public members. */
|
||||||
|
typedef struct _xmlrpc_registry xmlrpc_registry;
|
||||||
|
|
||||||
|
/* Create a new method registry. */
|
||||||
|
xmlrpc_registry *
|
||||||
|
xmlrpc_registry_new(xmlrpc_env * env);
|
||||||
|
|
||||||
|
/* Delete a method registry. */
|
||||||
|
void
|
||||||
|
xmlrpc_registry_free(xmlrpc_registry * registry);
|
||||||
|
|
||||||
|
/* Disable introspection. The xmlrpc_registry has introspection
|
||||||
|
** capability built-in. If you want to make nosy people work harder,
|
||||||
|
** you can turn this off. */
|
||||||
|
void
|
||||||
|
xmlrpc_registry_disable_introspection(xmlrpc_registry * registry);
|
||||||
|
|
||||||
|
/* Register a method. The host parameter must be NULL (for now). You
|
||||||
|
** are responsible for owning and managing user_data. The registry
|
||||||
|
** will make internal copies of any other pointers it needs to
|
||||||
|
** keep around. */
|
||||||
|
void
|
||||||
|
xmlrpc_registry_add_method(xmlrpc_env * env,
|
||||||
|
xmlrpc_registry * registry,
|
||||||
|
const char * host,
|
||||||
|
const char * method_name,
|
||||||
|
xmlrpc_method method,
|
||||||
|
void * user_data);
|
||||||
|
|
||||||
|
/* As above, but allow the user to supply introspection information.
|
||||||
|
**
|
||||||
|
** Signatures use their own little description language. It consists
|
||||||
|
** of one-letter type code (similar to the ones used in xmlrpc_parse_value)
|
||||||
|
** for the result, a colon, and zero or more one-letter type codes for
|
||||||
|
** the parameters. For example:
|
||||||
|
** i:ibdsAS86
|
||||||
|
** If a function has more than one possible prototype, separate them with
|
||||||
|
** commas:
|
||||||
|
** i:,i:s,i:ii
|
||||||
|
** If the function signature can't be represented using this language,
|
||||||
|
** pass a single question mark:
|
||||||
|
** ?
|
||||||
|
** Help strings are ASCII text, and may contain HTML markup. */
|
||||||
|
void
|
||||||
|
xmlrpc_registry_add_method_w_doc(xmlrpc_env * env,
|
||||||
|
xmlrpc_registry * registry,
|
||||||
|
const char * host,
|
||||||
|
const char * method_name,
|
||||||
|
xmlrpc_method method,
|
||||||
|
void * user_data,
|
||||||
|
const char * signature,
|
||||||
|
const char * help);
|
||||||
|
|
||||||
|
/* Given a registry, a host name, and XML data; parse the <methodCall>,
|
||||||
|
** find the appropriate method, call it, serialize the response, and
|
||||||
|
** return it as an xmlrpc_mem_block. Most errors will be serialized
|
||||||
|
** as <fault> responses. If a *really* bad error occurs, set a fault and
|
||||||
|
** return NULL. (Actually, we currently give up with a fatal error,
|
||||||
|
** but that should change eventually.)
|
||||||
|
** The caller is responsible for destroying the memory block. */
|
||||||
|
xmlrpc_mem_block *
|
||||||
|
xmlrpc_registry_process_call(xmlrpc_env * const envP,
|
||||||
|
xmlrpc_registry * const registryP,
|
||||||
|
const char * const host,
|
||||||
|
const char * const xml_data,
|
||||||
|
size_t const xml_len);
|
||||||
|
|
||||||
|
/* Define a default method for the specified registry. This will be invoked
|
||||||
|
** if no other method matches. The user_data pointer is property of the
|
||||||
|
** application, and will not be freed or manipulated by the registry. */
|
||||||
|
void
|
||||||
|
xmlrpc_registry_set_default_method(xmlrpc_env * env,
|
||||||
|
xmlrpc_registry * registry,
|
||||||
|
xmlrpc_default_method handler,
|
||||||
|
void * user_data);
|
||||||
|
|
||||||
|
/* Define a preinvoke method for the specified registry. This function will
|
||||||
|
** be called before any method (either the default or a registered one) is
|
||||||
|
** invoked. Applications can use this to do things like access control or
|
||||||
|
** sanity checks. The user_data pointer is property of the application,
|
||||||
|
** and will not be freed or manipulated by the registry. */
|
||||||
|
void
|
||||||
|
xmlrpc_registry_set_preinvoke_method(xmlrpc_env * env,
|
||||||
|
xmlrpc_registry * registry,
|
||||||
|
xmlrpc_preinvoke_method method,
|
||||||
|
void * user_data);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
** SUCH DAMAGE. */
|
||||||
|
#endif
|
204
libs/xmlrpc-c/include/xmlrpc-c/server_abyss.h
Normal file
204
libs/xmlrpc-c/include/xmlrpc-c/server_abyss.h
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
/* Copyright and license information is at the end of the file */
|
||||||
|
|
||||||
|
#ifndef XMLRPC_SERVER_ABYSS_H_INCLUDED
|
||||||
|
#define XMLRPC_SERVER_ABYSS_H_INCLUDED
|
||||||
|
|
||||||
|
#include "xmlrpc-c/server.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
struct _TServer;
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** XML-RPC Server (based on Abyss)
|
||||||
|
**=========================================================================
|
||||||
|
** A simple XML-RPC server based on the Abyss web server. If errors
|
||||||
|
** occur during server setup, the server will exit. In general, if you
|
||||||
|
** want to use this API, you'll need to be familiar with Abyss.
|
||||||
|
**
|
||||||
|
** There are two ways to use Abyss:
|
||||||
|
** 1) You can use the handy wrapper functions.
|
||||||
|
** 2) You can set up Abyss yourself, and install the appropriate
|
||||||
|
** handlers manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define XMLRPC_SERVER_ABYSS_NO_FLAGS (0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Basic Abyss Server Functions
|
||||||
|
**=======================================================================*/
|
||||||
|
|
||||||
|
typedef void ((*runfirstFn)(void *));
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
const char * config_file_name;
|
||||||
|
/* NULL to use preferred proper API-level interface */
|
||||||
|
|
||||||
|
xmlrpc_registry * registryP;
|
||||||
|
|
||||||
|
/* runfirstFn and runfirst_arg are meaningless when
|
||||||
|
config_file_name is NULL
|
||||||
|
*/
|
||||||
|
runfirstFn runfirst;
|
||||||
|
void * runfirst_arg;
|
||||||
|
|
||||||
|
unsigned int port_number;
|
||||||
|
const char * log_file_name;
|
||||||
|
unsigned int keepalive_timeout;
|
||||||
|
unsigned int keepalive_max_conn;
|
||||||
|
unsigned int timeout;
|
||||||
|
xmlrpc_bool dont_advertise;
|
||||||
|
|
||||||
|
} xmlrpc_server_abyss_parms;
|
||||||
|
|
||||||
|
|
||||||
|
#define XMLRPC_APSIZE(MBRNAME) \
|
||||||
|
XMLRPC_STRUCTSIZE(xmlrpc_server_abyss_parms, MBRNAME)
|
||||||
|
|
||||||
|
/* XMLRPC_APSIZE(xyz) is the minimum size a struct xmlrpc_server_abyss_parms
|
||||||
|
must be to include the 'xyz' member. This is essential to forward and
|
||||||
|
backward compatbility, as new members will be added to the end of the
|
||||||
|
struct in future releases. This is how the callee knows whether or
|
||||||
|
not the caller is new enough to have supplied a certain parameter.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_server_abyss(xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_server_abyss_parms * const parms,
|
||||||
|
unsigned int const parm_size);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_server_abyss_set_handlers(struct _TServer * const srvP,
|
||||||
|
xmlrpc_registry * const registryP);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_server_abyss_set_handler(xmlrpc_env * const envP,
|
||||||
|
struct _TServer * const srvP,
|
||||||
|
const char * const filename,
|
||||||
|
xmlrpc_registry * const registryP);
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Handy Abyss Extensions
|
||||||
|
**=======================================================================*/
|
||||||
|
|
||||||
|
/* These are functions that have nothing to do with Xmlrpc-c, but provide
|
||||||
|
convenient Abyss services beyond those provided by the Abyss library.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Start an Abyss webserver running (previously created and
|
||||||
|
** initialized). Under Unix, this routine will attempt to do a
|
||||||
|
** detaching fork, drop root privileges (if any) and create a pid
|
||||||
|
** file. Under Windows, this routine merely starts the server. This
|
||||||
|
** routine never returns.
|
||||||
|
**
|
||||||
|
** Once you call this routine, it is illegal to modify the server any
|
||||||
|
** more, including changing any method registry.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
xmlrpc_server_abyss_run(void);
|
||||||
|
|
||||||
|
/* Same as xmlrpc_server_abyss_run(), except you get to specify a "runfirst"
|
||||||
|
** function. The server runs this just before executing the actual server
|
||||||
|
** function, after any daemonizing. NULL for 'runfirst' means no runfirst
|
||||||
|
** function. 'runfirstArg' is the argument the server passes to the runfirst
|
||||||
|
** function.
|
||||||
|
**/
|
||||||
|
void
|
||||||
|
xmlrpc_server_abyss_run_first(void (runfirst(void *)),
|
||||||
|
void * const runfirstArg);
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Method Registry
|
||||||
|
**=========================================================================
|
||||||
|
These functions are for the built-in xmlrpc_server_abyss registry.
|
||||||
|
It's usually simpler to skip all this and use the regular method
|
||||||
|
registry services (from xmlrpc_server.h) to build a registry and
|
||||||
|
pass it to xmlrpc_server_abyss.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Call this function to create a new Abyss webserver with the default
|
||||||
|
** options and the built-in method registry. If you've already
|
||||||
|
** initialized Abyss using Abyss functions, you can instead call
|
||||||
|
** xmlrpc_server_abyss_init_registry() to make it an Xmlrpc-c server.
|
||||||
|
** Or use a regular method registry and call
|
||||||
|
** xmlrpc_server_abyss_set_handlers().
|
||||||
|
**/
|
||||||
|
void
|
||||||
|
xmlrpc_server_abyss_init(int const flags,
|
||||||
|
const char * const config_file);
|
||||||
|
|
||||||
|
/* This is called automatically by xmlrpc_server_abyss_init. */
|
||||||
|
void xmlrpc_server_abyss_init_registry (void);
|
||||||
|
|
||||||
|
/* Fetch the internal registry, if you happen to need it.
|
||||||
|
If you're using this, you really shouldn't be using the built-in
|
||||||
|
registry at all. It exists today only for backward compatibilty.
|
||||||
|
*/
|
||||||
|
extern xmlrpc_registry *
|
||||||
|
xmlrpc_server_abyss_registry (void);
|
||||||
|
|
||||||
|
/* A quick & easy shorthand for adding a method. Depending on
|
||||||
|
** how you've configured your copy of Abyss, it's probably not safe to
|
||||||
|
** call this method after calling xmlrpc_server_abyss_run. */
|
||||||
|
void xmlrpc_server_abyss_add_method (char *method_name,
|
||||||
|
xmlrpc_method method,
|
||||||
|
void *user_data);
|
||||||
|
|
||||||
|
/* As above, but provide documentation (see xmlrpc_registry_add_method_w_doc
|
||||||
|
** for more information). You should really use this one. */
|
||||||
|
extern void
|
||||||
|
xmlrpc_server_abyss_add_method_w_doc (char *method_name,
|
||||||
|
xmlrpc_method method,
|
||||||
|
void *user_data,
|
||||||
|
char *signature,
|
||||||
|
char *help);
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Content Handlers
|
||||||
|
**=======================================================================*/
|
||||||
|
/* Abyss contents handlers xmlrpc_server_abyss_rpc2_handler()
|
||||||
|
and xmlrpc_server_abyss_default_handler() were available in older
|
||||||
|
Xmlrpc-c, but starting with Release 1.01, they are not. Instead,
|
||||||
|
call xmlrpc_server_abyss_set_handlers() to install them.
|
||||||
|
|
||||||
|
Alternatively, you can write your own handlers that do the same thing.
|
||||||
|
It's not hard, and if you're writing low enough level Abyss code that
|
||||||
|
you can't use xmlrpc_server_abyss_set_handlers(), you probably want to
|
||||||
|
anyway.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
** SUCH DAMAGE. */
|
||||||
|
|
||||||
|
#endif
|
47
libs/xmlrpc-c/include/xmlrpc-c/server_abyss.hpp
Normal file
47
libs/xmlrpc-c/include/xmlrpc-c/server_abyss.hpp
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#ifndef SERVER_ABYSS_HPP_INCLUDED
|
||||||
|
#define SERVER_ABYSS_HPP_INCLUDED
|
||||||
|
#include "xmlrpc-c/base.hpp"
|
||||||
|
#include "abyss.h"
|
||||||
|
|
||||||
|
namespace xmlrpc_c {
|
||||||
|
|
||||||
|
class serverAbyss {
|
||||||
|
|
||||||
|
public:
|
||||||
|
serverAbyss(
|
||||||
|
xmlrpc_c::registry const& registry,
|
||||||
|
unsigned int const portNumber = 8080,
|
||||||
|
std::string const& logFileName = "",
|
||||||
|
unsigned int const keepaliveTimeout = 0,
|
||||||
|
unsigned int const keepaliveMaxConn = 0,
|
||||||
|
unsigned int const timeout = 0,
|
||||||
|
bool const dontAdvertise = false
|
||||||
|
);
|
||||||
|
~serverAbyss();
|
||||||
|
|
||||||
|
void run();
|
||||||
|
|
||||||
|
private:
|
||||||
|
// We rely on the creator to keep the registry object around as
|
||||||
|
// long as the server object is, so that this pointer is valid.
|
||||||
|
// We need to use some kind of automatic handle instead.
|
||||||
|
|
||||||
|
const xmlrpc_c::registry * registryP;
|
||||||
|
|
||||||
|
std::string configFileName;
|
||||||
|
std::string logFileName;
|
||||||
|
unsigned int portNumber;
|
||||||
|
unsigned int keepaliveTimeout;
|
||||||
|
unsigned int keepaliveMaxConn;
|
||||||
|
unsigned int timeout;
|
||||||
|
bool dontAdvertise;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
server_abyss_set_handlers(TServer * const srvP,
|
||||||
|
xmlrpc_c::registry const& registry);
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif
|
49
libs/xmlrpc-c/include/xmlrpc-c/server_cgi.h
Normal file
49
libs/xmlrpc-c/include/xmlrpc-c/server_cgi.h
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/* Interface header file for libxmlrpc_server_cgi.
|
||||||
|
|
||||||
|
By Bryan Henderson, 05.04.27. Contributed to the public domain.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef XMLRPC_CGI_H_INCLUDED
|
||||||
|
#define XMLRPC_CGI_H_INCLUDED
|
||||||
|
|
||||||
|
#include <xmlrpc-c/server.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_server_cgi_process_call(xmlrpc_registry * const registryP);
|
||||||
|
|
||||||
|
#define XMLRPC_CGI_NO_FLAGS (0)
|
||||||
|
|
||||||
|
extern void
|
||||||
|
xmlrpc_cgi_init (int flags);
|
||||||
|
|
||||||
|
extern xmlrpc_registry *
|
||||||
|
xmlrpc_cgi_registry (void);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_cgi_add_method(const char * const method_name,
|
||||||
|
xmlrpc_method const method,
|
||||||
|
void * const user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_cgi_add_method_w_doc(const char * const method_name,
|
||||||
|
xmlrpc_method const method,
|
||||||
|
void * const user_data,
|
||||||
|
const char * const signature,
|
||||||
|
const char * const help);
|
||||||
|
extern void
|
||||||
|
xmlrpc_cgi_process_call (void);
|
||||||
|
|
||||||
|
extern void
|
||||||
|
xmlrpc_cgi_cleanup (void);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif
|
95
libs/xmlrpc-c/include/xmlrpc-c/server_w32httpsys.h
Normal file
95
libs/xmlrpc-c/include/xmlrpc-c/server_w32httpsys.h
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
/* Copyright (C) 2005 by Steven A. Bone, sbone@pobox.com. All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
** SUCH DAMAGE. */
|
||||||
|
|
||||||
|
/* COMPILATION NOTE:
|
||||||
|
Note that the Platform SDK headers and
|
||||||
|
link libraries for Windows XP SP2 or newer are required to compile
|
||||||
|
xmlrpc-c for this module. If you are not using this server, it is
|
||||||
|
safe to exclude the xmlrpc_server_w32httpsys.c file from the xmlrpc
|
||||||
|
project and these dependencies will not be required. You can get the
|
||||||
|
latest platform SDK at
|
||||||
|
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
|
||||||
|
Be sure after installation to choose the program to "register the PSDK
|
||||||
|
directories with Visual Studio" so the newer headers are found.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _XMLRPC_SERVER_HTTPSYS_H_
|
||||||
|
#define _XMLRPC_SERVER_HTTPSYS_H_ 1
|
||||||
|
|
||||||
|
#include "transport_config.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** XML-RPC Server (based on HTTP.SYS)
|
||||||
|
**=========================================================================
|
||||||
|
** A simple XML-RPC server based on the "built-in" Windows web server,
|
||||||
|
** HTTP.SYS. This is provided by Microsoft in Windows XP SP2 and
|
||||||
|
** Windows Server 2003. If errors occur during server setup, the server
|
||||||
|
** will exit. In general, if you want to use this API, you do not really
|
||||||
|
** need to be familiar with the HTTP.SYS API.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef void (*authorization_function)(
|
||||||
|
xmlrpc_env * envP,
|
||||||
|
char * userid,
|
||||||
|
char * password);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
xmlrpc_registry * registryP;
|
||||||
|
unsigned int portNum;
|
||||||
|
unsigned int useSSL;
|
||||||
|
/* useSSL, 0 = no SSL, 1 = use SSL */
|
||||||
|
unsigned int logLevel;
|
||||||
|
/* logLevel, 0 = none, 1 = file, 2 = file+OutputDebugString() */
|
||||||
|
const char * logFile;
|
||||||
|
/* logFile, NULL or filename */
|
||||||
|
authorization_function authfn;
|
||||||
|
} xmlrpc_server_httpsys_parms;
|
||||||
|
|
||||||
|
#define XMLRPC_HSSIZE(MBRNAME) \
|
||||||
|
XMLRPC_STRUCTSIZE(xmlrpc_server_httpsys_parms, MBRNAME)
|
||||||
|
|
||||||
|
/* XMLRPC_HSSIZE(xyz) is the minimum size a struct xmlrpc_server_httpsys_parms
|
||||||
|
must be to include the 'xyz' member. This is essential for forward and
|
||||||
|
backward compatbility, as new members will be added to the end of the
|
||||||
|
struct in future releases. This is how the callee knows whether or
|
||||||
|
not the caller is new enough to have supplied a certain parameter.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void
|
||||||
|
xmlrpc_server_httpsys(
|
||||||
|
xmlrpc_env * const envP,
|
||||||
|
const xmlrpc_server_httpsys_parms * const parmsP,
|
||||||
|
unsigned int const parm_size
|
||||||
|
);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
#endif
|
19
libs/xmlrpc-c/include/xmlrpc-c/timeout.hpp
Normal file
19
libs/xmlrpc-c/include/xmlrpc-c/timeout.hpp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#ifndef XMLRPC_TIMEOUT_H_INCLUDED
|
||||||
|
#define XMLRPC_TIMEOUT_H_INCLUDED
|
||||||
|
|
||||||
|
namespace xmlrpc_c {
|
||||||
|
|
||||||
|
struct timeout {
|
||||||
|
|
||||||
|
timeout() : finite(false) {}
|
||||||
|
|
||||||
|
timeout(unsigned int const duration) : duration(duration) {}
|
||||||
|
|
||||||
|
bool finite;
|
||||||
|
unsigned int duration;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
#endif
|
75
libs/xmlrpc-c/include/xmlrpc-c/transport.h
Normal file
75
libs/xmlrpc-c/include/xmlrpc-c/transport.h
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
/* Copyright information is at the end of the file */
|
||||||
|
#ifndef XMLRPC_TRANSPORT_H_INCLUDED
|
||||||
|
#define XMLRPC_TRANSPORT_H_INCLUDED
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "xmlrpc-c/base.h"
|
||||||
|
|
||||||
|
struct xmlrpc_call_info;
|
||||||
|
|
||||||
|
struct xmlrpc_client_transport;
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Transport function type declarations.
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
typedef void (*xmlrpc_transport_create)(
|
||||||
|
xmlrpc_env * const envP,
|
||||||
|
int const flags,
|
||||||
|
const char * const appname,
|
||||||
|
const char * const appversion,
|
||||||
|
const struct xmlrpc_xportparms * const transportparmsP,
|
||||||
|
size_t const transportparm_size,
|
||||||
|
struct xmlrpc_client_transport ** const handlePP);
|
||||||
|
|
||||||
|
typedef void (*xmlrpc_transport_destroy)(
|
||||||
|
struct xmlrpc_client_transport * const clientTransportP);
|
||||||
|
|
||||||
|
typedef void (*xmlrpc_transport_asynch_complete)(
|
||||||
|
struct xmlrpc_call_info * const callInfoP,
|
||||||
|
xmlrpc_mem_block * const responseXmlP,
|
||||||
|
xmlrpc_env const env);
|
||||||
|
|
||||||
|
typedef void (*xmlrpc_transport_send_request)(
|
||||||
|
xmlrpc_env * const envP,
|
||||||
|
struct xmlrpc_client_transport * const clientTransportP,
|
||||||
|
const xmlrpc_server_info * const serverP,
|
||||||
|
xmlrpc_mem_block * const xmlP,
|
||||||
|
xmlrpc_transport_asynch_complete complete,
|
||||||
|
struct xmlrpc_call_info * const callInfoP);
|
||||||
|
|
||||||
|
typedef void (*xmlrpc_transport_call)(
|
||||||
|
xmlrpc_env * const envP,
|
||||||
|
struct xmlrpc_client_transport * const clientTransportP,
|
||||||
|
const xmlrpc_server_info * const serverP,
|
||||||
|
xmlrpc_mem_block * const xmlP,
|
||||||
|
xmlrpc_mem_block ** const responsePP);
|
||||||
|
|
||||||
|
typedef enum {timeout_no, timeout_yes} xmlrpc_timeoutType;
|
||||||
|
|
||||||
|
typedef unsigned long xmlrpc_timeout;
|
||||||
|
/* A timeout in milliseconds. */
|
||||||
|
|
||||||
|
typedef void (*xmlrpc_transport_finish_asynch)(
|
||||||
|
struct xmlrpc_client_transport * const clientTransportP,
|
||||||
|
xmlrpc_timeoutType const timeoutType,
|
||||||
|
xmlrpc_timeout const timeout);
|
||||||
|
|
||||||
|
|
||||||
|
struct xmlrpc_client_transport_ops {
|
||||||
|
|
||||||
|
xmlrpc_transport_create create;
|
||||||
|
xmlrpc_transport_destroy destroy;
|
||||||
|
xmlrpc_transport_send_request send_request;
|
||||||
|
xmlrpc_transport_call call;
|
||||||
|
xmlrpc_transport_finish_asynch finish_asynch;
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
42
libs/xmlrpc-c/include/xmlrpc-c/transport_int.h
Normal file
42
libs/xmlrpc-c/include/xmlrpc-c/transport_int.h
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/* Copyright information is at the end of the file */
|
||||||
|
#ifndef XMLRPC_TRANSPORT_INT_H_INCLUDED
|
||||||
|
#define XMLRPC_TRANSPORT_INT_H_INCLUDED
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "pthreadx.h" /* For threading helpers. */
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Transport Helper Functions and declarations.
|
||||||
|
**=========================================================================
|
||||||
|
*/
|
||||||
|
typedef struct _running_thread_info
|
||||||
|
{
|
||||||
|
struct _running_thread_info * Next;
|
||||||
|
struct _running_thread_info * Last;
|
||||||
|
|
||||||
|
pthread_t _thread;
|
||||||
|
} running_thread_info;
|
||||||
|
|
||||||
|
|
||||||
|
/* list of running Async callback functions. */
|
||||||
|
typedef struct _running_thread_list
|
||||||
|
{
|
||||||
|
running_thread_info * AsyncThreadHead;
|
||||||
|
running_thread_info * AsyncThreadTail;
|
||||||
|
} running_thread_list;
|
||||||
|
|
||||||
|
/* MRB-WARNING: Only call when you have successfully
|
||||||
|
** acquired the Lock/Unlock mutex! */
|
||||||
|
void register_asynch_thread (running_thread_list *list, pthread_t *thread);
|
||||||
|
|
||||||
|
/* MRB-WARNING: Only call when you have successfully
|
||||||
|
** acquired the Lock/Unlock mutex! */
|
||||||
|
void unregister_asynch_thread (running_thread_list *list, pthread_t *thread);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
30
libs/xmlrpc-c/include/xmlrpc-c/xml.hpp
Normal file
30
libs/xmlrpc-c/include/xmlrpc-c/xml.hpp
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#ifndef XML_HPP_INCLUDED
|
||||||
|
#define XML_HPP_INCLUDED
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <xmlrpc-c/base.hpp>
|
||||||
|
|
||||||
|
namespace xmlrpc_c {
|
||||||
|
namespace xml {
|
||||||
|
|
||||||
|
void
|
||||||
|
generateCall(std::string const& methodName,
|
||||||
|
xmlrpc_c::paramList const& paramList,
|
||||||
|
std::string * const callXmlP);
|
||||||
|
|
||||||
|
void
|
||||||
|
parseSuccessfulResponse(std::string const& responseXml,
|
||||||
|
xmlrpc_c::value * const resultP);
|
||||||
|
|
||||||
|
void
|
||||||
|
parseResponse(std::string const& responseXml,
|
||||||
|
xmlrpc_c::rpcOutcome * const outcomeP);
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
trace(std::string const& label,
|
||||||
|
std::string const& xml);
|
||||||
|
|
||||||
|
|
||||||
|
}} // namespace
|
||||||
|
#endif
|
89
libs/xmlrpc-c/include/xmlrpc-c/xmlparser.h
Normal file
89
libs/xmlrpc-c/include/xmlrpc-c/xmlparser.h
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
/* Copyright and license information is at the end of the file */
|
||||||
|
|
||||||
|
#ifndef XMLRPC_XMLPARSER_H_INCLUDED
|
||||||
|
#define XMLRPC_XMLPARSER_H_INCLUDED
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** Abstract XML Parser Interface
|
||||||
|
**=========================================================================
|
||||||
|
** This file provides an abstract interface to the XML parser. For now,
|
||||||
|
** this interface is implemented by expat, but feel free to change it
|
||||||
|
** if necessary.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** xml_element
|
||||||
|
**=========================================================================
|
||||||
|
** This data structure represents an XML element. We provide no more API
|
||||||
|
** than we'll need in xmlrpc_parse.c.
|
||||||
|
**
|
||||||
|
** The pointers returned by the various accessor methods belong to the
|
||||||
|
** xml_element structure. Do not free them, and do not use them after
|
||||||
|
** the xml_element has been destroyed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* You'll need to finish defining struct _xml_element elsewhere. */
|
||||||
|
typedef struct _xml_element xml_element;
|
||||||
|
|
||||||
|
/* Destroy an xml_element. */
|
||||||
|
void xml_element_free (xml_element *elem);
|
||||||
|
|
||||||
|
/* Return a pointer to the element's name. Do not free this pointer!
|
||||||
|
** This pointer should point to standard ASCII or UTF-8 data. */
|
||||||
|
char *xml_element_name (xml_element *elem);
|
||||||
|
|
||||||
|
/* Return the xml_element's CDATA. Do not free this pointer!
|
||||||
|
** This pointer should point to standard ASCII or UTF-8 data.
|
||||||
|
** The implementation is allowed to concatenate all the CDATA in the
|
||||||
|
** element regardless of child elements. Alternatively, if there are
|
||||||
|
** any child elements, the implementation is allowed to dispose
|
||||||
|
** of whitespace characters.
|
||||||
|
** The value returned by xml_element_cdata should be '\0'-terminated
|
||||||
|
** (although it may contain other '\0' characters internally).
|
||||||
|
** xml_element_cdata_size should not include the final '\0'. */
|
||||||
|
size_t xml_element_cdata_size (xml_element *elem);
|
||||||
|
char *xml_element_cdata (xml_element *elem);
|
||||||
|
|
||||||
|
/* Return the xml_element's child elements. Do not free this pointer! */
|
||||||
|
size_t xml_element_children_size (xml_element *elem);
|
||||||
|
xml_element **xml_element_children (xml_element *elem);
|
||||||
|
|
||||||
|
|
||||||
|
/*=========================================================================
|
||||||
|
** xml_parse
|
||||||
|
**=========================================================================
|
||||||
|
** Parse a chunk of XML data and return the top-level element. If this
|
||||||
|
** routine fails, it will return NULL and set up the env appropriately.
|
||||||
|
** You are responsible for calling xml_element_free on the returned pointer.
|
||||||
|
*/
|
||||||
|
|
||||||
|
xml_element *xml_parse (xmlrpc_env *env, const char *xml_data, int xml_len);
|
||||||
|
|
||||||
|
|
||||||
|
/* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
|
||||||
|
**
|
||||||
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions
|
||||||
|
** are met:
|
||||||
|
** 1. Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in the
|
||||||
|
** documentation and/or other materials provided with the distribution.
|
||||||
|
** 3. The name of the author may not be used to endorse or promote products
|
||||||
|
** derived from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
** ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
** OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
** OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
** SUCH DAMAGE. */
|
||||||
|
|
||||||
|
#endif
|
251
libs/xmlrpc-c/install-sh
Executable file
251
libs/xmlrpc-c/install-sh
Executable file
@ -0,0 +1,251 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# install - install a program, script, or datafile
|
||||||
|
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||||
|
#
|
||||||
|
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||||
|
#
|
||||||
|
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||||
|
# documentation for any purpose is hereby granted without fee, provided that
|
||||||
|
# the above copyright notice appear in all copies and that both that
|
||||||
|
# copyright notice and this permission notice appear in supporting
|
||||||
|
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||||
|
# publicity pertaining to distribution of the software without specific,
|
||||||
|
# written prior permission. M.I.T. makes no representations about the
|
||||||
|
# suitability of this software for any purpose. It is provided "as is"
|
||||||
|
# without express or implied warranty.
|
||||||
|
#
|
||||||
|
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||||
|
# `make' implicit rules from creating a file called install from it
|
||||||
|
# when there is no Makefile.
|
||||||
|
#
|
||||||
|
# This script is compatible with the BSD install script, but was written
|
||||||
|
# from scratch. It can only install one file at a time, a restriction
|
||||||
|
# shared with many OS's install programs.
|
||||||
|
|
||||||
|
|
||||||
|
# set DOITPROG to echo to test this script
|
||||||
|
|
||||||
|
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||||
|
doit="${DOITPROG-}"
|
||||||
|
|
||||||
|
|
||||||
|
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||||
|
|
||||||
|
mvprog="${MVPROG-mv}"
|
||||||
|
cpprog="${CPPROG-cp}"
|
||||||
|
chmodprog="${CHMODPROG-chmod}"
|
||||||
|
chownprog="${CHOWNPROG-chown}"
|
||||||
|
chgrpprog="${CHGRPPROG-chgrp}"
|
||||||
|
stripprog="${STRIPPROG-strip}"
|
||||||
|
rmprog="${RMPROG-rm}"
|
||||||
|
mkdirprog="${MKDIRPROG-mkdir}"
|
||||||
|
|
||||||
|
transformbasename=""
|
||||||
|
transform_arg=""
|
||||||
|
instcmd="$mvprog"
|
||||||
|
chmodcmd="$chmodprog 0755"
|
||||||
|
chowncmd=""
|
||||||
|
chgrpcmd=""
|
||||||
|
stripcmd=""
|
||||||
|
rmcmd="$rmprog -f"
|
||||||
|
mvcmd="$mvprog"
|
||||||
|
src=""
|
||||||
|
dst=""
|
||||||
|
dir_arg=""
|
||||||
|
|
||||||
|
while [ x"$1" != x ]; do
|
||||||
|
case $1 in
|
||||||
|
-c) instcmd="$cpprog"
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-d) dir_arg=true
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-m) chmodcmd="$chmodprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-o) chowncmd="$chownprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-g) chgrpcmd="$chgrpprog $2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-s) stripcmd="$stripprog"
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
|
||||||
|
*) if [ x"$src" = x ]
|
||||||
|
then
|
||||||
|
src=$1
|
||||||
|
else
|
||||||
|
# this colon is to work around a 386BSD /bin/sh bug
|
||||||
|
:
|
||||||
|
dst=$1
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
continue;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ x"$src" = x ]
|
||||||
|
then
|
||||||
|
echo "install: no input file specified"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dir_arg" != x ]; then
|
||||||
|
dst=$src
|
||||||
|
src=""
|
||||||
|
|
||||||
|
if [ -d $dst ]; then
|
||||||
|
instcmd=:
|
||||||
|
chmodcmd=""
|
||||||
|
else
|
||||||
|
instcmd=mkdir
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
|
||||||
|
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||||
|
# might cause directories to be created, which would be especially bad
|
||||||
|
# if $src (and thus $dsttmp) contains '*'.
|
||||||
|
|
||||||
|
if [ -f $src -o -d $src ]
|
||||||
|
then
|
||||||
|
true
|
||||||
|
else
|
||||||
|
echo "install: $src does not exist"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dst" = x ]
|
||||||
|
then
|
||||||
|
echo "install: no destination specified"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If destination is a directory, append the input filename; if your system
|
||||||
|
# does not like double slashes in filenames, you may need to add some logic
|
||||||
|
|
||||||
|
if [ -d $dst ]
|
||||||
|
then
|
||||||
|
dst="$dst"/`basename $src`
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
## this sed command emulates the dirname command
|
||||||
|
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||||
|
|
||||||
|
# Make sure that the destination directory exists.
|
||||||
|
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||||
|
|
||||||
|
# Skip lots of stat calls in the usual case.
|
||||||
|
if [ ! -d "$dstdir" ]; then
|
||||||
|
defaultIFS='
|
||||||
|
'
|
||||||
|
IFS="${IFS-${defaultIFS}}"
|
||||||
|
|
||||||
|
oIFS="${IFS}"
|
||||||
|
# Some sh's can't handle IFS=/ for some reason.
|
||||||
|
IFS='%'
|
||||||
|
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||||
|
IFS="${oIFS}"
|
||||||
|
|
||||||
|
pathcomp=''
|
||||||
|
|
||||||
|
while [ $# -ne 0 ] ; do
|
||||||
|
pathcomp="${pathcomp}${1}"
|
||||||
|
shift
|
||||||
|
|
||||||
|
if [ ! -d "${pathcomp}" ] ;
|
||||||
|
then
|
||||||
|
$mkdirprog "${pathcomp}"
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
pathcomp="${pathcomp}/"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$dir_arg" != x ]
|
||||||
|
then
|
||||||
|
$doit $instcmd $dst &&
|
||||||
|
|
||||||
|
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||||
|
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||||
|
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||||
|
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||||
|
else
|
||||||
|
|
||||||
|
# If we're going to rename the final executable, determine the name now.
|
||||||
|
|
||||||
|
if [ x"$transformarg" = x ]
|
||||||
|
then
|
||||||
|
dstfile=`basename $dst`
|
||||||
|
else
|
||||||
|
dstfile=`basename $dst $transformbasename |
|
||||||
|
sed $transformarg`$transformbasename
|
||||||
|
fi
|
||||||
|
|
||||||
|
# don't allow the sed command to completely eliminate the filename
|
||||||
|
|
||||||
|
if [ x"$dstfile" = x ]
|
||||||
|
then
|
||||||
|
dstfile=`basename $dst`
|
||||||
|
else
|
||||||
|
true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make a temp file name in the proper directory.
|
||||||
|
|
||||||
|
dsttmp=$dstdir/#inst.$$#
|
||||||
|
|
||||||
|
# Move or copy the file name to the temp name
|
||||||
|
|
||||||
|
$doit $instcmd $src $dsttmp &&
|
||||||
|
|
||||||
|
trap "rm -f ${dsttmp}" 0 &&
|
||||||
|
|
||||||
|
# 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 $instcmd $src $dsttmp" command.
|
||||||
|
|
||||||
|
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||||
|
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||||
|
|
||||||
|
# Now rename the file to the real destination.
|
||||||
|
|
||||||
|
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||||
|
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||||
|
|
||||||
|
fi &&
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user