git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8545 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-05-23 20:56:24 +00:00
parent d2290cfa3a
commit 00654d880e
338 changed files with 55725 additions and 19400 deletions

View File

@ -1,80 +1,151 @@
ifeq ($(SRCDIR)x,x)
SRCDIR = $(CURDIR)
endif
SUBDIR = .
BUILDDIR = $(SRCDIR)
VPATH = .:$(SRCDIR)
include Makefile.srcdir
include $(SRCDIR)/Makefile.config
BLDDIR = $(CURDIR)
SUBDIR =
SUBDIRS = include src lib tools
export SRCDIR
export BLDDIR
include $(BLDDIR)/Makefile.version
include $(BLDDIR)/config.mk
SUBDIRS = include lib src tools examples
# The reason we don't build tools and examples by default is that they
# contain executables, which require significantly more from the
# environment to build than libraries. Ergo, they are signficantly
# more likely to fail to build. Indeed, when 'tools' was built by
# default, the majority of the reported build problems were with that.
# Since they are ancillary to the package, building them by default is
# not worth causing the whole build to fail.
# As with any subdirectory, to build 'tools' or 'examples', cd to the
# subdirectory and make there.
DEFAULT_SUBDIRS = include lib src
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
default: xmlrpc-c-config xmlrpc-c-config.test $(DEFAULT_SUBDIRS:%=%/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
# The examples subdirectory is special, because even the make file in there
# is designed to be an example. So it has to be simple and as close as
# possible to something a person could use outside of the Xmlrpc-c source
# tree. One ramification of that is that it does not specify dependencies
# on other parts of the Xmlrpc-c build. That means we must separately
# ensure that the Xmlrpc-c libraries are built before making the example
# programs.
#
# It also means that you have to manually clean the examples directory
# in order to get the examples rebuilt after you modify the Xmlrpc-c
# libraries.
examples/all: xmlrpc-c-config.test lib/all src/all include/all
# Parallel make (make --jobs) is not smart enough to coordinate builds
# between submakes, so a naive parallel make would cause certain
# targets to get built multiple times simultaneously. That is usually
# unacceptable. So we introduce extra dependencies here just to make
# sure such targets are already up to date before the submake starts,
# for the benefit of parallel make. Note that we ensure that parallel
# make works for 'make all' in the top directory, but it may still fail
# for the aforementioned reason for other invocations.
tools/all: include/all lib/all src/all
src/all lib/all: include/all
src/all: lib/all
MAJOR := $(XMLRPC_MAJOR_RELEASE)
MINOR := $(XMLRPC_MINOR_RELEASE)
POINT := $(XMLRPC_POINT_RELEASE)
version.h: $(SRCDIR)/Makefile.version
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
echo "/* Generated by make file rule */" >>$@
echo "#define XMLRPC_C_VERSION" \
\"Xmlrpc-c $(MAJOR).$(MINOR).$(POINT)"\"" >>$@
echo "#define XMLRPC_VERSION_MAJOR $(MAJOR)" >>$@
echo "#define XMLRPC_VERSION_MINOR $(MINOR)" >>$@
echo "#define XMLRPC_VERSION_POINT $(POINT)" >>$@
# We don't want common.mk's rule for version.h
OMIT_VERSION_H = Y
# We don't want common.mk's rule for transport_config.h
OMIT_TRANSPORT_CONFIG_H = Y
include transport_config.make
# shell_config is a fragment to place inside a Bourne shell program that
# sets variables that tell how the build is configured.
shell_config: $(BLDDIR)/config.mk
rm -f $@
@echo "Lots of echoes to '$@' suppressed here ..."
@echo '#' >>$@
@echo '#######################################################' >>$@
@echo "# From '$@'" >>$@
@echo '#######################################################' >>$@
@echo 'ENABLE_ABYSS_THREADS="$(ENABLE_ABYSS_THREADS)"' >>$@
@echo 'ENABLE_LIBXML2_BACKEND="$(ENABLE_LIBXML2_BACKEND)"' >>$@
@echo 'MUST_BUILD_WININET_CLIENT="$(MUST_BUILD_WININET_CLIENT)"'>>$@
@echo 'MUST_BUILD_CURL_CLIENT="$(MUST_BUILD_CURL_CLIENT)"' >>$@
@echo 'MUST_BUILD_LIBWWW_CLIENT="$(MUST_BUILD_LIBWWW_CLIENT)"' >>$@
@echo 'NEED_RPATH="$(NEED_RPATH)"' >>$@
@echo 'NEED_WL_RPATH="$(NEED_WL)RPATH)"' >>$@
@echo 'LSOCKET="$(LSOCKET)"' >>$@
@echo 'WININET_LDADD="$(WININET_LDADD)"' >>$@
@echo 'WININET_RPATH="$(WININET_RPATH)"' >>$@
@echo 'WININET_WL_RPATH="$(WININET_WL_RPATH)"' >>$@
@echo 'CURL_LDADD="$(CURL_LDADD)"' >>$@
@echo 'CURL_RPATH="$(CURL_RPATH)"' >>$@
@echo 'CURL_WL_RPATH="$(CURL_WL_RPATH)"' >>$@
@echo 'LIBWWW_LDADD="$(LIBWWW_LDADD)"' >>$@
@echo 'LIBWWW_RPATH="$(LIBWWW_RPATH)"' >>$@
@echo 'LIBWWW_WL_RPATH="$(LIBWWW_WL_RPATH)"' >>$@
@echo 'XMLRPC_MAJOR_RELEASE="$(XMLRPC_MAJOR_RELEASE)"' >>$@
@echo 'XMLRPC_MINOR_RELEASE="$(XMLRPC_MINOR_RELEASE)"' >>$@
@echo 'XMLRPC_POINT_RELEASE="$(XMLRPC_POINT_RELEASE)"' >>$@
@echo 'FEATURE_LIST="$(FEATURE_LIST)"' >>$@
@echo 'PREFIX="$(PREFIX)"' >>$@
@echo 'HEADERINST_DIR="$(HEADERINST_DIR)"' >>$@
@echo 'LIBINST_DIR="$(LIBINST_DIR)"' >>$@
@echo 'BLDDIR="$(BLDDIR)"' >>$@
@echo 'ABS_SRCDIR="$(ABS_SRCDIR)"' >>$@
@echo '#######################################################' >>$@
# We don't want config.mk's xmlrpc-c-config.test rule:
OMIT_XMLRPC_C_CONFIG_TEST = Y
xmlrpc-c-config xmlrpc-c-config.test:%: %.main shell_config
rm -f $@
@echo "Echoes to '$@' suppressed here ..."
@echo '#! /bin/sh' >>$@
@echo '#' >>$@
@echo '# This file was generated by a make rule' >>$@
@echo '#' >>$@
cat shell_config >>$@
cat $< >>$@
chmod a+rx $@
.PHONY: clean clean-local
clean: $(SUBDIRS:%=%/clean) clean-common clean-local
clean-local:
rm -f transport_config.h
rm -f transport_config.h version.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
rm -f config.log config.status config.mk Makefile.srcdir
rm -f xmlrpc_config.h xmlrpc_amconfig.h stamp-h
rm -f shell_config xmlrpc-c-config xmlrpc-c-config.test
rm -f TAGS
.PHONY: tags
tags: $(SUBDIRS:%=%/tags) TAGS
check: $(SUBDIRS:%=%/check)
DISTFILES =
@ -82,29 +153,31 @@ DISTFILES =
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 ;\
install: $(DEFAULT_SUBDIRS:%=%/install) install-common
.PHONY: dep
dep: $(SUBDIRS:%=%/dep)
dep: version.h $(BLDDIR)/include/xmlrpc-c/config.h $(SUBDIRS:%=%/dep)
xmlrpc-c-config xmlrpc-c-config.test xmlrpc_config.h xmlrpc_amconfig.h \
xmlrpc_config.h xmlrpc_amconfig.h \
:%:%.in $(SRCDIR)/configure
$(SRCDIR)/configure
include $(SRCDIR)/Makefile.common
include $(SRCDIR)/common.mk
# A trick to catch a common user error. When you don't run 'configure',
# you don't have a Makefile.srcdir, which means $(SRCDIR) is null.
/common.mk:
@echo =======================================
@echo = You must run Configure before Make. =
@echo =======================================
false
# 'tags' generates/updates an Emacs tags file, anmed TAGS, in the current
# directory. Use with Emacs command 'find-tag'.
.PHONY: tags
tags:
find . -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" | \
etags -

View File

@ -7,8 +7,11 @@
# GNU Make uses a make file named "GNUmakefile" in preference to "Makefile"
# if it exists. This package contains a "GNUmakefile".
default: all
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
false

View File

@ -0,0 +1 @@
SRCDIR=@abs_srcdir@

View File

@ -0,0 +1,11 @@
###############################################################################
# This is not only a make file inclusion, but a source file for the program
# 'mkvers' in the Windows build system. The latter is very particular about
# the format of this file. Do not change white space, add comment lines, or
# anything!
#
#
###############################################################################
XMLRPC_MAJOR_RELEASE = 1
XMLRPC_MINOR_RELEASE = 14
XMLRPC_POINT_RELEASE = 99

View File

@ -36,51 +36,17 @@ 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:
BUILDING, INSTALLING
--------------------
See the file doc/INSTALL.
In the simplest case, it's just a conventional
$ ./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
----------------------

View File

@ -0,0 +1,48 @@
@echo This batch file requires a powerful XDELETE program. One
@echo that will REMOVE whole directories recursively ...
@echo If you do NOT have such a program, then abort now, and
@echo adjust the line below ...
@set TEMPX=xdelete -dfrm
@echo set TEMPX=%TEMPX%
@pause
@echo #####################################################
@echo ARE YOU SURE YOU WANT TO DO THIS? Ctrl+C to abort ...
@echo #####################################################
@pause
@echo CleanAll: Last chance ... ctrl+c to abort ...
@pause
@echo CleanAll: Cleaning the headers ...
call CleanWin32
@echo CleanAll: and removing the SOLUTION files ...
call delsln
@echo CleanAll: Cleaning the gennmtab generated header ...
@if EXIST ..\lib\expat\xmltok\nametab.h del ..\lib\expat\xmltok\nametab.h > nul
@echo CleanAll: Cleaning all built binaries ...
@if EXIST ..\bin\*.exe del ..\bin\*.exe > nul
@if EXIST ..\bin\*.exp del ..\bin\*.exp > nul
@if EXIST ..\bin\*.ilk del ..\bin\*.ilk > nul
@if EXIST ..\bin\*.lib del ..\bin\*.lib > nul
@if EXIST ..\lib\*.lib del ..\lib\*.lib > nul
@if EXIST ..\lib\*.dll del ..\lib\*.dll > nul
@echo CleanAll: Cleaning test data files ...
@if EXIST ..\bin\data\*.xml del ..\bin\data\*.xml > nul
@if EXIST ..\bin\data\. rd ..\bin\data > nul
@if EXIST ..\bin\. rd ..\bin > nul
@echo CleanAll: Cleaning old residual built binaries ... but none should exist ...
@if EXIST ..\lib\expat\gennmtab\Debug\. %TEMPX% ..\lib\expat\gennmtab\Debug
@if EXIST ..\lib\expat\gennmtab\Release\. %TEMPX% ..\lib\expat\gennmtab\Release
@if EXIST ..\lib\expat\xmlparse\Debug\. %TEMPX% ..\lib\expat\xmlparse\Debug
@if EXIST ..\lib\expat\xmlparse\DebugDLL\. %TEMPX% ..\lib\expat\xmlparse\DebugDLL
@if EXIST ..\lib\expat\xmlparse\Release\. %TEMPX% ..\lib\expat\xmlparse\Release
@if EXIST ..\lib\expat\xmlparse\ReleaseDLL\. %TEMPX% ..\lib\expat\xmlparse\ReleaseDLL
@if EXIST ..\lib\expat\xmlparse\ReleaseMinSizeDLL\. %TEMPX% ..\lib\expat\xmlparse\ReleaseMinSizeDLL
@if EXIST ..\lib\expat\xmltok\Debug\. %TEMPX% ..\lib\expat\xmltok\Debug
@if EXIST ..\lib\expat\xmltok\DebugDLL\. %TEMPX% ..\lib\expat\xmltok\DebugDLL
@if EXIST ..\lib\expat\xmltok\Release\. %TEMPX% ..\lib\expat\xmltok\Release
@if EXIST ..\lib\expat\xmltok\ReleaseDLL\. %TEMPX% ..\lib\expat\xmltok\ReleaseDLL
@echo CleanAll: Finally, cleaning the main intermediate directories ...
@if EXIST Debug\. %TEMPX% Debug
@if EXIST Release\. %TEMPX% Release
@echo .
@echo CleanAll: Phew ... all done ...
@echo .

View File

@ -0,0 +1,43 @@
@echo Windows build
@echo This batch file deletes the copied header files,
@echo Deleting Win32 header files...
@echo #####################################################
@echo IF YOU HAVE MADE CHANGES IN ..\xmlrpc_config.h, ..\include\xmlrpc-c\config.h etc ...
@echo THESE CHANGES WILL BE LOST!
@echo You should run diffcfg.bat first to check for changes,
@echo and updcfg.bat if you have made changes ...
@echo #####################################################
@echo ARE YOU SURE YOU WANT TO DO THIS? Ctrl+C to abort ...
@echo #####################################################
@pause
@set TEMP1=
@if NOT EXIST ..\include\xmlrpc-c\config.h goto DN1
del ..\include\xmlrpc-c\config.h > nul
@set TEMP1=%TEMP1% ..\include\xmlrpc-c\config.h
:DN1
@if NOT EXIST ..\xmlrpc_config.h goto DN2
del ..\xmlrpc_config.h > nul
@set TEMP1=%TEMP1% ..\xmlrpc_config.h
:DN2
@if NOT EXIST ..\transport_config.h goto DN3
del ..\transport_config.h > nul
@set TEMP1=%TEMP1% ..\transport_config.h
:DN3
@if NOT EXIST ..\version.h goto DN4
del ..\version.h > nul
@set TEMP1=%TEMP1% ..\version.h
:DN4
@if NOT EXIST ..\examples\config.h goto DN5
del ..\examples\config.h > nul
@set TEMP1=%TEMP1% ..\examples\config.h
:DN5
@if "%TEMP1%." == "." goto ALLDN
@echo DELETED win32 header files.
@echo %TEMP1%
@goto END
:ALLDN
@echo NOne to DELETE ...
@goto END
:END

View File

@ -1,7 +1,35 @@
@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
@REM Windows build
@REM This must be RUN once to establish some header files,
@REM that are generated by the automake process
@echo creating Win32 header files...once only
@set TEMPV=
@if EXIST ..\include\xmlrpc-c\config.h goto DN1
copy .\win32_config.h ..\include\xmlrpc-c\config.h > nul
@set TEMPV=%TEMPV% ..\include\xmlrpc-c\config.h
:DN1
@if EXIST ..\xmlrpc_config.h goto DN2
copy .\xmlrpc_win32_config.h ..\xmlrpc_config.h > nul
@set TEMPV=%TEMPV% ..\xmlrpc_config.h
:DN2
@if EXIST ..\transport_config.h goto DN3
copy .\transport_config_win32.h ..\transport_config.h > nul
@set TEMPV=%TEMPV% ..\transport_config.h
:DN3
@if EXIST ..\version.h goto DN4
call mkvers
@set TEMPV=%TEMPV% ..\version.h
:DN4
@if EXIST ..\examples\config.h goto DN5
copy .\xmlrpc_win32_config.h ..\examples\config.h > nul
@set TEMPV=%TEMPV% ..\examples\config.h
:DN5
@if "%TEMPV%." == "." goto ALLDN
@echo Generated the following win32 header files ...
@echo %TEMPV%
@goto END
:ALLDN
@echo Using previous copies ... Use CleanWin32.bat to remove, and do again ...
@goto END
:END

View File

@ -0,0 +1,125 @@
Current information is in ReadMeWin32.txt.
What follows is previous contents of that file.
Markus Hoffrogge:
Compilation for WIN32 is possible now again for version 1.6.10 - non
CPP parts only. Project files have been tested under VicualStudio
6.0. Build project all - this will build all other projects. CPP
code is not compiled and adopted right now.
This release excludes the option to compile an "http.sys" version of
an XML-RPC server. If you do wish to build in the http.sys server, set
the MUST_BUILD_HTTP_SYS_SERVER to 1 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.

View File

@ -1,116 +1,64 @@
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.
Build Instructions For XML-RPC For C/C++ On Windows
---------------------------------------------------
Latest Windows work was done by
Geoff McLane
19 October, 2007
home: http://geoffair.net
1. Run the batch file ConfigureWin32.bat, found in the Windows
directory. This will copy four(4) headers to the appropriate folders.
2. Load xmlrpc.dsw in MSVC[7,8] or later, and build the Release or Debug
configurations. DLL configurations are not included, and may not compile.
This build requires that you have a Microsoft SDK, or Plaform SDK
installed, since among other things, it uses <http.h>, and
HTTPAPI.LIB, from the SDK.
Once built, the rpctest.exe, in the bin folder, should run with no errors,
and the xmlrpc_sample_add_server.exe, using port 8080, and
xmlrpc_sample_add_sync_client.exe should communicate ... proving 7+5 = 12 ;=))
Have fun.
PS: Several other batch files are included in the Windows folder ...
delsln.bat - to delete all the MSVC7 and 8 solution file.
diffcfg.bat - compare the headers in windows with the version used in
the compile. Requires diff.exe to be in the path.
updcfg.bat - copy the 3 manually maintained configuration files back
to the Windows folder (for distribution).
cleawin32.bat - deletes the headers used in the compile. That is does the
opposite of ConfigureWin32.bat.
cleanall.bat - to remove ALL the binary files created. Requires an xdelete
program which will recursively delete an entire folder.
There is some historical information in ReadMeOld.txt, which used to be
the contents of this file. Some of it is still valid.
Developing XML-RPC For C/C++ for Windows
----------------------------------------
If you fix or enhance something in the Windows build system, please send
your updates to the Xmlrpc-c maintainer to be included in future releases
so others don't have to repeat your work.
Output of a Subversion 'diff' is usually the best way to send updates,
but you can also send complete files or just a description of the
change if that is easier.
For the project files, we distribute only MSVC6-compatible DSP and DSW
files (which are, of course, usable as input to later versions of MSVC
as well). That means if you need to modify something in the project
files and you are not using MSVC6, you must edit the project files
manually as text files. Modifying them via the IDE would simply
generate new files in a format that cannot be used with older MSVC.

View File

@ -1,64 +1,128 @@
Background:
Lets 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 DLLs (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.
Background:
Lets say you need to have 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 client XML transport mechanism.
Overview:
The default projects in Xmlrpc-c create standalone executables that do
not require other DLLs (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 xmlrpc-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.
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 compression capability. In the command prompt, navigate to the
curl\lib directory and execute the following commands:
nmake -f Makefile.vc6 CFG=debug RTLIBCFG=static
nmake -f Makefile.vc6 CFG=release RTLIBCFG=static
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.
USING MSVC8 - 2007/11/25
========================
This is for MSVC8, but most will apply to all version of Microsoft
Visual Studio.
Download the CURL source. Run the buildconf.bat to generate some
additional files. This builds a 'dummy' hugehelp.c, but it can also
be built using the src\mkhelp.pl Perl script. You may have to build
you own VCPROJ file for CURL, if you want to use MSVC. It does
provide a Makefile.vc6 as mentioned above.
To build all the CURL library variations, use
> nmake /nologo vc-all
but note this will use the /MD[d] DLL runtime. Only by adding
RTCFGLIB=static to each of the makefile commands will /MT[d] be
used.
Essentially, for building the static Debug or Release CURL libraries,
it is all the sources in the curl\lib folder. Make sure you choose /MT
and /MTd for the runtime, and build both using say the name libcurl.lib.
When you have Debug\libcurl.lib and Release\libcurl.lib built, you
are ready to build and link them with Xmlrpc-c.
After running xmlrpc-c\Windows\configurewin32.bat, loading xmlrpc.dsw
will convert all the projects to VCPROJ files. In the File View, in
the xmlrpc project, in the properties of xmlrpc_curl_transport.c,
change 'Exclude file from build' from 'yes' to 'no', for Debug
and Release.
In the 'Header Files' section, open the "transport_config.h" file,
and change MUST_BUILD_CURL_CLIENT to 1, and the XMLRPC_DEFAULT_TRANSPORT
to "curl", if desired.
As usual, for each of the 'client' projects, and rpctest, in the properties,
Linker section, you can add the library libcurl.lib on the Input tab, and
the relative path to the library in the General tab to something like -
..\..\curl\Debug and ..\..\curl\Release, or where ever you built or
copied these static libraries too.
Or you can adjust the Windows/curlink.h, to directly point to your
respective Debug and Release static CURL libraries, either where you
built them, or where you copied them too.
Now, Xmlrpc-c should build using the CURL transport.
Note, for the final linking, all RUNTIME libraries MUST be the SAME.
A mixture of /MD and /MT will give big linkage problems. Any one project
built with the alterate RUNTIME will show many items defined more than
once. And of course, you can also NOT mix Debug with Release. That is
/MDd with /MD, nor /MTd with /MT, or else there will be unresolved
debug items.
EOF

View File

@ -0,0 +1,51 @@
Using xmlrpc_cpp_proxy.dsp
While not included in the main xmlrpc.dsw file, this
xmlrpc_cpp_proxy.dsp, if added as a project to the xmlrpc solution,
will build bin\xmlrpc_cpp_proxy.exe and xmlrpc_cpp_proxyD.exe, for
testing using the default WinINET transport.
After you have loaded the xmlrpc_cpp_proxy.dsp, which adds an
xmlrpc_cpp_proxy project, it is necessary to ADD a dependance on
the xmlrpc library, to complete the link.
To do this in say MSVC8, select the xmlrpc_cpp_proxy project, and right
mouse click, and in the context menu, select 'Project Dependancies...'.
And in the Project Dependancies dialog, check the xmlrpc proejct,
then [Ok] ...
To test your xmlrpc_cpp_proxy[D].exe -
1. In a console start the server, like -
bin/xmlrpc_sample_add_serverD 8080
Note, since this server opens a socket, you may have to enable it on some
anti-virus software that detects the socket being established, and
'Unblock' it in the Windows Security Alert system dialog that appears.
You can later remove this program from the Firewall exceptions, through
Control Panel -> Windows Firewall, selecting the 'Exceptions' tab, where
you can also disable this 'blocking' notification, but not recommended.
The server should start, and report -
Running XML-RPC server...
2. In another console run the cpp proxy client, with say -
bin>xmlrpc_cpp_proxyD http://localhost:8080/RPC2 null null
The client should connect to the server, and output a 'null' header,
and implementation file. If this functions, for a bigger example, try -
bin>xmlrpc_cpp_proxyD http://localhost:8080/RPC2 system systemProxy
and you should see a better example of a class header, and the
implementation code ...
20 December, 2007
EOF

View File

@ -0,0 +1,252 @@
# Microsoft Developer Studio Project File - Name="abyss" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=abyss - 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 "abyss.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 "abyss.mak" CFG="abyss - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "abyss - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "abyss - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "abyss - 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\Abyss"
# PROP Intermediate_Dir "Release\Abyss"
# 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 "..\\" /I "..\include" /I "..\lib\util\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /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
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib\abyss.lib"
!ELSEIF "$(CFG)" == "abyss - 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\abyss"
# PROP Intermediate_Dir "Debug\abyss"
# 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 /MTd /W3 /Gm /GX /ZI /Od /I "..\\" /I "..\include" /I "..\lib\util\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /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
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\lib\abyssD.lib"
!ENDIF
# Begin Target
# Name "abyss - Win32 Release"
# Name "abyss - 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\channel.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\chanswitch.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\date.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\file.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\handler.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\http.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\init.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\response.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\server.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\session.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\socket.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\socket_openssl.c
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\socket_unix.c
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\socket_win.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\thread_fork.c
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\thread_pthread.c
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\thread_windows.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\token.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\trace.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\lib\abyss\src\abyss_info.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\channel.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\chanswitch.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\conn.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\data.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\date.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\file.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\handler.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\http.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\server.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\session.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\socket.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\socket_win.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\thread.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\token.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\trace.h
# End Source File
# End Group
# End Target
# End Project

View File

@ -0,0 +1,97 @@
# Microsoft Developer Studio Project File - Name="configwin32" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) External Target" 0x0106
CFG=configwin32 - 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 "configwin32.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 "configwin32.mak" CFG="configwin32 - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "configwin32 - Win32 Release" (based on "Win32 (x86) External Target")
!MESSAGE "configwin32 - Win32 Debug" (based on "Win32 (x86) External Target")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
!IF "$(CFG)" == "configwin32 - 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 Cmd_Line "ConfigureWin32.bat"
# PROP BASE Rebuild_Opt ""
# PROP BASE Target_File "../config.h"
# PROP BASE Bsc_Name ""
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Cmd_Line "ConfigureWin32.bat"
# PROP Rebuild_Opt ""
# PROP Target_File "../config.h"
# PROP Bsc_Name ""
# PROP Target_Dir ""
!ELSEIF "$(CFG)" == "configwin32 - 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 Cmd_Line "ConfigureWin32.bat"
# PROP BASE Rebuild_Opt ""
# PROP BASE Target_File "../config.h"
# PROP BASE Bsc_Name ""
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ""
# PROP Intermediate_Dir ""
# PROP Cmd_Line "ConfigureWin32.bat"
# PROP Rebuild_Opt ""
# PROP Target_File "../config.h"
# PROP Bsc_Name ""
# PROP Target_Dir ""
!ENDIF
# Begin Target
# Name "configwin32 - Win32 Release"
# Name "configwin32 - Win32 Debug"
!IF "$(CFG)" == "configwin32 - Win32 Release"
!ELSEIF "$(CFG)" == "configwin32 - Win32 Debug"
!ENDIF
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# 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

View File

@ -1,102 +1,121 @@
# 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
# 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
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 "../include" /I "../lib/util/include" /I "../.." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ABYSS_WIN32" /D "CURL_STATICLIB" /D "_CRT_SECURE_NO_WARNINGS" /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\xmlrpccpp.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\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 /MTd /W3 /Gm /GX /ZI /Od /I "../.." /I ".." /I "../include" /I "../lib/util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ABYSS_WIN32" /D "CURL_STATICLIB" /D "_CRT_SECURE_NO_WARNINGS" /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\xmlrpccppD.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\cpptestD.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\cpp\test\registry.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\test\server_abyss.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\test\server_pstream.cpp
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=..\src\cpp\test\test.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\test\testclient_dummy.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\test\tools.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

View File

@ -0,0 +1,18 @@
/* 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, we include this file into the Curl transport source code
to tell the linker to add these libs.
Alternatively, the USER can add the libraries to LINK with as
NEEDED!
*/
#ifdef _DEBUG
#pragma comment( lib, "C:\\FG\\FGCOMXML\\curl\\build\\Debug\\Lib_curl.lib" )
#else
#pragma comment( lib, "C:\\FG\\FGCOMXML\\curl\\build\\Release\\Lib_curl.lib" )
#endif
#pragma comment( lib, "Winmm.lib" )
#pragma comment( lib, "Ws2_32.lib" )
#pragma comment( lib, "Wldap32.lib" )

View File

@ -0,0 +1,56 @@
@echo Delete the MSVC7 or MSVC8 soultion files ...
@echo *****************************************************
@echo ARE YOU SURE YOU WANT TO DO THIS? Ctrl+C to ABORT ...
@echo *****************************************************
@pause
@echo Deleting SOLUTION files ...
@if EXIST *.sln del *.sln > nul
@if EXIST *.vcproj del *.vcproj > nul
@if EXIST *.old echo Deleting *.old ...
@if EXIST *.old Del *.old > nul
@if EXIST *.bak echo Deleting *.bak ...
@if EXIST *.bak Del *.bak > nul
@if NOT EXIST temp*.* goto dntmp
@echo Delete temp*.* ...
@del temp*.* > nul
:dntmp
@if NOT EXIST *.obj goto dnobj
@echo Delete *.obj ...
@del *.obj > nul
:dnobj
@if NOT EXIST *.err goto dnerr
@echo Delete *.err ...
@del *.err > nul
:dnerr
@if NOT EXIST *.pdb goto dnpdb
@echo Delete *.pdb ...
@del *.pdb > nul
:dnpdb
@if NOT EXIST *.lst goto dnlst
@echo Delete *.lst ...
@del *.lst > nul
:dnlst
@if EXIST *.pch echo Deleting *.pch ...
@if EXIST *.pch Del *.pch > nul
@if EXIST *.ilk echo Deleting *.ilk ...
@if EXIST *.ilk Del *.ilk > nul
@if EXIST *.NCB echo Deleting *.NCB ...
@if EXIST *.NCB Del *.NCB > nul
@if EXIST *.plg echo Deleting *.plg ...
@if EXIST *.plg Del *.plg > nul
@if EXIST *.OPT echo Deleting *.OPT ...
@if EXIST *.OPT Del *.OPT > nul
@if EXIST *.idb echo Deleting *.idb ...
@if EXIST *.idb Del *.idb > nul
@if EXIST *.aps echo Deleting *.aps ...
@if EXIST *.aps Del *.aps > nul
@if EXIST *.sbr echo Deleting *.sbr ...
@if EXIST *.sbr Del *.sbr > nul
@if NOT EXIST *.suo goto DNSUO
@attrib -S -R -H *.suo > nul
@if EXIST *.suo echo Deleting *.suo ...
@if EXIST *.suo Del *.suo > nul
:DNSUO
@if EXIST *.user echo Deleting *.user ...
@if EXIST *.user Del *.user > nul
@echo All done ...

View File

@ -0,0 +1,6 @@
diff -us win32_config.h ..\include\xmlrpc-c\config.h > tempcfg.diff
diff -us xmlrpc_win32_config.h ..\xmlrpc_config.h >> tempcfg.diff
diff -us transport_config_win32.h ..\transport_config.h >> tempcfg.diff
diff -us xmlrpc_win32_config.h ..\examples\config.h >> tempcfg.diff
np tempcfg.diff

View File

@ -0,0 +1,112 @@
# Microsoft Developer Studio Project File - Name="gennmtab" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=gennmtab - Win32 Release
!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 "gennmtab.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 "gennmtab.mak" CFG="gennmtab - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "gennmtab - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "gennmtab - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "gennmtab - 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\gennmtab"
# PROP Intermediate_Dir "Release\gennmtab"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "."
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x809 /d "NDEBUG"
# ADD RSC /l 0x809 /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 /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 /nologo /subsystem:console /machine:I386 /out:"..\bin\gennmtab.exe"
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Desc=(R) Generating nametab.h ...
PostBuild_Cmds=..\bin\gennmtab.exe >..\lib\expat\xmltok\nametab.h
# End Special Build Tool
!ELSEIF "$(CFG)" == "gennmtab - 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\gennmtab"
# PROP Intermediate_Dir "Debug\gennmtab"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "."
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x809 /d "_DEBUG"
# ADD RSC /l 0x809 /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 /nologo /subsystem:console /debug /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 /nologo /subsystem:console /debug /machine:I386 /out:"..\bin\gennmtabD.exe"
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Desc=(D) Generating nametab.h ...
PostBuild_Cmds=..\bin\gennmtabD.exe >..\lib\expat\xmltok\nametab.h
# End Special Build Tool
!ENDIF
# Begin Target
# Name "gennmtab - Win32 Release"
# Name "gennmtab - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
# Begin Source File
SOURCE=..\lib\expat\gennmtab\gennmtab.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@ -0,0 +1,53 @@
@if EXIST ..\version.h goto SHOW
@if NOT EXIST ..\Makefile.version goto ERR1
@if NOT EXIST mkvers1.bat goto ERR2
@echo updating/creating ..\version.h ...
@set TEMP1=1
@for /F "skip=8 tokens=3" %%i in (..\Makefile.version) do @call mkvers1 %%i
@if "%TEMPX1%." == "." goto NOX1
@if "%TEMPX2%." == "." goto NOX1
@if "%TEMPX3%." == "." goto NOX1
@set TEMP1=..\version.h
@echo #ifndef XMLRPC_C_VERSION_INCLUDED > %TEMP1%
@echo #define XMLRPC_C_VERSION_INCLUDED >> %TEMP1%
@echo /* generated by Windows/mkvers.bat on %DATE% ... */ >> %TEMP1%
@echo #define XMLRPC_C_VERSION "Xmlrpc-c %TEMPX1%.%TEMPX2%.%TEMPX3%" >> %TEMP1%
@echo #define XMLRPC_VERSION_MAJOR %TEMPX1% >> %TEMP1%
@echo #define XMLRPC_VERSION_MINOR %TEMPX2% >> %TEMP1%
@echo #define XMLRPC_VERSION_POINT %TEMPX3% >> %TEMP1%
@echo #endif >> %TEMP1%
type %TEMP1%
@echo ..\version.h set to the above ...
@set TEMP1=
@set TEMPX1=
@set TEMPX2=
@set TEMPX3=
@goto END
:NOX1
@echo Some error occurred in the batch process ...
@goto NOVER
:NOVER
@echo Failed to create ..\version.h .
@pause
@goto END
:ERR1
@echo Can not locate ..\Makefile.version ... check name, location ...
@pause
@goto END
:ERR2
@echo Can not locate mkvers1.bat ... check name, location ...
@pause
@goto END
:SHOW
@echo ..\version.h already exist, with version ...
@type ..\version.h
@echo Delete this file if you wish to redo it ...
@pause
@goto END
:END

View File

@ -0,0 +1,32 @@
@if "%1." == "." goto ERR2
@if "%TEMP1%." == "." goto ERR1
@if "%TEMP1%" == "1" goto SET1
@if "%TEMP1%" == "2" goto SET2
@if "%TEMP1%" == "3" goto SET3
@echo environment variable has an invalid value %TEMP1% ...
@goto ERR2
:SET1
@set TEMPX1=%1
@set TEMP1=2
@goto END
:SET2
@set TEMPX2=%1
@set TEMP1=3
@goto END
:SET3
@set TEMPX3=%1
@set TEMP1=4
@goto END
:ERR1
@echo Environment variable TEMP1 not set ...
:ERR2
@echo This batch is only intended to be run from within UPDVERS.BAT ...
@pause
@goto END
:END

View File

@ -1,236 +1,210 @@
# 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
# 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
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" /I "../.." /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=if not exist ..\Bin\data md ..\Bin\data copy ..\src\test\data\*.* ..\Bin\data
# 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 /MTd /W3 /Gm /GX /ZI /Od /I "../.." /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=if not exist ..\Bin\data md ..\Bin\data copy ..\src\test\data\*.* ..\Bin\data
# 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\abyss.c
# End Source File
# 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\util\casprintf.c
# End Source File
# Begin Source File
SOURCE=..\src\test\method_registry.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=..\src\test\serialize_value.c
# End Source File
# Begin Source File
SOURCE=..\src\test\server_abyss.c
# End Source File
# Begin Source File
SOURCE=..\src\test\test.c
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\token.h
# 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
# 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\serialize_value.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

View File

@ -1,26 +1,13 @@
/* Win32 version of transport_config.h.
For other platforms, this is generated automatically, but for Windows,
someone generates it manually. Nonetheless, we keep it looking as much
as possible like the automatically generated one to make it easier to
maintain (e.g. you can compare the two and see why something builds
differently for Windows that for some other platform).
*/
#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
static const char * const XMLRPC_DEFAULT_TRANSPORT =
"wininet";

View File

@ -0,0 +1,9 @@
@echo This will COPY the current config.h, xmlrpc_config.h, transprt_config.h,
@echo version.h, overwriting files in this 'Windows' folder!
@echo ARE YOU SURE YOU WANT TO DO THIS??? Ctrl+C to abort ...
@pause
copy ..\include\xmlrpc-c\config.h win32_config.h
copy ..\xmlrpc_config.h xmlrpc_win32_config.h
copy ..\transport_config.h transport_config_win32.h
@echo all done ...

View File

@ -0,0 +1,38 @@
#ifndef XMLRPC_C_CONFIG_H_INCLUDED
#define XMLRPC_C_CONFIG_H_INCLUDED
/* This file, part of XML-RPC For C/C++, is meant to
define characteristics of this particular installation
that the other <xmlrpc-c/...> header files need in
order to compile correctly when #included in Xmlrpc-c
user code.
Those header files #include this one.
This file was created by a make rule.
*/
#define XMLRPC_HAVE_WCHAR 1
#ifdef WIN32
/* SOCKET is a type defined by <winsock.h>. Anyone who
uses XMLRPC_SOCKET on a WIN32 system must #include
<winsock.h>
*/
#define XMLRPC_SOCKET SOCKET
#define XMLRPC_HAVE_TIMEVAL 0
#define XMLRPC_HAVE_TIMESPEC 0
#else
#define XMLRPC_SOCKET int
#define XMLRPC_HAVE_TIMEVAL 1
#define XMLRPC_HAVE_TIMESPEC 1
#endif
#if defined(_MSC_VER)
/* Newer MSVC has long long, but MSVC 6 does not */
#define XMLRPC_INT64 __int64
#define XMLRPC_INT32 __int32
#else
#define XMLRPC_INT64 long long
#define XMLRPC_INT32 int
#endif
#endif

View File

@ -0,0 +1,106 @@
# Microsoft Developer Studio Project File - Name="xmlhttpsys" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=xmlhttpsys - Win32 Release
!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 "xmlhttpsys.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 "xmlhttpsys.mak" CFG="xmlhttpsys - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "xmlhttpsys - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "xmlhttpsys - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "xmlhttpsys - 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\xmlhttpsys"
# PROP Intermediate_Dir "Release\xmlhttpsys"
# PROP Target_Dir "."
MTL=midl.exe
LINK32=link.exe -lib
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /I "..\include" /D "NDEBUG" /D "XML_NS" /D "WIN32" /D "_WINDOWS" /D "XML_DTD" /D "_MBCS" /D "_LIB" /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\xmlhttpsys.lib"
!ELSEIF "$(CFG)" == "xmlhttpsys - 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\xmlhttpsys"
# PROP Intermediate_Dir "Debug\xmlhttpsys"
# PROP Target_Dir "."
MTL=midl.exe
LINK32=link.exe -lib
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "XML_DTD" /D "XML_NS" /D "_MBCS" /D "_LIB" /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\xmlhttpsysD.lib"
!ENDIF
# Begin Target
# Name "xmlhttpsys - Win32 Release"
# Name "xmlhttpsys - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
# Begin Source File
SOURCE=..\src\xmlrpc_server_w32httpsys.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=..\xmlrpc_config.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@ -0,0 +1,106 @@
# Microsoft Developer Studio Project File - Name="xmlparse" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=xmlparse - Win32 Release
!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 "xmlparse.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 "xmlparse.mak" CFG="xmlparse - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "xmlparse - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "xmlparse - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "xmlparse - 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\xmlparse"
# PROP Intermediate_Dir "Release\xmlparse"
# PROP Target_Dir "."
LINK32=link.exe -lib
MTL=midl.exe
# 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\expat\xmltok" /I "..\lib\expat\xmlwf" /I ".." /I "..\lib\util\include" /I "..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "XML_DTD" /D "_MBCS" /D "_LIB" /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\xmlparse.lib"
!ELSEIF "$(CFG)" == "xmlparse - 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\xmlparse"
# PROP Intermediate_Dir "Debug\xmlparse"
# PROP Target_Dir "."
LINK32=link.exe -lib
MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\lib\expat\xmltok" /I "..\lib\expat\xmlwf" /I ".." /I "..\lib\util\include" /I "..\include" /D "WIN32" /D "_WINDOWS" /D "XML_DTD" /D "_MBCS" /D "_LIB" /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\xmlparseD.lib"
!ENDIF
# Begin Target
# Name "xmlparse - Win32 Release"
# Name "xmlparse - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
# Begin Source File
SOURCE=..\lib\expat\xmlparse\xmlparse.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=..\lib\expat\xmlparse\xmlparse.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@ -1,258 +1,469 @@
# 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
# 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
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 ""
LINK32=link.exe -lib
MTL=midl.exe
# 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/util/include" /I "../include" /I ".." /I "../lib/expat/xmlparse" /I "../lib/abyss/src" /I "../lib/wininet_transport" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "ABYSS_WIN32" /D "CURL_STATICLIB" /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 ""
LINK32=link.exe -lib
MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../lib" /I "../lib/util/include" /I "../include" /I ".." /I "../lib/expat/xmlparse" /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\libutil\asprintf.c
# End Source File
# Begin Source File
SOURCE=..\lib\libutil\error.c
# End Source File
# Begin Source File
SOURCE=..\lib\libutil\make_printable.c
# End Source File
# Begin Source File
SOURCE=..\lib\libutil\memblock.c
# End Source File
# Begin Source File
SOURCE=..\src\method.c
# End Source File
# Begin Source File
SOURCE=..\lib\util\pthreadx_win32.c
# End Source File
# Begin Source File
SOURCE=..\src\parse_value.c
# End Source File
# Begin Source File
SOURCE=..\src\registry.c
# End Source File
# Begin Source File
SOURCE=..\src\resource.c
# End Source File
# Begin Source File
SOURCE=..\lib\libutil\select.c
# End Source File
# Begin Source File
SOURCE=..\lib\libutil\sleep.c
# End Source File
# Begin Source File
SOURCE=..\src\system_method.c
# End Source File
# Begin Source File
SOURCE=..\lib\libutil\time.c
# End Source File
# Begin Source File
SOURCE=..\src\trace.c
# End Source File
# Begin Source File
SOURCE=..\src\version.c
# End Source File
# Begin Source File
SOURCE=..\lib\libutil\utf8.c
# End Source File
# Begin Source File
SOURCE=..\src\double.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_build.c
# End Source File
# Begin Source File
SOURCE=..\src\xmlrpc_client.c
# End Source File
# Begin Source File
SOURCE=..\src\xmlrpc_client_global.c
# End Source File
# Begin Source File
SOURCE=..\src\xmlrpc_server_info.c
# End Source File
# Begin Source File
SOURCE=..\lib\curl_transport\xmlrpc_curl_transport.c
!IF "$(CFG)" == "xmlrpc - Win32 Release"
# ADD CPP /I "." /I "..\..\curl\include"
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "xmlrpc - Win32 Debug"
# ADD CPP /I "." /I "..\..\curl\include"
# PROP Exclude_From_Build 1
!ENDIF
# 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_decompose.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_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
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=..\src\xmlrpc_string.c
# End Source File
# Begin Source File
SOURCE=..\src\xmlrpc_struct.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=..\lib\abyss\src\http.h
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\abyss.h"
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\abyss_info.h
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\abyss_winsock.h"
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\base.h"
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\base_int.h"
# End Source File
# Begin Source File
SOURCE=..\lib\util\include\bool.h
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\c_util.h"
# End Source File
# Begin Source File
SOURCE=..\lib\util\include\c_util.h
# End Source File
# Begin Source File
SOURCE=..\lib\util\include\casprintf.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\channel.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\chanswitch.h
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\client.h"
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\client_global.h"
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\client_int.h"
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\config.h"
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\conn.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\date.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\file.h
# End Source File
# Begin Source File
SOURCE=..\lib\util\include\girmath.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\handler.h
# End Source File
# Begin Source File
SOURCE=..\lib\util\include\inline.h
# End Source File
# Begin Source File
SOURCE=..\lib\util\include\linklist.h
# End Source File
# Begin Source File
SOURCE=..\lib\util\include\mallocvar.h
# End Source File
# Begin Source File
SOURCE=..\src\double.h
# End Source File
# Begin Source File
SOURCE=..\src\method.h
# End Source File
# Begin Source File
SOURCE=..\lib\util\include\pthreadx.h
# End Source File
# Begin Source File
SOURCE=..\src\parse_value.h
# End Source File
# Begin Source File
SOURCE=..\src\registry.h
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\server.h"
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\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\sleep_int.h"
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\socket.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\socket_win.h
# End Source File
# Begin Source File
SOURCE=..\lib\util\include\stdargx.h
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\string_int.h"
# End Source File
# Begin Source File
SOURCE=..\src\system_method.h
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\thread.h
# End Source File
# Begin Source File
SOURCE="..\include\xmlrpc-c\time_int.h"
# End Source File
# Begin Source File
SOURCE=..\lib\abyss\src\token.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\util_int.h"
# End Source File
# Begin Source File
SOURCE=..\xml_rpc_alloc.h
# End Source File
# Begin Source File
SOURCE=..\lib\expat\xmlparse\xmlparse.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

View File

@ -1,194 +1,242 @@
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>
{{{
}}}
###############################################################################
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "abyss"=".\abyss.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "cpptest"=".\cpptest.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name xmlrpc
End Project Dependency
Begin Project Dependency
Project_Dep_Name xmlrpccpp
End Project Dependency
Begin Project Dependency
Project_Dep_Name abyss
End Project Dependency
}}}
###############################################################################
Project: "gennmtab"=".\gennmtab.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "rpctest"=".\rpctest.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name xmlrpc
End Project Dependency
Begin Project Dependency
Project_Dep_Name abyss
End Project Dependency
}}}
###############################################################################
Project: "xmlhttpsys"=".\xmlhttpsys.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "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
Begin Project Dependency
Project_Dep_Name abyss
End Project Dependency
}}}
###############################################################################
Project: "xmlrpccpp"=".\xmlrpccpp.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name xmlparse
End Project Dependency
Begin Project Dependency
Project_Dep_Name abyss
End Project Dependency
Begin Project Dependency
Project_Dep_Name xmlrpc
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
Begin Project Dependency
Project_Dep_Name abyss
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 xmlhttpsys
End Project Dependency
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"=".\xmltok.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name gennmtab
End Project Dependency
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@ -0,0 +1,132 @@
# Microsoft Developer Studio Project File - Name="xmlrpc_cpp_proxy" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=xmlrpc_cpp_proxy - 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_cpp_proxy.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_cpp_proxy.mak" CFG="xmlrpc_cpp_proxy - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "xmlrpc_cpp_proxy - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "xmlrpc_cpp_proxy - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "xmlrpc_cpp_proxy - 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_cpp_proxy"
# PROP Intermediate_Dir "Release\xmlrpc_cpp_proxy"
# 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" /I "../.." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ABYSS_WIN32" /D "CURL_STATICLIB" /D "_CRT_SECURE_NO_WARNINGS" /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\xmlrpccpp.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\xmlrpc_cpp_proxy.exe"
!ELSEIF "$(CFG)" == "xmlrpc_cpp_proxy - 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_cpp_proxy"
# PROP Intermediate_Dir "Debug\xmlrpc_cpp_proxy"
# 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 /MTd /W3 /Gm /GX /ZI /Od /I "../.." /I ".." /I "../include" /I "../lib/util/include" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ABYSS_WIN32" /D "CURL_STATICLIB" /D "_CRT_SECURE_NO_WARNINGS" /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\xmlrpccppD.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\xmlrpc_cpp_proxyD.exe" /pdbtype:sept
!ENDIF
# Begin Target
# Name "xmlrpc_cpp_proxy - Win32 Release"
# Name "xmlrpc_cpp_proxy - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\tools\xmlrpc_cpp_proxy\proxyClass.cpp
# End Source File
# Begin Source File
SOURCE=..\tools\xmlrpc_cpp_proxy\systemProxy.cpp
# End Source File
# Begin Source File
SOURCE=..\tools\xmlrpc_cpp_proxy\xmlrpcMethod.cpp
# End Source File
# Begin Source File
SOURCE=..\tools\xmlrpc_cpp_proxy\xmlrpcType.cpp
# End Source File
# Begin Source File
SOURCE=..\tools\xmlrpc_cpp_proxy\xmlrpc_cpp_proxy.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\tools\xmlrpc_cpp_proxy\proxyClass.hpp
# End Source File
# Begin Source File
SOURCE=..\tools\xmlrpc_cpp_proxy\systemProxy.hpp
# End Source File
# Begin Source File
SOURCE=..\tools\xmlrpc_cpp_proxy\xmlrpcMethod.hpp
# End Source File
# Begin Source File
SOURCE=..\tools\xmlrpc_cpp_proxy\xmlrpcType.hpp
# 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
# End Target
# End Project

View File

@ -0,0 +1,122 @@
# Microsoft Developer Studio Project File - Name="xmlrpc_misc" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=xmlrpc_misc - Win32 Release
!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_misc.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_misc.mak" CFG="xmlrpc_misc - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "xmlrpc_misc - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "xmlrpc_misc - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "xmlrpc_misc - 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_misc"
# PROP Intermediate_Dir "Release\xmlrpc_misc"
# PROP Target_Dir "."
MTL=midl.exe
LINK32=link.exe -lib
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /I "..\lib\util\include" /D "NDEBUG" /D "XML_NS" /D "WIN32" /D "_WINDOWS" /D "XML_DTD" /D "_MBCS" /D "_LIB" /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_misc.lib"
!ELSEIF "$(CFG)" == "xmlrpc_misc - 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_misc"
# PROP Intermediate_Dir "Debug\xmlrpc_misc"
# PROP Target_Dir "."
MTL=midl.exe
LINK32=link.exe -lib
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "..\lib\util\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "XML_DTD" /D "XML_NS" /D "_MBCS" /D "_LIB" /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\xmlrpc_miscD.lib"
!ENDIF
# Begin Target
# Name "xmlrpc_misc - Win32 Release"
# Name "xmlrpc_misc - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
# Begin Source File
SOURCE=..\lib\util\casprintf.c
# End Source File
# Begin Source File
SOURCE=..\lib\util\cmdline_parser.c
# End Source File
# Begin Source File
SOURCE=..\lib\util\cmdline_parser_cpp.cpp
# End Source File
# Begin Source File
SOURCE=..\lib\util\getoptx.c
# End Source File
# Begin Source File
SOURCE=..\lib\util\string_parser.c
# End Source File
# Begin Source File
SOURCE=..\lib\util\stripcaseeq.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@ -1,102 +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
# 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
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" /I "../lib/util/include" /I "../.." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c /D "CURL_STATICLIB"
# SUBTRACT CPP /YX
# 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 /MTd /W3 /Gm /GX /ZI /Od /I ".." /I "../include" /I "../lib/util/include" /I "../.." /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c /D "CURL_STATICLIB"
# SUBTRACT CPP /YX
# 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 ..\lib\xmlrpcD.lib WinInet.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

View File

@ -1,140 +1,103 @@
# 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
# 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
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" /I "../lib/util/include" /I "../.." /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 /MTd /W3 /GX /Zi /Od /I ".." /I "../include" /I "../lib/util/include" /I "../.." /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "ABYSS_WIN32" /D "_THREAD" /YX /FD /GZ /c
# SUBTRACT CPP /Fr
# 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=..\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

View File

@ -1,104 +1,102 @@
# 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
# 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
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" /I "../lib/util/include" /I "../.." /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 /MTd /W3 /GX /Zi /Od /I ".." /I "../include" /I "../lib/util/include" /I "../.." /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

View File

@ -1,104 +1,103 @@
# 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
# 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
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" /I "../lib/util/include" /I "../.." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c /D "CURL_STATICLIB"
# 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 /MTd /W3 /Gm /GX /Zi /Od /I ".." /I "../include" /I "../lib/util/include" /I "../.." /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c /D "CURL_STATICLIB"
# 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

View File

@ -1,104 +1,102 @@
# 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
# 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
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" /I "../lib/util/include" /I "../.." /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c /D "CURL_STATICLIB"
# 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 /MTd /W3 /Gm /GX /Zi /Od /I ".." /I "../include" /I "../lib/util/include" /I "../.." /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c /D "CURL_STATICLIB"
# 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

View File

@ -1,130 +1,158 @@
#pragma once
/* Win32 version of xmlrpc_config.h.
/* From xmlrpc_amconfig.h */
/* Define to `unsigned' if <sys/types.h> doesn't define. */
/* #undef size_t */
For other platforms, this is generated automatically, but for Windows,
someone generates it manually. Nonetheless, we keep it looking as much
as possible like the automatically generated one to make it easier to
maintain (e.g. you can compare the two and see why something builds
differently for Windows than for some other platform).
/* Define if you have the setgroups function. */
/* #undef HAVE_SETGROUPS */
The purpose of this file is to define stuff particular to the build
environment being used to build Xmlrpc-c. Xmlrpc-c source files can
#include this file and have build-environment-independent source code.
/* #undef HAVE_ASPRINTF */
A major goal of this file is to reduce conditional compilation in
the other source files as much as possible. Even more, we want to avoid
having to generate source code particular to a build environment
except in this file.
/* 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
This file is NOT meant to be used by any code outside of the
Xmlrpc-c source tree. There is a similar file that gets installed
as <xmlrpc-c/config.h> that performs the same function for Xmlrpc-c
interface header files that get compiled as part of a user's program.
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. */
#ifndef XMLRPC_CONFIG_H_INCLUDED
#define XMLRPC_CONFIG_H_INCLUDED
/* From xmlrpc_amconfig.h */
#define HAVE__STRICMP 1
/* Name of package */
#define PACKAGE "xmlrpc-c"
/*----------------------------------*/
#ifndef HAVE_SETGROUPS
#define HAVE_SETGROUPS 0
#endif
#ifndef HAVE_ASPRINTF
#define HAVE_ASPRINTF 0
#endif
#ifndef HAVE_SETENV
#define HAVE_SETENV 0
#endif
#ifndef HAVE_PSELECT
#define HAVE_PSELECT 0
#endif
#ifndef HAVE_WCSNCMP
#define HAVE_WCSNCMP 1
#endif
#ifndef HAVE_GETTIMEOFDAY
#define HAVE_GETTIMEOFDAY 0
#endif
#ifndef HAVE_LOCALTIME_R
#define HAVE_LOCALTIME_R 0
#endif
#ifndef HAVE_GMTIME_R
#define HAVE_GMTIME_R 0
#endif
#ifndef HAVE_STRCASECMP
#define HAVE_STRCASECMP 0
#endif
#ifndef HAVE_STRICMP
#define HAVE_STRICMP 0
#endif
#ifndef HAVE__STRICMP
#define HAVE__STRICMP 0
#endif
#define HAVE_WCHAR_H 1
#define HAVE_SYS_FILIO_H 0
#define HAVE_SYS_IOCTL_H 0
#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... */
/* Used to mark an unused function parameter */
#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
#define HAVE_UNICODE_WCHAR 1
/* Xmlrpc-c code uses __inline__ to declare functions that should
be compiled as inline code. GNU C recognizes the __inline__ keyword.
Others recognize 'inline' or '__inline' or nothing at all to say
a function should be inlined.
#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
We could make 'configure' simply do a trial compile to figure out
which one, but for now, this approximation is easier:
*/
#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;
}
#if (!defined(__GNUC__))
#if (!defined(__inline__))
#if (defined(__sgi) || defined(_AIX) || defined(_MSC_VER))
#define __inline__ __inline
#else
#define __inline__
#endif
#endif
#endif
#ifndef socklen_t
typedef unsigned int socklen_t;
/* MSVCRT means we're using the Microsoft Visual C++ runtime library */
#ifdef _MSC_VER
/* The compiler is Microsoft Visual C++. */
#define MSVCRT _MSC_VER
#else
#define MSVCRT 0
#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;
#if MSVCRT
/* The MSVC runtime library _does_ have a 'struct timeval', but it is
part of the Winsock interface (along with select(), which is probably
its intended use), so isn't intended for use for general timekeeping.
*/
#define HAVE_TIMEVAL 0
#define HAVE_TIMESPEC 0
#else
#define HAVE_TIMEVAL 1
/* timespec is Posix.1b. If we need to work on a non-Posix.1b non-Windows
system, we'll have to figure out how to make Configure determine this.
*/
#define HAVE_TIMESPEC 1
#endif
#define __inline__ __inline
#if MSVCRT
#define XMLRPC_VSNPRINTF _vsnprintf
#else
#define XMLRPC_VSNPRINTF vsnprintf
#endif
#define HAVE_SETENV 1
__inline BOOL setenv(const char* name, const char* value, int i)
{
return (SetEnvironmentVariable(name, value) != 0) ? TRUE : FALSE;
}
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
/* Starting with MSVC 8, the runtime library defines various POSIX functions
such as strdup() whose names violate the ISO C standard (the standard
says the strXXX names are reserved for the standard), but warns you of
the standards violation. That warning is 4996, along with other warnings
that tell you you're using a function that Microsoft thinks you
shouldn't.
Well, POSIX is more important than that element of ISO C, so we disable
that warning.
FYI, msvcrt also defines _strdup(), etc, which doesn't violate the
naming standard. But since other environments don't define _strdup(),
we can't use it in portable code.
*/
#pragma warning(disable:4996)
#endif
#define snprintf _snprintf
#define popen _popen
#define strtoll _strtoui64
#define strtoull _strtoui64
#endif

View File

@ -0,0 +1,179 @@
# Microsoft Developer Studio Project File - Name="xmlrpccpp" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=xmlrpccpp - 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 "xmlrpccpp.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 "xmlrpccpp.mak" CFG="xmlrpccpp - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "xmlrpccpp - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "xmlrpccpp - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "xmlrpccpp - 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\xmlrpccpp"
# PROP Intermediate_Dir "Release\xmlrpccpp"
# PROP Target_Dir ""
LINK32=link.exe -lib
MTL=midl.exe
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "../lib" /I "../lib/curl_transport" /I "../lib/util/include" /I "../include" /I ".." /I "../lib/expat/xmlparse" /I "../lib/abyss/src" /I "../lib/wininet_transport" /I "../.." /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "ABYSS_WIN32" /D "CURL_STATICLIB" /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\xmlrpccpp.lib"
!ELSEIF "$(CFG)" == "xmlrpccpp - 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\xmlrpccpp"
# PROP Intermediate_Dir "Debug\xmlrpccpp"
# PROP Target_Dir ""
LINK32=link.exe -lib
MTL=midl.exe
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /GR /Gm /GX /ZI /Od /I "../lib" /I "../lib/curl_transport" /I "../lib/util/include" /I "../include" /I ".." /I "../lib/expat/xmlparse" /I "../lib/abyss/src" /I "../lib/wininet_transport" /I "../.." /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\xmlrpccppD.lib"
!ENDIF
# Begin Target
# Name "xmlrpccpp - Win32 Release"
# Name "xmlrpccpp - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;cc"
# Begin Source File
SOURCE=..\src\cpp\base64.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\client.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\client_simple.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\curl.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\env_wrap.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\fault.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\girerr.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\girmem.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\libwww.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\outcome.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\packetsocket.cpp
# PROP Exclude_From_Build 1
# End Source File
# Begin Source File
SOURCE=..\src\cpp\param_list.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\pstream.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\registry.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\server_abyss.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\server_pstream.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\value.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\wininet.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\xml.cpp
# End Source File
# Begin Source File
SOURCE=..\src\cpp\XmlRpcCpp.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\src\cpp\env_wrap.hpp
# End Source File
# End Group
# End Target
# End Project

View File

@ -0,0 +1,138 @@
# Microsoft Developer Studio Project File - Name="xmltok" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=xmltok - Win32 Release
!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 "xmltok.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 "xmltok.mak" CFG="xmltok - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "xmltok - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "xmltok - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "xmltok - 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\xmltok"
# PROP Intermediate_Dir "Release\xmltok"
# PROP Target_Dir "."
MTL=midl.exe
LINK32=link.exe -lib
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I ".." /D "NDEBUG" /D "XML_NS" /D "WIN32" /D "_WINDOWS" /D "XML_DTD" /D "_MBCS" /D "_LIB" /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\xmltok.lib"
!ELSEIF "$(CFG)" == "xmltok - 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\xmltok"
# PROP Intermediate_Dir "Debug\xmltok"
# PROP Target_Dir "."
MTL=midl.exe
LINK32=link.exe -lib
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I ".." /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "XML_DTD" /D "XML_NS" /D "_MBCS" /D "_LIB" /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\xmltokD.lib"
!ENDIF
# Begin Target
# Name "xmltok - Win32 Release"
# Name "xmltok - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
# Begin Source File
SOURCE=..\lib\expat\xmltok\xmlrole.c
# End Source File
# Begin Source File
SOURCE=..\lib\expat\xmltok\xmltok.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=..\lib\expat\xmltok\asciitab.h
# End Source File
# Begin Source File
SOURCE=..\lib\expat\xmltok\iasciitab.h
# End Source File
# Begin Source File
SOURCE=..\lib\expat\xmltok\latin1tab.h
# End Source File
# Begin Source File
SOURCE=..\lib\expat\xmltok\nametab.h
# End Source File
# Begin Source File
SOURCE=..\lib\expat\xmltok\utf8tab.h
# End Source File
# Begin Source File
SOURCE=..\lib\expat\xmltok\xmldef.h
# End Source File
# Begin Source File
SOURCE=..\lib\expat\xmltok\xmlrole.h
# End Source File
# Begin Source File
SOURCE=..\lib\expat\xmltok\xmltok.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

611
libs/xmlrpc-c/common.mk Normal file
View File

@ -0,0 +1,611 @@
# 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.
# BLDDIR: Name of directory which is the top of the Xmlrpc-c build tree.
include $(SRCDIR)/Makefile.version
# .DELETE_ON_ERROR is a special predefined Make target that says to delete
# the target if a command in the rule for it fails. That's important,
# because we don't want a half-made target sitting around looking like it's
# fully made.
.DELETE_ON_ERROR:
GCC_WARNINGS = -Wall -Wundef -Wimplicit -W -Winline -Wundef
# 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
# The NDEBUG macro says not to build code that assumes there are no bugs.
# This makes the code go faster. The main thing it does is tell the C library
# to make assert() a no-op as opposed to generating code to check the
# assertion and crash the program if it isn't really true. You can add
# -UNDEBUG (in any of various ways) to override this.
#
CFLAGS_COMMON = -DNDEBUG
CXXFLAGS_COMMON = -DNDEBUG
ifeq ($(C_COMPILER_GNU),yes)
CFLAGS_COMMON += $(GCC_C_WARNINGS) -fno-common -g -O3
endif
ifeq ($(CXX_COMPILER_GNU),yes)
CXXFLAGS_COMMON += $(GCC_CXX_WARNINGS) -g
endif
DISTDIR = $(BLDDIR)/$(PACKAGE)-$(VERSION)/$(SUBDIR)
# MIN is the minor version number for shared libraries.
# MAJ is the major version number, but is set separately by
# individual make files so that the major number of one library can change
# from one release to another while the major number of another does not.
MIN = $(XMLRPC_MINOR_RELEASE)
# CURDIR was introduced in GNU Make 3.77.
ifeq ($(CURDIR)x,x)
CURDIR := $(shell /bin/pwd)
endif
##############################################################################
# STATIC LINK LIBRARY RULES #
##############################################################################
# To use this rule, the including make file must set a target_specific
# variable LIBOBJECTS (and declare dependencies that include LIBOBJECTS).
# Example:
# FOO_OBJECTS = foo1.o foo2.o
# libfoo.a: LIBOBJECTS = $(FOO_OBJECTS)
# libfoo.a: $(FOO_OBJECTS)
# TARGET_LIBRARY_NAMES = libfoo
TARGET_STATIC_LIBRARIES = \
$(TARGET_LIBRARY_NAMES:%=%.a) $(TARGET_LIB_NAMES_PP:%=%.a)
$(TARGET_STATIC_LIBRARIES):
-rm -f $@
$(AR) cru $@ $(LIBOBJECTS)
$(RANLIB) $@
##############################################################################
# SHARED LIBRARY RULES, VARIABLES #
##############################################################################
ifeq ($(SHARED_LIB_TYPE),unix)
include $(SRCDIR)/unix-common.make
endif
ifeq ($(SHARED_LIB_TYPE),irix)
include $(SRCDIR)/irix-common.make
endif
ifeq ($(SHARED_LIB_TYPE),dll)
include $(SRCDIR)/dll-common.make
endif
ifeq ($(SHARED_LIB_TYPE),dylib)
include $(SRCDIR)/dylib-common.make
endif
ifeq ($(SHARED_LIB_TYPE),NONE)
install-shared-libraries:
endif
# To use this rule, the including make file must set a target-specific
# variable LIBOBJECTS (and declare dependencies that include LIBOBJECTS).
# Analogous to static library rule above.
# Optionally, including make file can set LIBDEP (probably
# target-specific) to the -L and -l options necessary to declare the
# libraries the target uses at run time. (This information gets built
# into the shared library so that the runtime library loader will load
# the specified libraries when asked to load the target library).
ifeq ($(MUST_BUILD_SHLIB),Y)
TARGET_SHARED_LIBRARIES = $(call shlibfn, $(TARGET_LIBRARY_NAMES))
TARGET_SHARED_LIBS_PP = $(call shlibfn, $(TARGET_LIB_NAMES_PP))
ifeq ($(MUST_BUILD_SHLIBLE),Y)
TARGET_SHARED_LE_LIBS = \
$(call shliblefn, $(TARGET_LIBRARY_NAMES) $(TARGET_LIB_NAMES_PP))
else
TARGET_SHARED_LE_LIBS =
endif
else
TARGET_SHARED_LIBRARIES =
TARGET_SHARED_LIBS_PP =
TARGET_SHARED_LE_LIBS =
endif
#------ the actual rules ----------------------------------------------------
$(TARGET_SHARED_LIBRARIES) dummyshlib:
$(CCLD) $(LDFLAGS_SHLIB) $(LIBDEP) -o $@ $(LIBOBJECTS) $(LADD)
$(TARGET_SHARED_LIBS_PP) dummyshlibpp:
$(CXXLD) $(LDFLAGS_SHLIB) $(LIBDEP) -o $@ $(LIBOBJECTS) $(LADD)
#----------------------------------------------------------------------------
LIBXMLRPC_UTIL_DIR = $(BLDDIR)/lib/libutil
ifneq ($(OMIT_LIBXMLRPC_UTIL_RULE),Y)
LIBXMLRPC_UTIL = \
$(call shliblefn, $(LIBXMLRPC_UTIL_DIR)/libxmlrpc_util)
LIBXMLRPC_UTIL_A = $(LIBXMLRPC_UTIL_DIR)/libxmlrpc_util.a
endif
ifneq ($(OMIT_XMLRPC_LIB_RULE),Y)
LIBXMLRPC = \
$(call shliblefn, $(BLDDIR)/src/libxmlrpc)
LIBXMLRPC_CLIENT = \
$(call shliblefn, $(BLDDIR)/src/libxmlrpc_client)
LIBXMLRPC_SERVER = \
$(call shliblefn, $(BLDDIR)/src/libxmlrpc_server)
LIBXMLRPC_SERVER_ABYSS = \
$(call shliblefn, $(BLDDIR)/src/libxmlrpc_server_abyss)
LIBXMLRPC_SERVER_CGI = \
$(call shliblefn, $(BLDDIR)/src/libxmlrpc_server_cgi)
LIBXMLRPC_A = $(BLDDIR)/src/libxmlrpc.a
LIBXMLRPC_CLIENT_A = $(BLDDIR)/src/libxmlrpc_client.a
LIBXMLRPC_SERVER_A = $(BLDDIR)/src/libxmlrpc_server.a
LIBXMLRPC_SERVER_ABYSS_A = $(BLDDIR)/src/libxmlrpc_server_abyss.a
LIBXMLRPC_SERVER_CGI_A = $(BLDDIR)/src/libxmlrpc_server_cgi.a
endif
LIBXMLRPC_XMLTOK_DIR = $(BLDDIR)/lib/expat/xmltok
ifneq ($(OMIT_XMLTOK_LIB_RULE),Y)
LIBXMLRPC_XMLTOK = \
$(call shliblefn, $(LIBXMLRPC_XMLTOK_DIR)/libxmlrpc_xmltok)
LIBXMLRPC_XMLTOK_A = $(LIBXMLRPC_XMLTOK_DIR)/libxmlrpc_xmltok.a
endif
LIBXMLRPC_XMLPARSE_DIR = $(BLDDIR)/lib/expat/xmlparse
ifneq ($(OMIT_XMLPARSE_LIB_RULE),Y)
LIBXMLRPC_XMLPARSE = \
$(call shliblefn, $(LIBXMLRPC_XMLPARSE_DIR)/libxmlrpc_xmlparse)
LIBXMLRPC_XMLPARSE_A = $(LIBXMLRPC_XMLPARSE_DIR)/libxmlrpc_xmlparse.a
endif
LIBXMLRPC_ABYSS_DIR = $(BLDDIR)/lib/abyss/src
ifneq ($(OMIT_ABYSS_LIB_RULE),Y)
LIBXMLRPC_ABYSS = \
$(call shliblefn, $(LIBXMLRPC_ABYSS_DIR)/libxmlrpc_abyss)
LIBXMLRPC_ABYSS_A = $(LIBXMLRPC_ABYSS_DIR)/libxmlrpc_abyss.a
endif
ifneq ($(OMIT_CPP_LIB_RULES),Y)
LIBXMLRPC_CPP = \
$(call shliblefn, $(BLDDIR)/src/cpp/libxmlrpc_cpp)
LIBXMLRPC_CPP_A = $(BLDDIR)/src/cpp/libxmlrpc_cpp.a
LIBXMLRPCPP = \
$(call shliblefn, $(BLDDIR)/src/cpp/libxmlrpc++)
LIBXMLRPCPP_A = $(BLDDIR)/src/cpp/libxmlrpc++.a
LIBXMLRPC_PACKETSOCKET = \
$(call shliblefn, $(BLDDIR)/src/cpp/libxmlrpc_packetsocket)
LIBXMLRPC_PACKETSOCKET_A = $(BLDDIR)/src/cpp/libxmlrpc_packetsocket.a
LIBXMLRPC_CLIENTPP = \
$(call shliblefn, $(BLDDIR)/src/cpp/libxmlrpc_client++)
LIBXMLRPC_CLIENTPP_A = $(BLDDIR)/src/cpp/libxmlrpc_client++.a
LIBXMLRPC_SERVERPP = \
$(call shliblefn, $(BLDDIR)/src/cpp/libxmlrpc_server++)
LIBXMLRPC_SERVERPP_A = $(BLDDIR)/src/cpp/libxmlrpc_server++.a
LIBXMLRPC_SERVER_ABYSSPP = \
$(call shliblefn, $(BLDDIR)/src/cpp/libxmlrpc_server_abyss++)
LIBXMLRPC_SERVER_ABYSSPP_A = $(BLDDIR)/src/cpp/libxmlrpc_server_abyss++.a
LIBXMLRPC_SERVER_PSTREAMPP = \
$(call shliblefn, $(BLDDIR)/src/cpp/libxmlrpc_server_pstream++)
LIBXMLRPC_SERVER_PSTREAMPP_A = $(BLDDIR)/src/cpp/libxmlrpc_server_pstream++.a
endif
# LIBXMLRPC_XML is the list of Xmlrpc-c libraries we need to parse
# XML. If we're using an external library to parse XML, this is null.
# LDLIBS_XML is the corresponding -L/-l options
ifneq ($(ENABLE_LIBXML2_BACKEND),yes)
# We're using the internal Expat XML parser
LIBXMLRPC_XML = $(LIBXMLRPC_XMLPARSE) $(LIBXMLRPC_XMLTOK)
LDLIBS_XML = \
-L$(BLDDIR)/lib/expat/xmlparse -lxmlrpc_xmlparse \
-L$(BLDDIR)/lib/expat/xmltok -lxmlrpc_xmltok
else
LDLIBS_XML = $(shell xml2-config --libs)
endif
##############################################################################
# RULES TO BUILD OBJECT FILES TO LINK INTO LIBRARIES #
##############################################################################
# The including make file sets TARGET_MODS to a list of all modules that
# might go into a library. Its a list of the bare module names. The
# including make file also sets INCLUDES, in a target-dependent manner,
# to the string of -I options needed for each target. Example:
# TARGET_MODS = foo bar
#
# foo.o foo.osh: INCLUDES = -Iinclude -I/usr/include/foostuff
# bar.o bar.osh: INCLUDES = -Iinclude -I/usr/include/barstuff
#
# include Makefile.common
#
# The above generates rules to build foo.o, bar.o, foo.osh, and bar.osh
#
# For C++ source files, use TARGET_MODS_PP instead.
# CFLAGS and CXXFLAGS are designed to be overridden on the make command
# line. We pile all the options except -I into these variables so the
# user can override them all if he wants.
$(TARGET_MODS:%=%.o):%.o:%.c
$(CC) -c -o $@ $(INCLUDES) $(CFLAGS) $<
$(TARGET_MODS:%=%.osh): CFLAGS_COMMON += $(CFLAGS_SHLIB)
$(TARGET_MODS:%=%.osh):%.osh:%.c
$(CC) -c -o $@ $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $<
$(TARGET_MODS_PP:%=%.o):%.o:%.cpp
$(CXX) -c -o $@ $(INCLUDES) $(CXXFLAGS) $<
$(TARGET_MODS_PP:%=%.osh): CXXFLAGS_COMMON += $(CFLAGS_SHLIB)
$(TARGET_MODS_PP:%=%.osh):%.osh:%.cpp
$(CXX) -c -o $@ $(INCLUDES) $(CXXFLAGS) $<
##############################################################################
# MISC BUILD RULES #
##############################################################################
# We use the srcdir symbolic link simply to make the make
# rules easier to read in the make output. We could use the $(SRCDIR)
# variable, but that makes the compile and link commands
# a mile long. Note that Make sometime figures that a directory which
# is a dependency is newer than the symbolic link pointing to it and wants
# to rebuild the symbolic link. So we don't make $(SRCDIR) a
# dependency of 'srcdir'.
# We should do the same for 'blddir'. We did once before, then undid
# it in an erroneous effort to enable parallel make. It's a little harder
# with blddir; when we did it before, we had to use the non-symlink
# version in a few places.
srcdir:
$(LN_S) $(SRCDIR) $@
blddir:
$(LN_S) $(BLDDIR) $@
##############################################################################
# RECURSIVE SUBDIRECTORY BUILD RULES #
##############################################################################
.PHONY: $(SUBDIRS:%=%/all)
$(SUBDIRS:%=%/all): %/all: $(CURDIR)/%
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
$(notdir $@)
.PHONY: $(SUBDIRS:%=%/install)
$(SUBDIRS:%=%/install): %/install: $(CURDIR)/%
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
$(notdir $@)
.PHONY: $(SUBDIRS:%=%/clean)
$(SUBDIRS:%=%/clean): %/clean: $(CURDIR)/%
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
$(notdir $@)
.PHONY: $(SUBDIRS:%=%/distclean)
$(SUBDIRS:%=%/distclean): %/distclean: $(CURDIR)/%
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
$(notdir $@)
.PHONY: $(SUBDIRS:%=%/check)
$(SUBDIRS:%=%/check): %/check: $(CURDIR)/%
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
$(notdir $@)
.PHONY: $(SUBDIRS:%=%/distdir)
$(SUBDIRS:%=%/distdir): %/distdir: $(CURDIR)/%
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
$(notdir $@)
.PHONY: $(SUBDIRS:%=%/dep)
$(SUBDIRS:%=%/dep): %/dep: $(CURDIR)/%
$(MAKE) -C $(dir $@) -f $(SRCDIR)/$(SUBDIR)/$(dir $@)Makefile \
$(notdir $@)
##############################################################################
# CROSS-COMPONENT BUILD RULES #
##############################################################################
ifneq ($(OMIT_WININET_TRANSPORT_RULE),Y)
$(BLDDIR)/lib/wininet_transport/xmlrpc_wininet_transport.o \
$(BLDDIR)/lib/wininet_transport/xmlrpc_wininet_transport.osh \
: FORCE
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/wininet_transport/Makefile \
$(notdir $@)
endif
ifneq ($(OMIT_CURL_TRANSPORT_RULE),Y)
$(BLDDIR)/lib/curl_transport/xmlrpc_curl_transport.o \
$(BLDDIR)/lib/curl_transport/xmlrpc_curl_transport.osh \
: FORCE
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/curl_transport/Makefile \
$(notdir $@)
endif
ifneq ($(OMIT_LIBWWW_TRANSPORT_RULE),Y)
$(BLDDIR)/lib/libwww_transport/xmlrpc_libwww_transport.o \
$(BLDDIR)/lib/libwww_transport/xmlrpc_libwww_transport.osh \
: FORCE
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/libwww_transport/Makefile \
$(notdir $@)
endif
$(LIBXMLRPC) \
$(LIBXMLRPC_CLIENT) \
$(LIBXMLRPC_SERVER) \
$(LIBXMLRPC_SERVER_ABYSS) \
$(LIBXMLRPC_SERVER_CGI) \
$(LIBXMLRPC_A) \
$(LIBXMLRPC_CLIENT_A) \
$(LIBXMLRPC_SERVER_A) \
$(LIBXMLRPC_SERVER_ABYSS_A) \
$(LIBXMLRPC_SERVER_CGI_A): FORCE
$(MAKE) -C $(dir $@) -f $(SRCDIR)/src/Makefile \
$(notdir $@)
$(LIBXMLRPC_UTIL) $(LIBXMLRPC_UTIL_A) : FORCE
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/libutil/Makefile \
$(notdir $@)
$(LIBXMLRPC_XMLPARSE) $(LIBXMLRPC_XMLPARSE_A) : FORCE
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/expat/xmlparse/Makefile \
$(notdir $@)
$(LIBXMLRPC_XMLTOK) $(LIBXMLRPC_XMLTOK_A) : FORCE
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/expat/xmltok/Makefile \
$(notdir $@)
$(LIBXMLRPC_ABYSS) $(LIBXMLRPC_ABYSS_A): FORCE
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/abyss/src/Makefile \
$(notdir $@)
$(LIBXMLRPCPP) $(LIBXMLRPCPP_A) \
$(LIBXMLRPC_PACKETSOCKET) $(LIBXMLRPC_PACKETSOCKET_A) \
$(LIBXMLRPC_CLIENTPP) $(LIBXMLRPC_CLIENTPP_A) \
$(LIBXMLRPC_SERVERPP) $(LIBXMLRPC_SERVERPP_A) \
$(LIBXMLRPC_SERVER_ABYSSPP) $(LIBXMLRPC_SERVER_ABYSSPP_A) \
$(LIBXMLRPC_SERVER_PSTREAMPP) $(LIBXMLRPC_SERVER_PSTREAMPP_A) \
$(LIBXMLRPC_CPP) $(LIBXMLRPC_CPP_A) : FORCE
$(MAKE) -C $(dir $@) -f $(SRCDIR)/src/cpp/Makefile \
$(notdir $@)
# For the following utilities, we don't bother with a library -- we
# just explicitly link the object file we need. This is to save
# complexity. If the list gets too big, we may need a library just to
# keep link commands short.
UTIL_DIR = $(BLDDIR)/lib/util
UTILS = \
casprintf.o \
cmdline_parser.o \
cmdline_parser_cpp.o \
getoptx.o \
stripcaseeq.o \
string_parser.o \
ifneq ($(OMIT_UTILS_RULE),Y)
$(UTILS:%=$(UTIL_DIR)/%): FORCE
$(MAKE) -C $(dir $@) -f $(SRCDIR)/lib/util/Makefile \
$(notdir $@)
endif
CASPRINTF = $(UTIL_DIR)/casprintf.o
# About version.h: This is a built header file, which means it is a supreme
# pain in the ass. The biggest problem is that when we automatically make
# dependencies (Makefile.depend), it doesn't exist yet. This means Gcc
# generates a dependency on it being in the local directory. Therefore,
# we generate it in the local directory, as a symbolic link, wherever it
# is needed. But the original is always in the top level directory,
# generated by a rule in that directory's make file. Problem 2 is that
# the top directory's make file includes Makefile.common, so the rules
# below conflict with it. That's what OMIT_VERSION_H is for.
ifneq ($(OMIT_VERSION_H),Y)
$(BLDDIR)/version.h:
$(MAKE) -C $(dir $@) -f $(SRCDIR)/GNUmakefile $(notdir $@)
version.h: $(BLDDIR)/version.h
$(LN_S) $< $@
endif
ifneq ($(OMIT_CONFIG_H_RULE),Y)
$(BLDDIR)/include/xmlrpc-c/config.h:
$(MAKE) -C $(BLDDIR)/include -f $(SRCDIR)/include/Makefile \
xmlrpc-c/config.h
endif
ifneq ($(OMIT_TRANSPORT_CONFIG_H),Y)
$(BLDDIR)/transport_config.h:
$(MAKE) -C $(dir $@) -f $(SRCDIR)/GNUmakefile $(notdir $@)
endif
ifneq ($(OMIT_XMLRPC_C_CONFIG_TEST),Y)
$(BLDDIR)/xmlrpc-c-config.test:
$(MAKE) -C $(dir $@) -f $(SRCDIR)/GNUmakefile $(notdir $@)
endif
$(TARGET_MODS:%=%.o) $(TARGET_MODS:%=%.osh): \
$(BLDDIR)/include/xmlrpc-c/config.h
# With a separate build directory, you have to make the directory itself
# before you can make anything in it. Here's the rule to do that.
$(SUBDIRS:%=$(CURDIR)/%):
mkdir $@
##############################################################################
# INSTALL RULES #
# (except shared libraries) #
##############################################################################
MKINSTALLDIRS = $(SHELL) $(SRCDIR)/mkinstalldirs
.PHONY: install-common install-ltlibraries install-headers install-bin
install-common: \
install-ltlibraries install-static-libraries install-shared-libraries \
install-headers install-bin
INSTALL_LIB_CMD = $(INSTALL_DATA) $$p $(DESTDIR)$(LIBINST_DIR)/$$p
RANLIB_CMD = $(RANLIB) $(DESTDIR)$(LIBINST_DIR)/$$p
install-static-libraries: $(STATIC_LIBRARIES_TO_INSTALL)
$(MKINSTALLDIRS) $(DESTDIR)$(LIBINST_DIR)
@list='$(STATIC_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='$(STATIC_LIBRARIES_TO_INSTALL)'; for p in $$list; do \
if test -f $$p; then \
echo " $(RANLIB_CMD)"; \
$(RANLIB_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)/$(SUBDIR)/"; fi; \
echo " $(INSTALL_HDR_CMD)"; \
$(INSTALL_HDR_CMD); \
done
INSTALL_PROGRAM_CMD = $(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) $@
##############################################################################
# MISCELLANEOUS RULES #
##############################################################################
.PHONY: clean-common
clean-common:
rm -f *.o *.osh *.a *.s *.i *.la *.lo
rm -f *.$(SHLIB_SUFFIX) *.$(SHLIB_SUFFIX).*
rm -rf .libs
ifneq ($(OMIT_VERSION_H),Y)
rm -f version.h
endif
.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 obliterate Makefile.depend here. The build will automatically
# create an empty Makefile.depend when it is needed for the user. The
# developer must do 'make dep' if he wants to edit and rebuild.
#
# Other projects have the build automatically build a true
# Makefile.depend, suitable for a developer. 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.
#
rm -f Makefile.depend
rm -f srcdir blddir
.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
DEP_SOURCES = $(wildcard *.c *.cpp)
# This is a filter to turn "foo.o:" rules into "foo.o foo.lo foo.osh:"
# to make dependencies for all the various forms of object file out of
# a file made by a depedency generator that knows only about .o.
DEPEND_MASSAGER = perl -walnpe's{^(.*)\.o:}{$$1.o $$1.lo $$1.osh:}'
.PHONY: dep-common
dep-common: FORCE
ifneq ($(DEP_SOURCES)x,x)
-$(CC) -MM -MG -I. $(INCLUDES) $(DEP_SOURCES) | \
$(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:

336
libs/xmlrpc-c/config.mk.in Normal file
View File

@ -0,0 +1,336 @@
# config.mk is generated by 'configure' using config.mk.in
# as a template and information that 'configure' gathers from the build
# system and from user options.
# config.mk should someday replace most of the other files that
# 'configure' generates, thus simplifying development and customization.
# config.mk 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. config.mk
# 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@
MUST_BUILD_WININET_CLIENT = @MUST_BUILD_WININET_CLIENT@
MUST_BUILD_CURL_CLIENT = @MUST_BUILD_CURL_CLIENT@
MUST_BUILD_LIBWWW_CLIENT = @MUST_BUILD_LIBWWW_CLIENT@
LSOCKET = @LSOCKET@
WININET_LDADD = @WININET_LDADD@
WININET_RPATH = @WININET_RPATH@
WININET_WL_RPATH = @WININET_WL_RPATH@
CURL_LDADD = @CURL_LDADD@
CURL_RPATH = @CURL_RPATH@
CURL_WL_RPATH = @CURL_WL_RPATH@
LIBWWW_LDADD = @LIBWWW_LDADD@
LIBWWW_RPATH = @LIBWWW_RPATH@
LIBWWW_WL_RPATH = @LIBWWW_WL_RPATH@
FEATURE_LIST = @FEATURE_LIST@
ABS_SRCDIR = @abs_srcdir@
PREFIX = @prefix@
HAVE_WCHAR_H_DEFINE = @HAVE_WCHAR_H_DEFINE@
# 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 = $(SRCDIR)/install-sh
C_COMPILER_GNU = @C_COMPILER_GNU@
CXX_COMPILER_GNU = @CXX_COMPILER_GNU@
# Stuff 'configure' figured out via AC_CANONICAL_HOST macro in configure.in
# and config.guess program and 'configure' command options:
# HOST_OS names the operating system on which Xmlrpc-c is to run.
# E.g. "linux-gnu".
HOST_OS = @host_os@
###############################################################################
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
##############################################################################
# SHARED LIBRARY STUFF
##############################################################################
# Shared libraries are very difficult, because how you build and use
# them varies greatly from one platform to the next.
# First, we break down shared library schemes into a few major types,
# and indicate the type by SHARED_LIB_TYPE.
# We also have a bunch of other make variables that reflect the different
# ways we have to build on and for different platforms:
# CFLAGS_SHLIB is a set of flags needed to compile a module which will
# become part of a shared library.
# On older systems, you have to make shared libraries out of position
# independent code, so you need -fpic or -fPIC here. (The rule is: if
# -fpic works, use it. If it bombs, go to -fPIC). On newer systems,
# it isn't necessary, but can save real memory at the expense of
# execution speed. Without position independent code, the library
# loader may have to patch addresses into the executable text. On an
# older system, this would cause a program crash because the loader
# would be writing into read-only shared memory. But on newer
# systems, the system silently creates a private mapping of the page
# or segment being modified (the "copy on write" phenomenon). So it
# needs its own private real page frame.
# We have seen -fPIC required on IA64 and AMD64 machines (GNU
# compiler/linker). Build-time linking fails without it. I don't
# know why -- history seems to be repeating itself. 2005.02.23.
# SHLIB_CLIB is the link option to include the C library in a shared library,
# normally "-lc". On typical systems, this serves no purpose. On some,
# though, it causes information about which C library to use to be recorded
# in the shared library and thus choose the correct library among several or
# avoid using an incompatible one. But on some systems, the link fails.
# On 2002.09.30, "John H. DuBois III" <spcecdt@armory.com> reports that on
# SCO OpenServer, he gets the following error message with -lc:
#
# -lc; relocations referenced ; from file(s) /usr/ccs/lib/libc.so(random.o);
# fatal error: relocations remain against allocatable but non-writable
# section: ; .text
#
# On Bryan's system, with gcc 2.95.3 and glibc 2.2.2, -lc causes
# throws (from anywhere in a program that links the shared library)
# not to work. I have no idea how.
# LDFLAGS_SHLIB is the linker (Ld) flags needed to generate a shared
# library from object files. It may use $(SONAME) as the soname for
# the shared library being created (assuming sonames exist).
#
# This make file defines these functions that the including make file
# can use:
#
# $(call shlibfn, LIBNAMELIST): file names of shared libraries
# whose base names are LIBNAMELIST. E.g. if LIBNAMELIST is
# "libfoo libbar", function returns "libfoo.so.3.1 libbar.so.3.1"
#
# $(call shliblefn, LIBNAMELIST): same as shlibfn, but for the file you
# use at link-edit time. E.g. libfoo.so .
# NEED_RPATH says on this platform, when you link-edit an executable you
# need to have -R linker options to tell where to look, at run time,
# for the shared libraries that the program uses. The linker puts that
# information into the executable.
# NEED_WL_RPATH is like NEED_RPATH, but it's a compiler option for when
# you have the compiler call the linker. So E.g. "-Wl,-rpath,/my/runtime",
# which tells the compiler to pass the option "-rpath /my/runtime" to
# the linker.
# Defaults:
NEED_WL_RPATH=no
NEED_RPATH=no
# We build shared libraries only for platforms for which we've figured
# out how. For the rest, we have this default:
SHARED_LIB_TYPE = NONE
MUST_BUILD_SHLIB = N
MUST_BUILD_SHLIBLE = N
shlibfn = $(1:%=%.shlibdummy)
shliblefn = $(1:%=%.shlibledummy)
ifeq ($(HOST_OS),linux-gnu)
# Assume linker is GNU Compiler (gcc)
SHARED_LIB_TYPE = unix
MUST_BUILD_SHLIB = Y
MUST_BUILD_SHLIBLE = Y
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
# SHLIB_CLIB = -lc
LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
CFLAGS_SHLIB=-fPIC
endif
ifeq ($(findstring solaris,$(HOST_OS)),solaris)
SHARED_LIB_TYPE = unix
MUST_BUILD_SHLIB = Y
MUST_BUILD_SHLIBLE = Y
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
# Solaris compiler (Sun C 5.5) can't take multiple ld options as
# -Wl,-a,-b . Ld sees -a,-b in that case.
LDFLAGS_SHLIB = -Wl,-Bdynamic -Wl,-G -Wl,-h -Wl,$(SONAME)
CFLAGS_SHLIB = -Kpic
endif
ifeq ($(HOST_OS),aix)
SHARED_LIB_TYPE = unix
MUST_BUILD_SHLIB = Y
MUST_BUILD_SHLIBLE = Y
SHLIB_SUFFIX = a
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
LDFLAGS_SHLIB = -qmkshrobj
endif
ifeq ($(HOST_OS),hpux)
SHARED_LIB_TYPE = unix
MUST_BUILD_SHLIB = Y
MUST_BUILD_SHLIBLE = Y
SHLIB_SUFFIX = sl
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
LDFLAGS_SHLIB: -shared -fPIC
endif
ifeq ($(HOST_OS),osf)
SHARED_LIB_TYPE = unix
MUST_BUILD_SHLIB = Y
MUST_BUILD_SHLIBLE = Y
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
LDFLAGS_SHLIB = -shared -expect_unresolved
endif
ifeq ($(findstring netbsd,$(HOST_OS)),netbsd)
SHARED_LIB_TYPE = unix
SHLIB_SUFFIX = so
MUST_BUILD_SHLIB = Y
MUST_BUILD_SHLIBLE = Y
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
CFLAGS_SHLIB = -fpic
LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
NEED_WL_RPATH=yes
endif
ifeq ($(HOST_OS),dragonfly)
SHARED_LIB_TYPE = unix
MUST_BUILD_SHLIB = Y
MUST_BUILD_SHLIBLE = Y
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
CFLAGS_SHLIB = -fpic
LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
endif
ifeq ($(HOST_OS),beos)
SHARED_LIB_TYPE = unix
MUST_BUILD_SHLIB = Y
MUST_BUILD_SHLIBLE = Y
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
LDFLAGS_SHLIB = -nostart
endif
ifeq ($(patsubst darwin%, darwin, $(HOST_OS)), darwin)
# (I once saw a system that generated 'darwin8.10.1').
SHARED_LIB_TYPE = dylib
MUST_BUILD_SHLIB = Y
MUST_BUILD_SHLIBLE = Y
SHLIB_SUFFIX = dylib
shlibfn = $(1:%=%.$(MAJ).$(MIN).$(SHLIB_SUFFIX))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
endif
ifeq ($(HOST_OS),irix)
SHARED_LIB_TYPE = irix
MUST_BUILD_SHLIB = Y
MUST_BUILD_SHLIBLE = Y
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
VERSIONPERLPROG = \
print "sgi$(MAJ)." . join(":sgi$(MAJ) . ", (0..$(MIN))) . "\n"
LDFLAGS_SHLIB = -shared -n32 -soname $(SONAME) \
-set_version $(shell perl -e '$(VERSIONPERLPROG)') -lc
endif
ifeq ($(HOST_OS),cygwin)
SHARED_LIB_TYPE = dll
MUST_BUILD_SHLIB = Y
MUST_BUILD_SHLIBLE = N
SHLIB_SUFFIX = dll
shlibfn = $(1:lib%=$(SHLIB_PREFIX)%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.shlibledummy)
LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
endif
##############################################################################
# MISCELLANEOUS
##############################################################################
# BUILDTOOL_CC is the compiler to use to generate build tools, which we
# will then run to build product. The typical reason this would be
# different from CC is that you're cross-compiling: the product will run
# in Environment A, but you're building in Environment B, so you must
# build the build toos for Environment B.
# The cross compiling user can update Makefile.config or override
# BUILDTOOL_CC on a make command.
BUILDTOOL_CC = $(CC)
BUILDTOOL_CCLD = $(CCLD)
# Here are the commands 'make install' uses to install various kinds of files:
INSTALL_PROGRAM = $(INSTALL) -c -m 755
INSTALL_SHLIB = $(INSTALL) -c -m 755
INSTALL_DATA = $(INSTALL) -c -m 644
INSTALL_SCRIPT = $(INSTALL) -c -m 755
# Here are the locations at which 'make install' puts files:
# PREFIX is designed to be overridden at make time if the user decides
# he doesn't like the default specified at 'configure' time.
LIBINST_DIR = $(PREFIX)/lib
HEADERINST_DIR = $(PREFIX)/include
PROGRAMINST_DIR = $(PREFIX)/bin
# DESTDIR is designed to be overridden at make time in order to relocate
# the entire install into a subdirectory.
DESTDIR =
# VPATH probably doesn't belong in this file, but it's a convenient
# place to set it once. VPATH is a special Make variable that tells
# Make where to look for dependencies. E.g. if a make file says bar.c
# is a dependency of bar.o and VPATH is ".:/usr/src/mypkg", Make will
# look for bar.c first in the current directory (.) (as it would with
# no VPATH), then in /usr/src/mypkg. The purpose of this is to allow
# you to build in a fresh build directory, while your source stays in
# the read-only directory /usr/src/mypkg .
VPATH := .:$(SRCDIR)/$(SUBDIR)

View File

@ -1,30 +1,21 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(include/xmlrpc-c/base.h)
AC_CONFIG_HEADERS(xmlrpc_amconfig.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 "x.xx" is supposed to be a version number, but is meaningless here.
dnl The real version number is in Makefile.version.
AM_INIT_AUTOMAKE(xmlrpc-c, x.xx)
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.
dnl Define @build@, @build_cpu@, @build_vendor@, @build_os,
dnl @host, @host_cpu@, @host_vender, and @host_os@ substitutions.
dnl "host" means the target system -- the one for which we are building.
dnl "build" means the system that will do the building.
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
@ -95,11 +86,6 @@ 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
@ -203,34 +189,6 @@ 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)
@ -240,8 +198,9 @@ dnl Checks for programs.
dnl =======================================================================
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
if test x"$enable_cplusplus" != xno; then
AC_PROG_CXX
fi
dnl =======================================================================
@ -255,6 +214,18 @@ dnl =======================================================================
# require too much testing.)
AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket))
# Above sets LIBS, which is not all that useful because we don't want
# to include every library in every link. It also sets
# ac_cv_lib_socket_socket, which we use to pass more specific information
# to the configuration files.
if test x"$ac_cv_lib_socket_socket" = xyes; then
LSOCKET=-lsocket
else
LSOCKET=
fi
AC_SUBST(LSOCKET)
# 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))
@ -266,13 +237,48 @@ dnl =======================================================================
AC_STDC_HEADERS
dnl We don't use AM_CONFIG_HEADER to define HAVE_WCHAR_H, etc. because
dnl the following is more straightforward and easier to understand,
dnl especially for a newcomer. Furthermore, AM_CONFIG_HEADER represents
dnl false as undefined, whereas our scheme represents it as 0. undefined
dnl is a poor choice because it often means just that you neglected to
dnl choose a value for some reason.
dnl defines ac_cv_header_wchar_h, etc:
AC_CHECK_HEADERS(wchar.h)
if test x"$ac_cv_header_wchar_h" = xyes; then
HAVE_WCHAR_H_DEFINE=1
else
HAVE_WCHAR_H_DEFINE=0
fi
AC_SUBST(HAVE_WCHAR_H_DEFINE)
# Needed by Abyss on Solaris:
AC_CHECK_HEADERS(sys/filio.h)
if test x"$ac_cv_header_sys_filio_h" = xyes; then
HAVE_SYS_FILIO_H_DEFINE=1
else
HAVE_SYS_FILIO_H_DEFINE=0
fi
AC_SUBST(HAVE_SYS_FILIO_H_DEFINE)
# Needed by Abyss on Solaris:
AC_CHECK_HEADERS(sys/ioctl.h)
if test x"$ac_cv_header_sys_ioctl_h" = xyes; then
HAVE_SYS_IOCTL_H_DEFINE=1
else
HAVE_SYS_IOCTL_H_DEFINE=0
fi
AC_SUBST(HAVE_SYS_IOCTL_H_DEFINE)
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.
@ -296,13 +302,12 @@ else
fi
AC_SUBST(VA_LIST_IS_ARRAY_DEFINE)
dnl See if the compiler supports __attribute__ gracefully.
AC_MSG_CHECKING(whether compiler supports __attribute__)
AC_MSG_CHECKING(whether compiler has __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
compiler_has_attribute=yes,
compiler_has_attribute=no)
AC_MSG_RESULT($compiler_has_attribute)
if test x"$compiler_has_attribute" = xyes; then
ATTR_UNUSED="__attribute__((__unused__))"
else
ATTR_UNUSED=
@ -318,13 +323,28 @@ AC_CHECK_FUNC(vsnprintf, , [
AC_MSG_ERROR(your C library does not provide vsnprintf)
])
dnl CygWin looks like Unix, but doesn't provide setgroups.
dnl Unicode function needed by test suites.
AC_CHECK_FUNCS(wcsncmp)
dnl CygWin doesn't provide setgroups.
AC_CHECK_FUNCS(setgroups)
AC_CHECK_FUNCS(asprintf)
AC_CHECK_FUNCS(setenv)
dnl uclib doesn't have pselect
AC_CHECK_FUNCS(pselect)
dnl Windows doesn't have gettimeofday, localtime_r, or gmtime_r
AC_CHECK_FUNCS(gettimeofday)
AC_CHECK_FUNCS(localtime_r)
AC_CHECK_FUNCS(gmtime_r)
dnl Windows doesn't have strcasecmp;
AC_CHECK_FUNCS(strcasecmp)
AC_CHECK_FUNCS(stricmp)
AC_CHECK_FUNCS(_stricmp)
dnl =======================================================================
dnl Checks for operating system features.
@ -339,8 +359,6 @@ 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,
@ -353,9 +371,7 @@ 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 =======================================================================
@ -435,7 +451,7 @@ 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 co-exist with the system copy of libwww. We have some vestigal function
dnl for keeping track of libwww's rpath, although this is no longer really
dnl necessary.
@ -540,7 +556,7 @@ if test $MUST_BUILD_CURL_CLIENT = yes; then
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?
dnl adjust the search path 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"
@ -581,40 +597,16 @@ AC_ARG_ENABLE(libxml2-backend,
enable_libxml2_backend=no)
AC_MSG_CHECKING(whether to build the libxml2 backend)
AC_MSG_RESULT($enable_libxml2_backend)
if test $enable_libxml2_backend = yes; then
AC_CHECK_PROG(have_xml2_config, xml2-config, yes, no)
if test $have_xml2_config = no; then
AC_MSG_ERROR([You specified --enable-libxml2_backend, but don't appear to have libxml2 installed (no working xml2-config in your command search path), so we cannot not build for libxml2])
fi
fi
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 =======================================================================
@ -634,57 +626,30 @@ BUILDDIR=`pwd`
AC_SUBST(BUILDDIR)
AC_DEFUN([AX_COMPILER_VENDOR],
[
AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
[ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
# note: don't check for gcc first since some other compilers define __GNUC__
for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
#if !($vencpp)
thisisanerror;
#endif
])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
done
])
])
AX_COMPILER_VENDOR
# Enable 64 bit build
AC_ARG_ENABLE(64,
[AC_HELP_STRING([--enable-64],[build with 64 bit support])],[enable_64="$enable_64"],[enable_64="no"])
if test "x${ax_cv_c_compiler_vendor}" = "xsun" ; then
if test "${enable_64}" = "yes"; then
COMPILER_CFLAGS=-m64
COMPILER_CXXFLAGS=-m64
fi
fi
AC_SUBST(COMPILER_CFLAGS)
AC_SUBST(COMPILER_CXXFLAGS)
dnl =======================================================================
dnl Libtool
dnl =======================================================================
AM_PROG_LIBTOOL
dnl =======================================================================
dnl Output our results.
dnl =======================================================================
AC_OUTPUT(xmlrpc-c-config \
xmlrpc-c-config.test \
Makefile.config \
dnl Note that AM_CONFIG_HEADER at the top of this file outputs another
dnl result: xmlrpc_amconfig.h .
AC_OUTPUT( \
Makefile.srcdir \
config.mk \
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
if test ! -f GNUmakefile; then
ln -s "${srcdir}/GNUmakefile" .
fi
if test ! -f Makefile; then
ln -s "${srcdir}/Makefile" .
fi
if test "$MUST_BUILD_WININET_CLIENT $MUST_BUILD_CURL_CLIENT $MUST_BUILD_LIBWWW_CLIENT" = "no no no"; then
AC_MSG_NOTICE([\n\n==>We are not building any client XML transport (see earlier messages explaining why), therefore WE WILL NOT BUILD THE CLIENT LIBRARY.])
fi

View File

@ -0,0 +1,22 @@
# -*-makefile-*- <-- an Emacs control
# See unix-common.make for an explanation of this file. This file is
# analogous to unix-common.make, but is for a Windows system
SONAME = $@
IMPLIB = $(@:%:%.dll.a)
SHLIB_CMD = $(CCLD) $(LDFLAGS_SHLIB) -o $@ $^ $(LADD)
.PHONY: $(SHLIB_INSTALL_TARGETS)
.PHONY: install-shared-libraries
SHLIB_INSTALL_TARGETS = $(SHARED_LIBS_TO_INSTALL:%=%/install)
#SHLIB_INSTALL_TARGETS is like "libfoo/install libbar/install"
install-shared-libraries: $(SHLIB_INSTALL_TARGETS)
$(SHLIB_INSTALL_TARGETS):lib%/install:$(SHLIB_PREFIX)%.$(SHLIB_SUFFIX).$(MAJ).$(MIN)
# $< is a library file name, e.g. cygfoo.so.3.1 .
$(INSTALL_SHLIB) $< $(DESTDIR)$(LIBINST_DIR)/$<

View File

@ -2,7 +2,7 @@ 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
Each source file 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

View File

@ -1,5 +1,5 @@
(There is a detailed release-by-release change history after the
following overview).
For a release-by-release change history, see
<http://xmlrpc-c.sourceforge.net/change.html>.
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
@ -22,7 +22,7 @@ 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
This dark age of Xmlrpc-c lasted until October 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.
@ -59,395 +59,3 @@ 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.

148
libs/xmlrpc-c/doc/INSTALL Normal file
View File

@ -0,0 +1,148 @@
These are instructions for building Xmlrpc-c from source and installing
it on a system.
See the README file for information on prerequisites (things you need to
have installed before you can build).
Essentially, it's just the conventional
$ ./configure
$ make
$ make install
To build handy tools such as the 'xmlrpc' command line XML-RPC client:
$ cd tools
$ make
$ make install
You can also do
$ make check
to run a battery of tests before you install. But note that it's as common
for the tests to fail because the tests are broken as because the product
is broken, so consider the results carefully.
To see it work, build and run a simple server like this:
$ cd examples
$ make
$ ./xmlrpc_sample_add_server 8080
That runs forever, serving clients as they arrive. Now, from another
shell, run a client that does an RPC to this server:
$ ./xmlrpc_sample_add_client
Also try other example 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.
SEPARATE BUILD TREE
-------------------
While it's traditional to build a Unix package by adding object files
to the same tree with the source files, it's actually much cleaner to
keep your source tree exactly as you got it and put the built files in
a separate directory, called the build tree.
To do this, just create an empty directory and run 'configure' in it,
then 'make':
mkdir xmlrpcbuild
cd xmlrpcbuild
/usr/src/xmlrpc-c/configure
...
make
But if you plan to work on Xmlrpc-c source code, you'll probably find
it more convenient to build the traditional way, with a single tree
for source and build.
In the source tree, you can type 'make' in any directory to do the
default make for that directory, or make FILENAME to make the file of
that name there. In the separate build tree, there are special
facilities to allow you to do a simple make from the _top level
directory_, but if you want to make a subcomponent or individual part,
you have to have a -f option and set SRCDIR and BLDDIR on your 'make'
command.
COMMON PROBLEMS
---------------
Improper -config files
----------------------
The most common problem building Xmlrpc-c is one of improperly installed
prerequisite libraries, namely Libwww and Curl. These libraries are
designed to be installed along with a -config program (libwww-config
and curl-config) that tells builders of dependent packages (such as
Xmlrpc-c) how to use them. When the -config program is wrong, you get
Xmlrpc-c build failures with messages about undefined references.
The exact nature of the problems with -config programs can be quite
involved, especially since there is no guarantee that a -config
program can do what's required of it in every situation. But I'll
explain the basic problem. For simplicity, I'll talk specifically
about Curl, but the principles apply to any library that has a -config
program.
The point of curl-config is to describe how Curl is installed on your
particular system. You have choices of where to install the various parts
and what prerequisites to build into them, and curl-config is how you
communicate those choices to the Xmlrpc-c make files.
Curl's builder automatically creates a curl-config program for you,
but you should not think of it as part of Curl. It's really a
configuration file -- something that tells how your particular system
is put together. The Curl builder is not smart enough to know exactly
what to put in curl-config; it just builds one that works for most
people. The local system administrator is actually responsible for
the contents of curl-config.
One rather complex way in which the curl-config that the Curl builder
builds can be wrong is that it often indicates that to link to the
Curl library, you need a "-L /usr/lib" option (or something like that
-- an option that adds to the linker's search path a directory that is
already in it). This is usually unnecessary because the directory is
already in the search path, and often breaks things because it puts
the directory too early in the search path. If your curl-config says to
link with -L /usr/lib, you should normally edit it to remove that.
As an example of how -L /usr/lib breaks things, here is a problem that
is often reported: The user has Xmlrpc-c installed on his system, but
wants to build a new one to replace it, or to use for a particular
project instead of the system version. But the build of the new
version fails with undefined references to symbol "xmlrpc_foo".
xmlrpc_foo is a new symbol - it was added to Xmlrpc-c in a recent
release. The version of Xmlrpc-c installed on the system is too old
to have it. The make file obviously specifies the path to the current
libraries that the user just built in the link library search order,
but the link is picking up the old system version instead. Why?
Because the link options say to search /usr/lib _before_ the local
build directory. And it does that because curl-config erroneously
says that you need a -L /usr/lib link option to find the Curl library.
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.

View File

@ -7,16 +7,8 @@ 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.
Put details in the manual for the xmlrpc-c/server_abyss.hpp interface:
libxmlrpc_server_abyss++.html.
Implement pluggable XML transports on the server side like on the
client side.
@ -24,9 +16,6 @@ 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.
@ -37,9 +26,8 @@ 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.
Expand the Perl interface to Xmlrpc-c libraries to do server functions.
Maybe match some other features of RPC::XML.
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
@ -49,12 +37,16 @@ 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.
Add a function to deregister a method from a method registry.
Add a "registry" type that works via a filesystem directory. There is
a .so file for each method with its code, and probably a configuration
file. Make it dynamically updatable.
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

View File

@ -0,0 +1,37 @@
# -*-makefile-*- <-- an Emacs control
# See unix-common.make for an explanation of this file. This file is
# analogous to unix-common.make, but is for an Irix system.
SONAME = $(@:%.$(MIN)=%)
SHLIB_CMD = $(CCLD) $(LDFLAGS_SHLIB) -o $@ $^ $(LADD)
SHLIBPP_CMD = $(CXXLD) $(LDFLAGS_SHLIB) -o $@ $^ $(LADD)
SHLIB_LE_TARGETS = $(call shliblefn, $(SHARED_LIBS_TO_BUILD))
$(SHLIB_LE_TARGETS):%.$(SHLIB_SUFFIX):%.$(MAJ).$(MIN).$(SHLIB_SUFFIX)
rm -f $@
$(LN_S) $< $@
.PHONY: $(SHLIB_INSTALL_TARGETS)
.PHONY: install-shared-libraries
SHLIB_INSTALL_TARGETS = $(SHARED_LIBS_TO_INSTALL:%=%/install)
#SHLIB_INSTALL_TARGETS is like "libfoo/install libbar/install"
install-shared-libraries: $(SHLIB_INSTALL_TARGETS)
$(SHLIB_INSTALL_TARGETS):%/install:%.$(MAJ).$(MIN).$(SHLIB_SUFFIX)
# $< is a library file name, e.g. libfoo.so.3.1 .
$(INSTALL_SHLIB) $< $(DESTDIR)$(LIBINST_DIR)/$<
cd $(DESTDIR)$(LIBINST_DIR); \
rm -f $(<:%.$(MIN).$(SHLIB_SUFFIX)=%.$(SHLIB_SUFFIX)); \
$(LN_S) $< $(<:%.$(MIN).$(SHLIB_SUFFIX)=%.$(SHLIB_SUFFIX))
cd $(DESTDIR)$(LIBINST_DIR); \
rm -f $(<:%.$(MAJ).$(MIN).$(SHLIB_SUFFIX)=%.$(SHLIB_SUFFIX)); \
$(LN_S) $(<:%.$(MIN).$(SHLIB_SUFFIX)=%.$(SHLIB_SUFFIX)) \
$(<:%.$(MAJ).$(MIN).$(SHLIB_SUFFIX)=%.$(SHLIB_SUFFIX))

View File

@ -5,34 +5,41 @@
# these programs depend.
ifeq ($(SRCDIR)x,x)
ifeq ($(SRCDIR),)
SRCDIR = $(CURDIR)/..
BUILDDIR = $(SRCDIR)
BLDDIR = $(SRCDIR)
endif
SUBDIR = examples
include $(BLDDIR)/config.mk
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
XMLRPC_C_CONFIG = $(BLDDIR)/xmlrpc-c-config.test
CLIENTPROGS = \
auth_client \
query-meerkat \
synch_client \
xmlrpc_sample_add_client \
xmlrpc_asynch_client \
ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
CLIENTPROGS += interrupted_client
endif
SERVERPROGS_CGI = \
xmlrpc_sample_add_server.cgi
SERVERPROGS_ABYSS = \
interrupted_server \
xmlrpc_inetd_server \
xmlrpc_socket_server \
xmlrpc_loop_server \
xmlrpc_sample_add_server \
xmlrpc_server_validatee \
@ -54,7 +61,7 @@ ifeq ($(ENABLE_CGI_SERVER),yes)
PROGS += $(SERVERPROGS_CGI)
endif
INCLUDES = $(shell $(XMLRPC_C_CONFIG) client abyss-server --cflags)
INCLUDES = -I. $(shell $(XMLRPC_C_CONFIG) client abyss-server --cflags)
LDADD_CLIENT = \
$(shell $(XMLRPC_C_CONFIG) client --ldadd)
@ -75,8 +82,12 @@ ifeq ($(ENABLE_CPLUSPLUS),yes)
endif
.PHONY: cpp/all
cpp/all:
$(MAKE) -C $(dir $@) $(notdir $@)
cpp/all: $(BLDDIR)/examples/cpp
$(MAKE) -C cpp -f $(SRCDIR)/examples/cpp/Makefile all
# When building in separate tree, directory won't exist yet
$(BLDDIR)/examples/cpp:
mkdir $@
$(CLIENTPROGS):%:%.o
$(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_CLIENT)
@ -90,17 +101,25 @@ $(SERVERPROGS_ABYSS):%:%.o
gen_sample_add_xml:%:%.o
$(CCLD) -o $@ $(LDFLAGS) $^ $(LDADD_BASE)
%.o:%.c
OBJECTS = $(patsubst %,%.o,$(patsubst %.cgi,%_cgi,$(PROGS)))
$(OBJECTS):%.o:%.c
$(CC) -c $(INCLUDES) $(CFLAGS) $<
*.c: config.h xmlrpc_amconfig.h
# config.h and xmlrpc_amconfig.h just describe the build environment.
# We use them so that the example programs will build in users'
# various environments. If you're copying these examples, you can
# just remove these headers from the programs and hardcode whatever is
# right for your build environment.
$(OBJECTS): config.h xmlrpc_amconfig.h
config.h:
$(LN_S) $(BUILDDIR)/xmlrpc_config.h $@
$(LN_S) $(BLDDIR)/xmlrpc_config.h $@
xmlrpc_amconfig.h:
$(LN_S) $(BUILDDIR)/$@ .
$(LN_S) $(BLDDIR)/$@ .
include $(SRCDIR)/Makefile.common
include $(SRCDIR)/common.mk
.PHONY: clean
clean: clean-common

View File

@ -20,22 +20,26 @@
#define VERSION "1.0"
#define SERVER_URL "http://localhost:8080/RPC2"
static void die_if_fault_occurred (xmlrpc_env *env)
{
if (env->fault_occurred) {
static void
die_if_fault_occurred(xmlrpc_env * const envP) {
if (envP->fault_occurred) {
fprintf(stderr, "XML-RPC Fault: %s (%d)\n",
env->fault_string, env->fault_code);
envP->fault_string, envP->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_server_info * serverP;
xmlrpc_value * resultP;
xmlrpc_int sum;
if (argc-1 > 0) {
@ -48,29 +52,29 @@ main(int const argc,
xmlrpc_env_init(&env);
/* Make a new object to represent our XML-RPC server. */
server = xmlrpc_server_info_new(&env, SERVER_URL);
serverP = 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");
xmlrpc_server_info_set_basic_auth(&env, serverP, "jrandom", "secret");
die_if_fault_occurred(&env);
result =
resultP =
xmlrpc_client_call_server(
&env, server, "sample.add", "(ii)",
&env, serverP, "sample.add", "(ii)",
(xmlrpc_int32) 5, (xmlrpc_int32) 7);
die_if_fault_occurred(&env);
/* Dispose of our server object. */
xmlrpc_server_info_free(server);
xmlrpc_server_info_free(serverP);
/* Get the authentication information and print it out. */
xmlrpc_read_int(&env, result, &sum);
xmlrpc_read_int(&env, resultP, &sum);
die_if_fault_occurred(&env);
printf("The sum is %d\n", sum);
printf("The sum is %d\n", sum);
/* Dispose of our result value. */
xmlrpc_DECREF(result);
xmlrpc_DECREF(resultP);
/* Shut down our XML-RPC client library. */
xmlrpc_env_clean(&env);

View File

@ -5,33 +5,34 @@
# these programs depend.
ifeq ($(SRCDIR)x,x)
ifeq ($(SRCDIR),)
SRCDIR = $(CURDIR)/../..
BUILDDIR = $(SRCDIR)
BLDDIR = $(SRCDIR)
endif
SUBDIR=examples/cpp
include $(BLDDIR)/config.mk
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
XMLRPC_C_CONFIG = $(BLDDIR)/xmlrpc-c-config.test
SERVERPROGS_ABYSS = \
xmlrpc_inetd_server \
xmlrpc_loop_server \
xmlrpc_sample_add_server \
LEGACY_CLIENTPROGS = \
meerkat-app-list
CLIENTPROGS = \
xmlrpc_sample_add_client \
sample_add_client_complex \
asynch_client \
# Build up PROGS:
PROGS =
@ -41,10 +42,16 @@ ifeq ($(ENABLE_ABYSS_SERVER),yes)
endif
ifeq ($(MUST_BUILD_CLIENT),yes)
PROGS += $(CLIENTPROGS) $(LEGACY_CLIENTPROGS)
PROGS += $(CLIENTPROGS)
endif
INCLUDES = $(shell $(XMLRPC_C_CONFIG) c++2 client abyss-server --cflags)
PROGS += pstream_inetd_server
ifeq ($(MUST_BUILD_CLIENT),yes)
PROGS += pstream_client
endif
INCLUDES = -I. $(shell $(XMLRPC_C_CONFIG) c++2 client abyss-server --cflags)
LDADD_SERVER_ABYSS = \
$(shell $(XMLRPC_C_CONFIG) c++2 abyss-server --ldadd)
@ -55,31 +62,42 @@ LDADD_CLIENT = \
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
LDADD_PSTREAM_CLIENT = \
$(shell $(XMLRPC_C_CONFIG) c++2 client --ldadd)
pstream_client:%:%.o
$(CXXLD) -o $@ $(LDFLAGS) $^ $(LDADD_PSTREAM_CLIENT)
LDADD_PSTREAM_SERVER = \
$(shell $(XMLRPC_C_CONFIG) c++2 pstream-server --ldadd)
pstream_inetd_server:%:%.o
$(CXXLD) -o $@ $(LDFLAGS) $^ $(LDADD_PSTREAM_SERVER)
OBJECTS = $(PROGS:%=%.o)
$(OBJECTS):%.o:%.cpp
$(CXX) -c $(INCLUDES) $(CXXFLAGS) $<
*.c: config.h xmlrpc_amconfig.h
# See example/Makefile for an explanation of config.h and xmlrpc_amconfig.h
$(OBJECTS): config.h xmlrpc_amconfig.h
config.h:
$(LN_S) $(BUILDDIR)/xmlrpc_config.h $@
$(LN_S) $(BLDDIR)/xmlrpc_config.h $@
xmlrpc_amconfig.h:
$(LN_S) $(BUILDDIR)/$@ .
$(LN_S) $(BLDDIR)/$@ .
include $(SRCDIR)/Makefile.common
include $(SRCDIR)/common.mk
.PHONY: clean
clean: clean-common

View File

@ -0,0 +1,75 @@
/*=============================================================================
asynch_client.cpp
===============================================================================
This is an example of an XML-RPC client that uses XML-RPC for C/C++
(Xmlrpc-c).
In particular, it does multiple RPCs asynchronously, running
simultaneously.
=============================================================================*/
#include <cassert>
#include <cstdlib>
#include <string>
#include <iostream>
#include <xmlrpc-c/girerr.hpp>
#include <xmlrpc-c/base.hpp>
#include <xmlrpc-c/client.hpp>
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 sampleAddParms1;
sampleAddParms1.add(xmlrpc_c::value_int(3));
sampleAddParms1.add(xmlrpc_c::value_int(1));
xmlrpc_c::rpcPtr rpc1P(methodName, sampleAddParms1);
xmlrpc_c::paramList sampleAddParms2;
sampleAddParms2.add(xmlrpc_c::value_int(5));
sampleAddParms2.add(xmlrpc_c::value_int(7));
xmlrpc_c::rpcPtr rpc2P(methodName, sampleAddParms2);
string const serverUrl("http://localhost:8080/RPC2");
xmlrpc_c::carriageParm_curl0 myCarriageParm(serverUrl);
rpc1P->start(&myClient, &myCarriageParm);
rpc2P->start(&myClient, &myCarriageParm);
cout << "Two RPCs started. Waiting for them to finish." << endl;
myClient.finishAsync(xmlrpc_c::timeout()); // infinite timeout
assert(rpc1P->isFinished());
assert(rpc2P->isFinished());
int const sum1(xmlrpc_c::value_int(rpc1P->getResult()));
int const sum2(xmlrpc_c::value_int(rpc2P->getResult()));
cout << "Result of RPC 1 (sum of 3 and 1): " << sum1 << endl;
cout << "Result of RPC 2 (sum of 5 and 7): " << sum2 << endl;
} catch (exception const& e) {
cerr << "Client threw error: " << e.what() << endl;
} catch (...) {
cerr << "Client threw unexpected error." << endl;
}
return 0;
}

View File

@ -0,0 +1,84 @@
/*=============================================================================
pstream_client.cpp
===============================================================================
This is an example of a client that uses XML-RPC for C/C++
(Xmlrpc-c).
In particular, it uses the simple "packet stream" XML transport mechanism
instead of HTTP as specified by XML-RPC (so this is not an XML-RPC
client).
You have to supply as Standard Input a stream (TCP) socket whose other
end is hooked up to the RPC server. The 'socket_exec' program is a
good way to arrange that.
The sample program pstream_server.cpp is compatible with this client.
Example:
$ socketexec -connect -remote_host=localhost -remote_port=8080 \
./pstream_client
=============================================================================*/
#include <cassert>
#include <cstdlib>
#include <string>
#include <iostream>
#include <unistd.h>
#include <sys/signal.h>
#include <xmlrpc-c/girerr.hpp>
#include <xmlrpc-c/base.hpp>
#include <xmlrpc-c/client.hpp>
#include <xmlrpc-c/client_transport.hpp>
using namespace std;
int
main(int argc, char **) {
if (argc-1 > 0) {
cerr << "This program has no arguments" << endl;
exit(1);
}
// It's a good idea to disable SIGPIPE signals; if server closes his end
// of the pipe/socket, we'd rather see a failure to send a call than
// get killed by the OS.
signal(SIGPIPE, SIG_IGN);
try {
xmlrpc_c::clientXmlTransport_pstream myTransport(
xmlrpc_c::clientXmlTransport_pstream::constrOpt()
.fd(STDIN_FILENO));
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);
xmlrpc_c::carriageParm_pstream myCarriageParm;
// Empty; transport doesn't need any information
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 (exception const& e) {
cerr << "Client threw error: " << e.what() << endl;
} catch (...) {
cerr << "Client threw unexpected error." << endl;
}
return 0;
}

View File

@ -0,0 +1,90 @@
/* A simple standalone RPC server based on an Xmlrpc-c packet socket.
This program expects the invoker to provide an established connection
to a client as Standard Input (E.g. Inetd can do this). It processes
RPCs from that connection until the client closes the connection.
This is not an XML-RPC server, because it uses a simple packet socket
instead of HTTP. See xmlrpc_sample_add_server.cpp for an example of
an XML-RPC server.
The advantage of this example over XML-RPC is that it has a connection
concept. The client can be connected indefinitely and the server gets
notified when the client terminates, even if it gets aborted by its OS.
Here's an example of running this:
$ socketexec -accept -local_port=8080 ./pstream_inetd_server
*/
#ifndef WIN32
#include <unistd.h>
#endif
#include <cassert>
#include <iostream>
#include <sys/signal.h>
#include <xmlrpc-c/base.hpp>
#include <xmlrpc-c/registry.hpp>
#include <xmlrpc-c/server_pstream.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 arguments are two 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) {
// It's a good idea to disable SIGPIPE signals; if client closes his end
// of the pipe/socket, we'd rather see a failure to send a response than
// get killed by the OS.
signal(SIGPIPE, SIG_IGN);
try {
xmlrpc_c::registry myRegistry;
xmlrpc_c::methodPtr const sampleAddMethodP(new sampleAddMethod);
myRegistry.addMethod("sample.add", sampleAddMethodP);
xmlrpc_c::serverPstreamConn server(
xmlrpc_c::serverPstreamConn::constrOpt()
.socketFd(STDIN_FILENO)
.registryP(&myRegistry));
for (bool clientHasDisconnected = false; !clientHasDisconnected;)
server.runOnce(&clientHasDisconnected);
// This reads one packet (containing an XML-RPC call message)
// from Standard Input, executes the indicated RPC, and writes
// one packet containing the XML-RPC response message to
// Standard Input.
} catch (exception const& e) {
cerr << "Something threw an error: " << e.what() << endl;
}
return 0;
}

View File

@ -14,12 +14,13 @@
facility. It is for demonstration purposes.
=============================================================================*/
#include <cassert>
#include <cstdlib>
#include <string>
#include <iostream>
#include <xmlrpc-c/girerr.hpp>
#include <xmlrpc-c/base.hpp>
#include <xmlrpc-c/client.hpp>
#include <cassert>
using namespace std;
@ -32,7 +33,11 @@ main(int argc, char **) {
}
try {
xmlrpc_c::clientXmlTransport_curl myTransport;
xmlrpc_c::clientXmlTransport_curl myTransport(
xmlrpc_c::clientXmlTransport_curl::constrOpt()
.no_ssl_verifyhost(true)
.user_agent("sample_add/1.0"));
xmlrpc_c::client_xml myClient(&myTransport);
string const methodName("sample.add");
@ -47,8 +52,6 @@ main(int argc, char **) {
xmlrpc_c::carriageParm_curl0 myCarriageParm(serverUrl);
xmlrpc_c::value result;
myRpcP->call(&myClient, &myCarriageParm);
assert(myRpcP->isFinished());
@ -58,8 +61,8 @@ main(int argc, char **) {
cout << "Result of RPC (sum of 5 and 7): " << sum << endl;
} catch (girerr::error const error) {
cerr << "Client threw error: " << error.what() << endl;
} catch (exception const& e) {
cerr << "Client threw error: " << e.what() << endl;
} catch (...) {
cerr << "Client threw unexpected error." << endl;
}

View File

@ -0,0 +1,62 @@
/* A simple XML-RPC server that runs under Inetd. I.e. it lets the invoking
program handle all the connection switching and simply processes one
RPC on the provided connection (Standard Input) and exits.
*/
#ifndef WIN32
#include <unistd.h>
#endif
#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 arguments are two 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.runConn(STDIN_FILENO);
/* This reads the HTTP POST request from Standard Input and
executes the indicated RPC.
*/
return 0;
}

View File

@ -0,0 +1,72 @@
/* A simple standalone XML-RPC server based on Abyss that contains a
simple one-thread request processing loop.
xmlrpc_sample_add_server.cpp 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 <cassert>
#include <iostream>
#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 arguments, result 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) {
try {
xmlrpc_c::registry myRegistry;
xmlrpc_c::methodPtr const sampleAddMethodP(new sampleAddMethod);
myRegistry.addMethod("sample.add", sampleAddMethodP);
xmlrpc_c::serverAbyss myAbyssServer(
xmlrpc_c::serverAbyss::constrOpt()
.registryP(&myRegistry)
.portNumber(8080)
.logFileName("/tmp/xmlrpc_log"));
while (true) {
cout << "Waiting for next RPC..." << endl;
myAbyssServer.runOnce();
/* This waits for the next connection, accepts it, reads the
HTTP POST request, executes the indicated RPC, and closes
the connection.
*/
}
} catch (exception const& e) {
cerr << "Something failed. " << e.what() << endl;
}
return 0;
}

View File

@ -1,3 +1,4 @@
#include <cstdlib>
#include <string>
#include <iostream>
#include <xmlrpc-c/girerr.hpp>
@ -28,8 +29,8 @@ main(int argc, char **) {
cout << "Result of RPC (sum of 5 and 7): " << sum << endl;
} catch (girerr::error const error) {
cerr << "Client threw error: " << error.what() << endl;
} catch (exception const& e) {
cerr << "Client threw error: " << e.what() << endl;
} catch (...) {
cerr << "Client threw unexpected error." << endl;
}

View File

@ -1,4 +1,11 @@
#include <cassert>
#include <stdexcept>
#include <iostream>
#ifdef WIN32
# include <windows.h>
#else
# include <unistd.h>
#endif
#include <xmlrpc-c/base.hpp>
#include <xmlrpc-c/registry.hpp>
@ -6,6 +13,13 @@
using namespace std;
#ifdef WIN32
#define SLEEP(seconds) SleepEx(seconds * 1000);
#else
#define SLEEP(seconds) sleep(seconds);
#endif
class sampleAddMethod : public xmlrpc_c::method {
public:
sampleAddMethod() {
@ -26,6 +40,11 @@ public:
paramList.verifyEnd(2);
*retvalP = xmlrpc_c::value_int(addend + adder);
// Sometimes, make it look hard (so client can see what it's like
// to do an RPC that takes a while).
if (adder == 1)
SLEEP(2);
}
};
@ -35,21 +54,24 @@ int
main(int const,
const char ** const) {
xmlrpc_c::registry myRegistry;
try {
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);
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);
} catch (exception const& e) {
cerr << "Something failed. " << e.what() << endl;
}
return 0;
}

View File

@ -16,10 +16,10 @@
#include "config.h"
static void
die_if_fault_occurred (xmlrpc_env *env) {
if (env->fault_occurred) {
die_if_fault_occurred(xmlrpc_env * const envP) {
if (envP->fault_occurred) {
fprintf(stderr, "XML-RPC Fault: %s (%d)\n",
env->fault_string, env->fault_code);
envP->fault_string, envP->fault_code);
exit(1);
}
}

View File

@ -0,0 +1,164 @@
/* Same as xmlrpc_sample_add_client.c, except the call is interruptible,
both by timeout and by control-C.
*/
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <signal.h>
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/client.h>
#include "config.h" /* information about this build environment */
static int interrupt;
/* This is a flag telling libxmlrpc_client to abort whatever it's
doing. It's global because we set it with a signal handler.
*/
static void
die_if_fault_occurred (xmlrpc_env * const envP) {
if (envP->fault_occurred) {
fprintf(stderr, "XML-RPC Fault: %s (%d)\n",
envP->fault_string, envP->fault_code);
exit(1);
}
}
static void
interruptRpc(int const signalClass) {
switch (signalClass) {
case SIGINT:
printf("SIGINT signal received.\n");
break;
case SIGALRM:
printf("SIGALRM signal received.\n");
break;
default:
printf("Internal error: signal of class %u caught even though "
"we didn't set up a handler for that class\n", signalClass);
};
interrupt = 1;
}
static void
setupSignalHandlers(void) {
struct sigaction mysigaction;
sigemptyset(&mysigaction.sa_mask);
mysigaction.sa_flags = 0;
/* Usually, this signal indicates the user pressed Ctl-C */
mysigaction.sa_handler = interruptRpc;
sigaction(SIGINT, &mysigaction, NULL);
/* This signal indicates a timed alarm you requested happened */
sigaction(SIGALRM, &mysigaction, NULL);
}
static void
addInterruptibly(xmlrpc_client * const clientP,
const char * const serverUrl,
int const addend,
int const adder) {
const char * const methodName = "sample.add";
xmlrpc_env env;
xmlrpc_value * resultP;
xmlrpc_int32 sum;
xmlrpc_env_init(&env);
printf("Making XMLRPC call to server url '%s' method '%s' "
"to request the sum "
"of %d and %d...\n", serverUrl, methodName, addend, adder);
interrupt = 0; /* Global variable */
alarm(2); /* Interrupt the call if it hasn't finished 2 seconds from now */
/* Make the remote procedure call */
xmlrpc_client_call2f(&env, clientP, serverUrl, methodName, &resultP,
"(ii)", (xmlrpc_int32) addend, (xmlrpc_int32) adder);
die_if_fault_occurred(&env);
alarm(0); /* Cancel alarm, if it hasn't happened yet */
/* Get our sum and print it out. */
xmlrpc_read_int(&env, resultP, &sum);
die_if_fault_occurred(&env);
printf("The sum is %d\n", sum);
/* Dispose of our result value. */
xmlrpc_DECREF(resultP);
xmlrpc_env_clean(&env);
}
int
main(int const argc,
const char ** const argv ATTR_UNUSED) {
const char * const serverUrl = "http://localhost:8080/RPC2";
xmlrpc_env env;
struct xmlrpc_clientparms clientParms;
xmlrpc_client * clientP;
if (argc-1 > 0) {
fprintf(stderr, "This program has no arguments\n");
exit(1);
}
setupSignalHandlers();
/* Initialize our error-handling environment. */
xmlrpc_env_init(&env);
/* Required before any use of Xmlrpc-c client library: */
xmlrpc_client_setup_global_const(&env);
die_if_fault_occurred(&env);
clientParms.transport = "curl";
/* Create a client object */
xmlrpc_client_create(&env, 0, NULL, NULL,
&clientParms, XMLRPC_CPSIZE(transport),
&clientP);
die_if_fault_occurred(&env);
xmlrpc_client_set_interrupt(clientP, &interrupt);
/* If our server is running 'xmlrpc_sample_add_server' normally, the
RPC will finish almost instantly. UNLESS the adder is 1, in which
case said server is programmed to take 3 seconds to do the
computation, thus allowing us to demonstrate a timeout or CTL-C.
*/
addInterruptibly(clientP, serverUrl, 5, 7);
/* Should finish instantly */
addInterruptibly(clientP, serverUrl, 5, 1);
/* Should time out after 2 seconds */
xmlrpc_env_clean(&env);
xmlrpc_client_destroy(clientP);
xmlrpc_client_teardown_global_const();
return 0;
}

View File

@ -0,0 +1,161 @@
/* A simple standalone XML-RPC server based on Abyss.
You can terminate this server in controlled fashion with a SIGTERM
signal.
xmlrpc_sample_add_server.c is a server that does the same thing with
simpler code, but it is not interruptible with SIGTERM.
*/
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <sys/socket.h>
#include <netinet/in.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
dieIfFailed(const char * const description,
xmlrpc_env const env) {
if (env.fault_occurred) {
fprintf(stderr, "%s failed. %s\n", description, env.fault_string);
exit(1);
}
}
static xmlrpc_server_abyss_t * serverToTerminateP;
static void
sigtermHandler(int const signalClass ATTR_UNUSED) {
xmlrpc_env env;
xmlrpc_env_init(&env);
xmlrpc_server_abyss_terminate(&env, serverToTerminateP);
dieIfFailed("xmlrpc_server_abyss_terminate", env);
xmlrpc_env_clean(&env);
}
static void
setupSigtermHandler(xmlrpc_server_abyss_t * const serverP) {
struct sigaction mysigaction;
serverToTerminateP = serverP;
sigemptyset(&mysigaction.sa_mask);
mysigaction.sa_flags = 0;
mysigaction.sa_handler = sigtermHandler;
sigaction(SIGTERM, &mysigaction, NULL);
}
static void
restoreSigtermHandler(void){
struct sigaction mysigaction;
sigemptyset(&mysigaction.sa_mask);
mysigaction.sa_flags = 0;
mysigaction.sa_handler = SIG_DFL;
sigaction(SIGTERM, &mysigaction, NULL);
}
static xmlrpc_value *
sample_add(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
void * const serverInfo ATTR_UNUSED,
void * const channelInfo 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) {
xmlrpc_server_abyss_parms serverparm;
xmlrpc_server_abyss_t * serverP;
xmlrpc_registry * registryP;
xmlrpc_env env;
xmlrpc_server_abyss_sig * oldHandlersP;
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);
xmlrpc_server_abyss_global_init(&env);
dieIfFailed("xmlrpc_server_abyss_global_init", env);
registryP = xmlrpc_registry_new(&env);
dieIfFailed("xmlrpc_registry_new", env);
xmlrpc_registry_add_method2(
&env, registryP, "sample.add", &sample_add, NULL, NULL, NULL);
dieIfFailed("xmlrpc_registry_add_method2", env);
serverparm.config_file_name = NULL;
serverparm.registryP = registryP;
serverparm.port_number = atoi(argv[1]);
xmlrpc_server_abyss_create(&env, &serverparm, XMLRPC_APSIZE(port_number),
&serverP);
dieIfFailed("xmlrpc_server_abyss_create", env);
xmlrpc_server_abyss_setup_sig(&env, serverP, &oldHandlersP);
dieIfFailed("xmlrpc_server_abyss_setup_sig", env);
setupSigtermHandler(serverP);
printf("Running XML-RPC server...\n");
xmlrpc_server_abyss_run_server(&env, serverP);
dieIfFailed("xmlrpc_server_abyss_run_server", env);
printf("Server has terminated\n");
restoreSigtermHandler();
xmlrpc_server_abyss_restore_sig(oldHandlersP);
xmlrpc_server_abyss_destroy(serverP);
xmlrpc_registry_free(registryP);
xmlrpc_server_abyss_global_term();
xmlrpc_env_clean(&env);
return 0;
}

View File

@ -11,11 +11,11 @@
#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) {
static void
die_if_fault_occurred(xmlrpc_env * const envP) {
if (envP->fault_occurred) {
fprintf(stderr, "XML-RPC Fault: %s (%d)\n",
env->fault_string, env->fault_code);
envP->fault_string, envP->fault_code);
exit(1);
}
}
@ -28,7 +28,7 @@ main(int const argc,
xmlrpc_env env;
xmlrpc_value * resultP;
const char * state_name;
const char * stateName;
if (argc-1 > 0) {
fprintf(stderr, "No arguments");
@ -48,10 +48,10 @@ main(int const argc,
die_if_fault_occurred(&env);
/* Get our state name and print it out. */
xmlrpc_read_string(&env, resultP, &state_name);
xmlrpc_read_string(&env, resultP, &stateName);
die_if_fault_occurred(&env);
printf("%s\n", state_name);
free((char*)state_name);
printf("%s\n", stateName);
free((char*)stateName);
/* Dispose of our result value. */
xmlrpc_DECREF(resultP);

View File

@ -3,6 +3,10 @@
simpler synchronous client xmlprc_sample_add_client.c, except that
it adds 3 different pairs of numbers with the summation RPCs going on
simultaneously.
Use this with xmlrpc_sample_add_server. Note that that server
intentionally takes extra time to add 1 to anything, so you can see
our 5+1 RPC finish after our 5+0 and 5+2 RPCs.
*/
#include <stdlib.h>
@ -17,10 +21,10 @@
#define VERSION "1.0"
static void
die_if_fault_occurred (xmlrpc_env *env) {
if (env->fault_occurred) {
die_if_fault_occurred(xmlrpc_env * const envP) {
if (envP->fault_occurred) {
fprintf(stderr, "Something failed. %s (XML-RPC fault code %d)\n",
env->fault_string, env->fault_code);
envP->fault_string, envP->fault_code);
exit(1);
}
}
@ -28,13 +32,13 @@ die_if_fault_occurred (xmlrpc_env *env) {
static void
handle_sample_add_response(const char * const server_url,
const char * const method_name,
xmlrpc_value * const param_array,
handle_sample_add_response(const char * const serverUrl,
const char * const methodName,
xmlrpc_value * const paramArrayP,
void * const user_data ATTR_UNUSED,
xmlrpc_env * const faultP,
xmlrpc_value * const resultP) {
xmlrpc_env env;
xmlrpc_int addend, adder;
@ -44,14 +48,14 @@ handle_sample_add_response(const char * const server_url,
/* 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);
xmlrpc_decompose_value(&env, paramArrayP, "(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);
"has completed\n", methodName, serverUrl, addend, adder);
if (faultP->fault_occurred)
printf("The RPC failed. %s", faultP->fault_string);
printf("The RPC failed. %s\n", faultP->fault_string);
else {
xmlrpc_int sum;
@ -68,10 +72,11 @@ int
main(int const argc,
const char ** const argv ATTR_UNUSED) {
char * const url = "http://localhost:8080/RPC2";
char * const methodName = "sample.add";
const char * const serverUrl = "http://localhost:8080/RPC2";
const char * const methodName = "sample.add";
xmlrpc_env env;
xmlrpc_client * clientP;
xmlrpc_int adder;
if (argc-1 > 0) {
@ -82,17 +87,21 @@ main(int const argc,
/* 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);
/* Required before any use of Xmlrpc-c client library: */
xmlrpc_client_setup_global_const(&env);
die_if_fault_occurred(&env);
xmlrpc_client_create(&env, XMLRPC_CLIENT_NO_FLAGS, NAME, VERSION, NULL, 0,
&clientP);
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);
"of 5 and %d...\n", serverUrl, methodName, adder);
/* request the remote procedure call */
xmlrpc_client_call_asynch(url, methodName,
xmlrpc_client_start_rpcf(&env, clientP, serverUrl, methodName,
handle_sample_add_response, NULL,
"(ii)", (xmlrpc_int32) 5, adder);
die_if_fault_occurred(&env);
@ -100,13 +109,15 @@ main(int const argc,
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();
/* Wait for all RPCs to be done. With some transports, this is also
what causes them to go.
*/
xmlrpc_client_event_loop_finish(clientP);
printf("All RPCs finished.\n");
/* Destroy the Xmlrpc-c client object */
xmlrpc_client_cleanup();
xmlrpc_client_destroy(clientP);
xmlrpc_client_teardown_global_const();
return 0;
}

View File

@ -0,0 +1,121 @@
/* A simple standalone XML-RPC server based on Abyss that processes a
single RPC from an existing TCP connection on Standard Input.
A typical example of where this would be useful is with an Inetd
"super server."
xmlrpc_sample_add_server.c is a server that does the same thing,
but you give it a TCP port number and it listens for TCP connecitons
and processes RPCs ad infinitum. xmlrpc_socket_server.c is halfway
in between those -- you give it an already bound and listening
socket, and it lists for TCP connections and processes RPCs ad
infinitum.
Here is an easy way to test this program:
socketexec --accept --local_port=8080 --stdin -- ./xmlrpc_inetd_server
Now run the client program 'xmlrpc_sample_add_client'. Socketexec
will accept the connection that the client program requests and pass it
to this program on Standard Input. This program will perform the RPC,
respond to the client, then exit.
*/
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#ifndef WIN32
#include <unistd.h>
#endif
#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.
*/
#ifndef WIN32
struct sigaction mysigaction;
sigemptyset(&mysigaction.sa_mask);
mysigaction.sa_flags = 0;
mysigaction.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &mysigaction, NULL);
#endif
}
static xmlrpc_value *
sample_add(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
void * const serverInfo ATTR_UNUSED,
void * const channelInfo 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 != 0) {
fprintf(stderr, "There are no arguments. You must supply a "
"bound socket on which to listen for client connections "
"as Standard Input\n");
if (argv) {} /* silence unused parameter warning */
exit(1);
}
xmlrpc_env_init(&env);
registryP = xmlrpc_registry_new(&env);
xmlrpc_registry_add_method2(
&env, registryP, "sample.add", &sample_add, NULL, NULL, NULL);
ServerCreateNoAccept(&abyssServer, "XmlRpcServer", NULL, NULL);
xmlrpc_server_abyss_set_handlers(&abyssServer, registryP);
setupSignalHandlers();
ServerRunConn(&abyssServer, STDIN_FILENO);
/* This reads the HTTP POST request from Standard Input and
executes the indicated RPC.
*/
ServerFree(&abyssServer);
return 0;
}

View File

@ -9,6 +9,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/abyss.h>
#include <xmlrpc-c/server.h>
@ -29,12 +32,33 @@ setupSignalHandlers(void) {
obviously don't want to die just because a client didn't complete
an RPC, so we ignore SIGPIPE.
*/
#ifndef WIN32
struct sigaction mysigaction;
sigemptyset(&mysigaction.sa_mask);
mysigaction.sa_flags = 0;
mysigaction.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &mysigaction, NULL);
#endif
}
static void
printPeerIpAddr(TSession * const abyssSessionP) {
struct abyss_unix_chaninfo * channelInfoP;
struct sockaddr_in * sockAddrInP;
unsigned char * ipAddr; /* 4 byte array */
SessionGetChannelInfo(abyssSessionP, (void*)&channelInfoP);
sockAddrInP = (struct sockaddr_in *) &channelInfoP->peerAddr;
ipAddr = (unsigned char *)&sockAddrInP->sin_addr.s_addr;
printf("RPC is from IP address %u.%u.%u.%u\n",
ipAddr[0], ipAddr[1], ipAddr[2], ipAddr[3]);
}
@ -42,10 +66,13 @@ setupSignalHandlers(void) {
static xmlrpc_value *
sample_add(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
void * const userData ATTR_UNUSED) {
void * const serverInfo ATTR_UNUSED,
void * const channelInfo) {
xmlrpc_int x, y, z;
printPeerIpAddr(channelInfo);
/* Parse our argument array. */
xmlrpc_decompose_value(envP, paramArrayP, "(ii)", &x, &y);
if (envP->fault_occurred)
@ -60,6 +87,32 @@ sample_add(xmlrpc_env * const envP,
static xmlrpc_server_shutdown_fn requestShutdown;
static void
requestShutdown(xmlrpc_env * const faultP,
void * const context,
const char * const comment,
void * const callInfo) {
/* You make this run by executing the system method
'system.shutdown'. This function is registered in the method
registry as the thing to call for that.
*/
int * const terminationRequestedP = context;
TSession * const abyssSessionP = callInfo;
xmlrpc_env_init(faultP);
fprintf(stderr, "Termination requested: %s\n", comment);
printPeerIpAddr(abyssSessionP);
*terminationRequestedP = 1;
}
int
main(int const argc,
const char ** const argv) {
@ -67,6 +120,8 @@ main(int const argc,
TServer abyssServer;
xmlrpc_registry * registryP;
xmlrpc_env env;
int terminationRequested; /* A boolean value */
const char * error;
if (argc-1 != 1) {
fprintf(stderr, "You must specify 1 argument: The TCP port number "
@ -74,34 +129,42 @@ main(int const argc,
"You specified %d.\n", argc-1);
exit(1);
}
AbyssInit(&error);
xmlrpc_env_init(&env);
registryP = xmlrpc_registry_new(&env);
xmlrpc_registry_add_method(
&env, registryP, NULL, "sample.add", &sample_add, NULL);
xmlrpc_registry_add_method2(
&env, registryP, "sample.add", &sample_add, NULL, NULL, NULL);
MIMETypeInit();
xmlrpc_registry_set_shutdown(registryP,
&requestShutdown, &terminationRequested);
ServerCreate(&abyssServer, "XmlRpcServer", atoi(argv[1]),
NULL, NULL);
ServerCreate(&abyssServer, "XmlRpcServer", atoi(argv[1]), NULL, NULL);
xmlrpc_server_abyss_set_handlers(&abyssServer, registryP);
xmlrpc_server_abyss_set_handlers2(&abyssServer, "/RPC2", registryP);
ServerInit(&abyssServer);
setupSignalHandlers();
while (1) {
terminationRequested = 0;
while (!terminationRequested) {
printf("Waiting for next RPC...\n");
ServerRunOnce2(&abyssServer, ABYSS_FOREGROUND);
ServerRunOnce(&abyssServer);
/* This waits for the next connection, accepts it, reads the
HTTP POST request, executes the indicated RPC, and closes
the connection.
*/
}
ServerFree(&abyssServer);
AbyssTerm();
return 0;
}

View File

@ -16,10 +16,10 @@
#define VERSION "1.0"
static void
die_if_fault_occurred (xmlrpc_env *env) {
if (env->fault_occurred) {
die_if_fault_occurred (xmlrpc_env * const envP) {
if (envP->fault_occurred) {
fprintf(stderr, "XML-RPC Fault: %s (%d)\n",
env->fault_string, env->fault_code);
envP->fault_string, envP->fault_code);
exit(1);
}
}
@ -31,10 +31,10 @@ main(int const argc,
const char ** const argv ATTR_UNUSED) {
xmlrpc_env env;
xmlrpc_value *result;
xmlrpc_value * resultP;
xmlrpc_int32 sum;
char * const serverUrl = "http://localhost:8080/RPC2";
char * const methodName = "sample.add";
const char * const serverUrl = "http://localhost:8080/RPC2";
const char * const methodName = "sample.add";
if (argc-1 > 0) {
fprintf(stderr, "This program has no arguments\n");
@ -53,17 +53,17 @@ main(int const argc,
"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);
resultP = 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);
xmlrpc_read_int(&env, resultP, &sum);
die_if_fault_occurred(&env);
printf("The sum is %d\n", sum);
printf("The sum is %d\n", sum);
/* Dispose of our result value. */
xmlrpc_DECREF(result);
xmlrpc_DECREF(resultP);
/* Clean up our error-handling environment. */
xmlrpc_env_clean(&env);

View File

@ -2,6 +2,11 @@
#include <stdlib.h>
#include <stdio.h>
#ifdef WIN32
# include <windows.h>
#else
# include <unistd.h>
#endif
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/server.h>
@ -9,23 +14,38 @@
#include "config.h" /* information about this build environment */
#ifdef WIN32
#define SLEEP(seconds) SleepEx(seconds * 1000, 1);
#else
#define SLEEP(seconds) sleep(seconds);
#endif
static xmlrpc_value *
sample_add(xmlrpc_env * const env,
xmlrpc_value * const param_array,
void * const user_data ATTR_UNUSED) {
sample_add(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
void * const serverInfo ATTR_UNUSED,
void * const channelInfo ATTR_UNUSED) {
xmlrpc_int32 x, y, z;
/* Parse our argument array. */
xmlrpc_decompose_value(env, param_array, "(ii)", &x, &y);
if (env->fault_occurred)
xmlrpc_decompose_value(envP, paramArrayP, "(ii)", &x, &y);
if (envP->fault_occurred)
return NULL;
/* Add our two numbers. */
z = x + y;
/* Sometimes, make it look hard (so client can see what it's like
to do an RPC that takes a while).
*/
if (y == 1)
SLEEP(3);
/* Return our result. */
return xmlrpc_build_value(env, "i", z);
return xmlrpc_build_value(envP, "i", z);
}
@ -41,7 +61,8 @@ main(int const argc,
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);
"for RPCs (8080 is a common choice). "
"You specified %d arguments.\n", argc-1);
exit(1);
}
@ -49,17 +70,17 @@ main(int const argc,
registryP = xmlrpc_registry_new(&env);
xmlrpc_registry_add_method(
&env, registryP, NULL, "sample.add", &sample_add, NULL);
xmlrpc_registry_add_method2(
&env, registryP, "sample.add", &sample_add, NULL, NULL, 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";
serverparm.registryP = registryP;
serverparm.port_number = atoi(argv[1]);
serverparm.log_file_name = "/tmp/xmlrpc_log";
printf("Running XML-RPC server...\n");

View File

@ -10,22 +10,22 @@
#include "config.h" /* information about this build environment */
static xmlrpc_value *
sample_add(xmlrpc_env * const env,
xmlrpc_value * const param_array,
sample_add(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
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)
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(env, "i", z);
return xmlrpc_build_value(envP, "i", z);
}

View File

@ -167,8 +167,8 @@ int __cdecl wmain( int argc, wchar_t * argv[])
serverparm.portNum=8080;
//if this is set, we will use the authorization function
serverparm.authfn=NULL;
//serverparm.authfn=&handleAuthorization;
//serverparm.authfn=NULL;
serverparm.authfn=&handleAuthorization;
//set the logging level and log file
serverparm.logLevel=2;

View File

@ -51,9 +51,9 @@
#include "config.h" /* information about this build environment */
#define RETURN_IF_FAULT(env) \
#define RETURN_IF_FAULT(envP) \
do { \
if ((env)->fault_occurred) \
if ((envP)->fault_occurred) \
return NULL; \
} while (0)
@ -65,20 +65,19 @@
static xmlrpc_value *
array_of_structs(xmlrpc_env * const envP,
xmlrpc_value * const param_array,
xmlrpc_value * const paramArrayP,
void * const user_data ATTR_UNUSED) {
xmlrpc_value * array;
xmlrpc_value * arrayP;
xmlrpc_value * retval;
/* Parse our argument array. */
xmlrpc_decompose_value(envP, param_array, "(A)", &array);
xmlrpc_decompose_value(envP, paramArrayP, "(A)", &arrayP);
if (envP->fault_occurred)
retval = NULL;
else {
/* Add up all the struct elements named "curly". */
size_t size;
size = xmlrpc_array_size(envP, array);
size = xmlrpc_array_size(envP, arrayP);
if (envP->fault_occurred)
retval = NULL;
else {
@ -86,18 +85,20 @@ array_of_structs(xmlrpc_env * const envP,
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);
xmlrpc_value * strctP;
strctP = xmlrpc_array_get_item(envP, arrayP, i);
if (!envP->fault_occurred) {
xmlrpc_int32 curly;
xmlrpc_decompose_value(envP, strct, "{s:i,*}",
xmlrpc_decompose_value(envP, strctP, "{s:i,*}",
"curly", &curly);
if (!envP->fault_occurred)
sum += curly;
}
}
xmlrpc_DECREF(array);
if (!envP->fault_occurred)
xmlrpc_DECREF(arrayP);
if (envP->fault_occurred)
retval = NULL;
else
retval = xmlrpc_build_value(envP, "i", sum);
}
}
@ -111,30 +112,31 @@ array_of_structs(xmlrpc_env * const envP,
*/
static xmlrpc_value *
count_entities(xmlrpc_env * const env,
xmlrpc_value * const param_array,
count_entities(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
void * const user_data ATTR_UNUSED) {
const char *str;
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);
xmlrpc_decompose_value(envP, paramArrayP, "(s#)", &str, &len);
RETURN_IF_FAULT(envP);
left = right = amp = apos = quote = 0;
for (i = 0; i < len; i++) {
for (i = 0; i < len; ++i) {
switch (str[i]) {
case '<': left++; break;
case '>': right++; break;
case '&': amp++; break;
case '\'': apos++; break;
case '\"': quote++; break;
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}",
return xmlrpc_build_value(envP, "{s:i,s:i,s:i,s:i,s:i}",
"ctLeftAngleBrackets", left,
"ctRightAngleBrackets", right,
"ctAmpersands", amp,
@ -150,43 +152,46 @@ count_entities(xmlrpc_env * const env,
*/
static xmlrpc_value *
easy_struct(xmlrpc_env * const env,
xmlrpc_value * const param_array,
easy_struct(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
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,*})",
xmlrpc_decompose_value(envP, paramArrayP, "({s:i,s:i,s:i,*})",
"larry", &larry,
"moe", &moe,
"curly", &curly);
RETURN_IF_FAULT(env);
RETURN_IF_FAULT(envP);
/* Return our result. */
return xmlrpc_build_value(env, "i", larry + moe + curly);
return xmlrpc_build_value(envP, "i", larry + moe + curly);
}
/*=========================================================================
** validator1.echoStructTest
**=========================================================================
*/
static xmlrpc_value *
echo_struct(xmlrpc_env * const env,
xmlrpc_value * const param_array,
echo_struct(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
void * const user_data ATTR_UNUSED) {
xmlrpc_value *s;
xmlrpc_value * sP;
/* Parse our argument array. */
xmlrpc_decompose_value(env, param_array, "(S)", &s);
RETURN_IF_FAULT(env);
xmlrpc_decompose_value(envP, paramArrayP, "(S)", &sP);
RETURN_IF_FAULT(envP);
return s; /* We transfer our reference on 's' to Caller */
return sP; /* We transfer our reference on '*sP' to Caller */
}
/*=========================================================================
** validator1.manyTypesTest
**=========================================================================
@ -203,6 +208,7 @@ many_types(xmlrpc_env * const env ATTR_UNUSED,
}
/*=========================================================================
** validator1.moderateSizeArrayCheck
**=========================================================================
@ -214,7 +220,7 @@ concatenate(xmlrpc_env * const envP,
size_t const str1_len,
const char * const str2,
size_t const str2_len,
xmlrpc_value ** const resultP) {
xmlrpc_value ** const resultPP) {
/* Concatenate the two strings. */
@ -227,8 +233,8 @@ concatenate(xmlrpc_env * const envP,
} else {
memcpy(buffer, str1, str1_len);
memcpy(&buffer[str1_len], str2, str2_len);
*resultP = xmlrpc_build_value(envP, "s#",
buffer, str1_len + str2_len);
*resultPP = xmlrpc_build_value(envP, "s#",
buffer, str1_len + str2_len);
free(buffer);
}
}
@ -236,31 +242,34 @@ concatenate(xmlrpc_env * const envP,
static xmlrpc_value *
moderate_array(xmlrpc_env * const envP,
xmlrpc_value * const param_array,
moderate_array(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
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;
xmlrpc_value * arrayP;
/* Parse our argument array. */
xmlrpc_decompose_value(envP, param_array, "(A)", &array);
xmlrpc_decompose_value(envP, paramArrayP, "(A)", &arrayP);
if (!envP->fault_occurred) {
size = xmlrpc_array_size(envP, array);
int const size = xmlrpc_array_size(envP, arrayP);
if (!envP->fault_occurred) {
/* Get our first string. */
item = xmlrpc_array_get_item(envP, array, 0);
xmlrpc_value * const firstItemP =
xmlrpc_array_get_item(envP, arrayP, 0);
if (!envP->fault_occurred) {
xmlrpc_read_string_lp(envP, item, &str1_len, &str1);
const char * str1;
size_t str1_len;
xmlrpc_read_string_lp(envP, firstItemP, &str1_len, &str1);
if (!envP->fault_occurred) {
/* Get our last string. */
item = xmlrpc_array_get_item(envP, array, size - 1);
xmlrpc_value * const lastItemP =
xmlrpc_array_get_item(envP, arrayP, size - 1);
if (!envP->fault_occurred) {
xmlrpc_read_string_lp(envP, item, &str2_len, &str2);
const char * str2;
size_t str2_len;
xmlrpc_read_string_lp(envP, lastItemP,
&str2_len, &str2);
if (!envP->fault_occurred) {
concatenate(envP, str1, str1_len, str2, str2_len,
&retval);
@ -271,12 +280,13 @@ moderate_array(xmlrpc_env * const envP,
}
}
}
xmlrpc_DECREF(array);
xmlrpc_DECREF(arrayP);
}
return result;
return retval;
}
/*=========================================================================
** validator1.nestedStructTest
**=========================================================================
@ -284,15 +294,17 @@ moderate_array(xmlrpc_env * const envP,
static xmlrpc_value *
nested_struct(xmlrpc_env * const envP,
xmlrpc_value * const param_array,
xmlrpc_value * const paramArrayP,
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) {
xmlrpc_decompose_value(envP, paramArrayP, "(S)", &yearsP);
if (envP->fault_occurred)
retval = NULL;
else {
/* Get values of larry, moe and curly for 2000-04-01. */
xmlrpc_int32 larry, moe, curly;
xmlrpc_decompose_value(envP, yearsP,
@ -301,36 +313,41 @@ nested_struct(xmlrpc_env * const envP,
"larry", &larry,
"moe", &moe,
"curly", &curly);
if (!envP->fault_occurred)
if (envP->fault_occurred)
retval = NULL;
else
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,
struct_return(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
void * const user_data ATTR_UNUSED) {
xmlrpc_int32 i;
xmlrpc_decompose_value(env, param_array, "(i)", &i);
RETURN_IF_FAULT(env);
xmlrpc_decompose_value(envP, paramArrayP, "(i)", &i);
RETURN_IF_FAULT(envP);
return xmlrpc_build_value(env, "{s:i,s:i,s:i}",
return xmlrpc_build_value(envP, "{s:i,s:i,s:i}",
"times10", (xmlrpc_int32) i * 10,
"times100", (xmlrpc_int32) i * 100,
"times1000", (xmlrpc_int32) i * 1000);
}
/*=========================================================================
** main
**=========================================================================

View File

@ -0,0 +1,102 @@
/* A simple standalone XML-RPC server written in C as an example of use of
the Xmlrpc-c libraries.
This example expects an already bound socket on Standard Input, ready to
be listened on for client connections. Also see xmlrpc_sample_add_server,
which is the same thing, except you tell it a TCP port number and it
creates the socket itself. Also see xmlrpc_inetd_server.c, which is
the same thing except you give it a socket which is already connected
to a client.
*/
#include <stdlib.h>
#include <stdio.h>
#ifdef WIN32
# include <windows.h>
#else
# include <unistd.h>
#endif
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/server.h>
#include <xmlrpc-c/server_abyss.h>
#include "config.h" /* information about this build environment */
#ifdef WIN32
#define SLEEP(seconds) SleepEx(seconds * 1000, 1);
#else
#define SLEEP(seconds) sleep(seconds);
#endif
static xmlrpc_value *
sample_add(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
void * const user_data ATTR_UNUSED) {
xmlrpc_int32 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;
/* Sometimes, make it look hard (so client can see what it's like
to do an RPC that takes a while).
*/
if (y == 1)
SLEEP(2);
/* Return our result. */
return xmlrpc_build_value(envP, "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 != 0) {
fprintf(stderr, "There are no arguments. You must supply a "
"bound socket on which to listen for client connections "
"as Standard Input\n");
if (argv) {} /* silence unused parameter warning */
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.log_file_name = "/tmp/xmlrpc_log";
serverparm.keepalive_timeout = 0;
serverparm.keepalive_max_conn = 0;
serverparm.timeout = 0;
serverparm.dont_advertise = FALSE;
serverparm.socket_bound = TRUE;
serverparm.socket_handle = STDIN_FILENO;
printf("Running XML-RPC server...\n");
xmlrpc_server_abyss(&env, &serverparm, XMLRPC_APSIZE(socket_handle));
return 0;
}

View File

@ -1,60 +1,146 @@
ifeq ($(SRCDIR)x,x)
SRCDIR = $(CURDIR)/..
ifeq ($(SRCDIR),)
updir = $(shell echo $(dir $(1)) | sed 's/.$$//')
SRCDIR := $(call updir,$(CURDIR))
BLDDIR := $(SRCDIR)
endif
SUBDIR = src
BUILDDIR = $(SRCDIR)
VPATH = .:$(SRCDIR)
SUBDIR := include
include $(BUILDDIR)/Makefile.config
include $(BLDDIR)/config.mk
default: all
all: xmlrpc-c/config.h
xmlrpc-c/config.h: $(BLDDIR)/$(SUBDIR)/xmlrpc-c
>$@
@echo "Lots of echoes to '$@' suppressed here ..."
@echo '#ifndef XMLRPC_C_CONFIG_H_INCLUDED' >>$@
@echo '#define XMLRPC_C_CONFIG_H_INCLUDED' >>$@
@echo '' >>$@
@echo '/* This file, part of XML-RPC For C/C++, is meant to ' >>$@
@echo ' define characteristics of this particular installation '>>$@
@echo ' that the other <xmlrpc-c/...> header files need in ' >>$@
@echo ' order to compile correctly when #included in Xmlrpc-c' >>$@
@echo ' user code.' >>$@
@echo '' >>$@
@echo ' Those header files #include this one.' >>$@
@echo '' >>$@
@echo ' This file was created by a make rule.' >>$@
@echo '*/' >>$@
@echo '#define XMLRPC_HAVE_WCHAR $(HAVE_WCHAR_H_DEFINE)' >>$@
@echo '#ifdef WIN32' >>$@
@echo ' /* SOCKET is a type defined by <winsock.h>. Anyone who' >>$@
@echo ' uses XMLRPC_SOCKET on a WIN32 system must #include' >>$@
@echo ' <winsock.h>' >>$@
@echo ' */' >>$@
@echo ' #define XMLRPC_SOCKET SOCKET' >>$@
@echo ' #define XMLRPC_HAVE_TIMEVAL 0' >>$@
@echo ' #define XMLRPC_HAVE_TIMESPEC 0' >>$@
@echo '#else' >>$@
@echo ' #define XMLRPC_SOCKET int' >>$@
@echo ' #define XMLRPC_HAVE_TIMEVAL 1' >>$@
@echo ' #define XMLRPC_HAVE_TIMESPEC 1' >>$@
@echo '#endif' >>$@
@echo '' >>$@
@echo '#if defined(_MSC_VER)' >>$@
@echo ' /* Newer MSVC has long long, but MSVC 6 does not */' >>$@
@echo ' #define XMLRPC_INT64 __int64' >>$@
@echo ' #define XMLRPC_INT32 __int32' >>$@
@echo '#else' >>$@
@echo ' #define XMLRPC_INT64 long long' >>$@
@echo ' #define XMLRPC_INT32 int' >>$@
@echo '#endif' >>$@
@echo '#endif' >>$@
$(BLDDIR)/$(SUBDIR)/xmlrpc-c:
mkdir $@
COMPAT_LINK_CMDS = \
$(LN_S) xmlrpc-c/oldxmlrpc.h xmlrpc.h; \
$(LN_S) xmlrpc-c/server.h xmlrpc_server.h; \
$(LN_S) xmlrpc-c/server_abyss.h xmlrpc_server_abyss.h; \
$(LN_S) xmlrpc-c/server_w32httpsys.h xmlrpc_server_w32httpsys.h; \
HEADERS_TO_INSTALL = \
xmlrpc-c/oldxmlrpc.h \
xmlrpc-c/config.h \
xmlrpc-c/inttypes.h \
xmlrpc-c/c_util.h \
xmlrpc-c/util.h \
xmlrpc-c/base.h \
xmlrpc-c/abyss.h \
xmlrpc-c/abyss_unixsock.h \
xmlrpc-c/abyss_winsock.h \
xmlrpc-c/server.h \
xmlrpc-c/server_abyss.h \
xmlrpc-c/server_w32httpsys.h \
xmlrpc-c/oldxmlrpc.h \
ifeq ($(ENABLE_CPLUSPLUS),yes)
HEADERS_TO_INSTALL += \
xmlrpc-c/oldcppwrapper.hpp \
xmlrpc-c/girerr.hpp \
xmlrpc-c/girmem.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\
xmlrpc-c/server_abyss.hpp \
xmlrpc-c/packetsocket.hpp \
xmlrpc-c/server_pstream.hpp \
COMPAT_LINK_CMDS += $(LN_S) xmlrpc-c/oldcppwrapper.hpp XmlRpcCpp.h;
endif
HEADERINST_PREFIX = /xmlrpc-c
ifeq ($(MUST_BUILD_CLIENT),yes)
HEADERS_TO_INSTALL += \
xmlrpc-c/client.h \
xmlrpc-c/transport.h \
xmlrpc-c/client_global.h \
COMPAT_LINK_CMDS += $(LN_S) xmlrpc-c/client.h xmlrpc_client.h;
ifeq ($(ENABLE_CPLUSPLUS),yes)
HEADERS_TO_INSTALL += xmlrpc-c/client.hpp xmlrpc-c/client_simple.hpp
HEADERS_TO_INSTALL += \
xmlrpc-c/client.hpp \
xmlrpc-c/client_transport.hpp \
xmlrpc-c/client_simple.hpp \
endif
endif
ifeq ($(ENABLE_CGI_SERVER),yes)
HEADERS_TO_INSTALL += xmlrpc-c/server_cgi.h
COMPAT_LINK_CMDS += $(LN_S) xmlrpc-c/server_cgi.h xmlrpc_cgi.h;
endif
default: all
all:
.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; \
$(COMPAT_LINK_CMDS)
.PHONY: install
install: install-common
install: install-common install-compat-hdr
.PHONY: clean distclean dep
clean:
distclean:
rm -f xmlrpc-c/config.h
.PHONY: check
check:
.PHONY: dep
dep:
include $(SRCDIR)/Makefile.common
OMIT_CONFIG_H_RULE = Y
include $(SRCDIR)/common.mk

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
/* This is just a sub-file for abyss.h */
#include <sys/socket.h>
struct abyss_openssl_chaninfo {
/* TODO: figure out useful information to put in here.
Maybe client IP address and port. Maybe authenticated host name.
Maybe authentication level.
Maybe a certificate.
*/
int dummy;
};
void
ChanSwitchOpensslCreate(unsigned short const portNumber,
TChanSwitch ** const chanSwitchPP,
const char ** const errorP);
void
ChanSwitchOpensslCreateFd(int const fd,
TChanSwitch ** const chanSwitchPP,
const char ** const errorP);
void
ChannelOpensslCreateSsl(SSL * const sslP,
TChannel ** const channelPP,
struct abyss_openssl_chaninfo ** const channelInfoPP,
const char ** const errorP);

View File

@ -0,0 +1,42 @@
/* This is just a sub-file for abyss.h */
#include <sys/socket.h>
struct abyss_unix_chaninfo {
size_t peerAddrLen;
struct sockaddr peerAddr;
};
void
ChanSwitchUnixCreate(unsigned short const portNumber,
TChanSwitch ** const chanSwitchPP,
const char ** const errorP);
void
ChanSwitchUnixCreateFd(int const fd,
TChanSwitch ** const chanSwitchPP,
const char ** const errorP);
void
ChannelUnixCreateFd(int const fd,
TChannel ** const channelPP,
struct abyss_unix_chaninfo ** const channelInfoPP,
const char ** const errorP);
void
ChannelUnixGetPeerName(TChannel * const channelP,
struct sockaddr ** const sockaddrPP,
size_t * const sockaddrLenP,
const char ** const errorP);
void
SocketUnixCreateFd(int const fd,
TSocket ** const socketPP);
typedef int TOsSocket;
/* TOsSocket is the type of a conventional socket offered by our OS.
This is for backward compatibility; everyone should use TChanSwitch
and TChannel instead today.
*/

View File

@ -0,0 +1,27 @@
/* This is just a sub-file for abyss.h */
#include <winsock.h>
struct abyss_win_chaninfo {
size_t peerAddrLen;
struct sockaddr peerAddr;
};
void
ChanSwitchWinCreate(unsigned short const portNumber,
TChanSwitch ** const chanSwitchPP,
const char ** const errorP);
void
ChanSwitchWinCreateWinsock(SOCKET const winsock,
TChanSwitch ** const chanSwitchPP,
const char ** const errorP);
void
ChannelWinCreateWinsock(SOCKET const fd,
TChannel ** const channelPP,
struct abyss_win_chaninfo ** const channelInfoPP,
const char ** const errorP);
typedef SOCKET TOsSocket;

View File

@ -6,8 +6,11 @@
#include <stddef.h>
#include <stdarg.h>
#include <time.h>
#include <xmlrpc-c/util.h>
#include <xmlrpc-c/config.h>
/* Defines XMLRPC_HAVE_WCHAR, XMLRPC_INT64 */
#ifdef HAVE_UNICODE_WCHAR
#if XMLRPC_HAVE_WCHAR
#include <wchar.h>
#endif
@ -17,16 +20,26 @@ extern "C" {
/*=========================================================================
** Typedefs
**=========================================================================
** We define names for these types, because they may change from platform
** to platform.
** Version of libxmlrpc
**=======================================================================*/
extern unsigned int const xmlrpc_version_major;
extern unsigned int const xmlrpc_version_minor;
extern unsigned int const xmlrpc_version_point;
/*=========================================================================
** C types equivalent to XML-RPC types
**=======================================================================*/
/* 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 XMLRPC_INT32 xmlrpc_int32;
/* An integer of the type defined by XML-RPC <i4>; i.e. 32 bit */
typedef XMLRPC_INT64 xmlrpc_int64;
/* An integer of the type defined by "XML-RPC" <i8>; i.e. 64 bit */
typedef int xmlrpc_bool;
/* A boolean (of the type defined by XML-RPC <boolean>, but there's
really only one kind)
@ -38,296 +51,19 @@ typedef double xmlrpc_double;
for mathematical completeness.
*/
#define XMLRPC_INT32_MAX (2147483647)
/* xmlrpc_socket is just for backward compatibility, in case someone decided
to use this in user code. New code should use the native type for a
socket (e.g. int or SOCKET). (We stopped using this because for winsock
users, we would have to #include <winsock.h> in every file that
#includes <xmlrpc-c/base.h> and we don't want that).
*/
typedef int xmlrpc_socket;
#define XMLRPC_INT32_MAX 0x7fffffff
#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)
#define XMLRPC_INT64_MAX 0x7fffffffffffffffll
#define XMLRPC_INT64_MIN (-XMLRPC_INT64_MAX - 1)
/*=========================================================================
@ -337,22 +73,28 @@ void xmlrpc_mem_block_append
*/
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_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_I8 = 10,
XMLRPC_TYPE_DEAD = 0xDEAD
} xmlrpc_type;
#define XMLRPC_HAVE_I8 1
/* These are *always* allocated on the heap. No exceptions. */
typedef struct _xmlrpc_value xmlrpc_value;
const char *
xmlrpc_type_name(xmlrpc_type const type);
void
xmlrpc_abort_if_array_bad(xmlrpc_value * const arrayP);
@ -360,19 +102,23 @@ xmlrpc_abort_if_array_bad(xmlrpc_value * const arrayP);
xmlrpc_abort_if_array_bad(val)
/* Increment the reference count of an xmlrpc_value. */
extern void xmlrpc_INCREF (xmlrpc_value* value);
extern void xmlrpc_INCREF (xmlrpc_value* const value);
/* Decrement the reference count of an xmlrpc_value. If there
** are no more references, free it. */
extern void xmlrpc_DECREF (xmlrpc_value* value);
extern void xmlrpc_DECREF (xmlrpc_value* const value);
/* Get the type of an XML-RPC value. */
extern xmlrpc_type xmlrpc_value_type (xmlrpc_value* value);
extern xmlrpc_type xmlrpc_value_type (xmlrpc_value* const value);
xmlrpc_value *
xmlrpc_int_new(xmlrpc_env * const envP,
int const intValue);
xmlrpc_value *
xmlrpc_i8_new(xmlrpc_env * const envP,
xmlrpc_int64 const value);
void
xmlrpc_read_int(xmlrpc_env * const envP,
const xmlrpc_value * const valueP,
@ -423,19 +169,49 @@ xmlrpc_string_new_lp(xmlrpc_env * const envP,
size_t const length,
const char * const stringValue);
xmlrpc_value *
xmlrpc_string_new_va(xmlrpc_env * const envP,
const char * const format,
va_list args);
xmlrpc_value *
xmlrpc_string_new_f(xmlrpc_env * const envP,
const char * const format,
...);
xmlrpc_value *
xmlrpc_string_new_lp_cr(xmlrpc_env * const envP,
size_t const length,
const char * const value);
xmlrpc_value *
xmlrpc_string_new_cr(xmlrpc_env * const envP,
const char * const value);
void
xmlrpc_read_string(xmlrpc_env * const envP,
const xmlrpc_value * const valueP,
const char ** const stringValueP);
void
xmlrpc_read_string_crlf(xmlrpc_env * const envP,
const xmlrpc_value * const valueP,
const char ** const stringValueP);
void
xmlrpc_read_string_lp_crlf(xmlrpc_env * const envP,
const xmlrpc_value * const valueP,
size_t * const lengthP,
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
#if XMLRPC_HAVE_WCHAR
xmlrpc_value *
xmlrpc_string_w_new(xmlrpc_env * const envP,
const wchar_t * const stringValue);
@ -450,12 +226,33 @@ xmlrpc_read_string_w(xmlrpc_env * const envP,
xmlrpc_value * const valueP,
const wchar_t ** const stringValueP);
void
xmlrpc_read_string_w_crlf(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
void
xmlrpc_read_string_w_lp_crlf(xmlrpc_env * const envP,
xmlrpc_value * const valueP,
size_t * const lengthP,
const wchar_t ** const stringValueP);
xmlrpc_value *
xmlrpc_string_w_new_lp_cr(xmlrpc_env * const envP,
size_t const length,
const wchar_t * const value);
xmlrpc_value *
xmlrpc_string_w_new_cr(xmlrpc_env * const envP,
const wchar_t * const value);
#endif /* XMLRPC_HAVE_WCHAR */
xmlrpc_value *
xmlrpc_base64_new(xmlrpc_env * const envP,
@ -485,9 +282,9 @@ xmlrpc_array_size(xmlrpc_env * const env,
/* 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);
xmlrpc_array_append_item (xmlrpc_env * const envP,
xmlrpc_value * const arrayP,
xmlrpc_value * const valueP);
void
xmlrpc_array_read_item(xmlrpc_env * const envP,
@ -515,18 +312,8 @@ 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);
xmlrpc_struct_new(xmlrpc_env * const env);
/* Return the number of key/value pairs in a struct.
** Sets XMLRPC_TYPE_ERROR if 'strct' is not a struct. */
@ -573,18 +360,18 @@ xmlrpc_struct_find_value_v(xmlrpc_env * const envP,
xmlrpc_value * const keyP,
xmlrpc_value ** const valuePP);
void
xmlrpc_struct_read_value(xmlrpc_env * const envP,
xmlrpc_value * const structP,
const char * const key,
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.
*/
@ -650,11 +437,27 @@ xmlrpc_struct_read_member(xmlrpc_env * const envP,
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_struct_get_key_and_value(xmlrpc_env * const env,
xmlrpc_value * const strct,
int const index,
xmlrpc_value ** const out_keyval,
xmlrpc_value ** const out_value);
void
xmlrpc_read_cptr(xmlrpc_env * const envP,
const xmlrpc_value * const valueP,
void ** const ptrValueP);
void
xmlrpc_read_nil(xmlrpc_env * const envP,
xmlrpc_value * const valueP);
void
xmlrpc_read_i8(xmlrpc_env * const envP,
const xmlrpc_value * const valueP,
xmlrpc_int64 * const intValueP);
xmlrpc_value *
xmlrpc_cptr_new(xmlrpc_env * const envP,
@ -675,7 +478,7 @@ xmlrpc_build_value(xmlrpc_env * const env,
void
xmlrpc_build_value_va(xmlrpc_env * const env,
const char * const format,
va_list args,
va_list const args,
xmlrpc_value ** const valPP,
const char ** const tailP);
@ -689,7 +492,7 @@ void
xmlrpc_decompose_value_va(xmlrpc_env * const envP,
xmlrpc_value * const value,
const char * const format,
va_list args);
va_list const 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
@ -709,44 +512,67 @@ void
xmlrpc_parse_value_va(xmlrpc_env * const envP,
xmlrpc_value * const value,
const char * const format,
va_list args);
va_list const 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);
typedef enum xmlrpc_dialect {
xmlrpc_dialect_i8,
xmlrpc_dialect_apache
} xmlrpc_dialect;
/* 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);
xmlrpc_serialize_value2(xmlrpc_env * const envP,
xmlrpc_mem_block * const outputP,
xmlrpc_value * const valueP,
xmlrpc_dialect const dialect);
/* Serialize an XML-RPC return value. */
extern void
xmlrpc_serialize_response(xmlrpc_env * env,
xmlrpc_mem_block * output,
xmlrpc_value * value);
void
xmlrpc_serialize_value(xmlrpc_env * const envP,
xmlrpc_mem_block * const outputP,
xmlrpc_value * const valueP);
/* Serialize an XML-RPC fault (as specified by 'fault'). */
extern void
xmlrpc_serialize_fault(xmlrpc_env * env,
xmlrpc_mem_block * output,
xmlrpc_env * fault);
void
xmlrpc_serialize_params2(xmlrpc_env * const envP,
xmlrpc_mem_block * const outputP,
xmlrpc_value * const paramArrayP,
xmlrpc_dialect const dialect);
void
xmlrpc_serialize_params(xmlrpc_env * const envP,
xmlrpc_mem_block * const outputP,
xmlrpc_value * const paramArrayP);
void
xmlrpc_serialize_call2(xmlrpc_env * const envP,
xmlrpc_mem_block * const outputP,
const char * const methodName,
xmlrpc_value * const paramArrayP,
xmlrpc_dialect const dialect);
void
xmlrpc_serialize_call(xmlrpc_env * const envP,
xmlrpc_mem_block * const outputP,
const char * const methodName,
xmlrpc_value * const paramArrayP);
void
xmlrpc_serialize_response2(xmlrpc_env * const envP,
xmlrpc_mem_block * const outputP,
xmlrpc_value * const valueP,
xmlrpc_dialect const dialect);
void
xmlrpc_serialize_response(xmlrpc_env * const envP,
xmlrpc_mem_block * const outputP,
xmlrpc_value * const valueP);
void
xmlrpc_serialize_fault(xmlrpc_env * const envP,
xmlrpc_mem_block * const outputP,
const xmlrpc_env * const faultP);
/*=========================================================================
@ -764,13 +590,21 @@ xmlrpc_parse_call(xmlrpc_env * const envP,
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). */
void
xmlrpc_parse_response2(xmlrpc_env * const envP,
const char * const xmlData,
size_t const xmlDataLen,
xmlrpc_value ** const resultPP,
int * const faultCodeP,
const char ** const faultStringP);
/* xmlrpc_parse_response() is for backward compatibility */
xmlrpc_value *
xmlrpc_parse_response(xmlrpc_env * env,
const char * xml_data,
size_t xml_len);
xmlrpc_parse_response(xmlrpc_env * const envP,
const char * const xmlData,
size_t const xmlDataLen);
/*=========================================================================
@ -801,42 +635,6 @@ xmlrpc_base64_decode(xmlrpc_env * const envP,
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
**=========================================================================
@ -847,12 +645,44 @@ xmlrpc_wcs_to_utf8(xmlrpc_env * env,
** a cookie replacement of basic authentication.)
**/
extern void xmlrpc_authcookie_set(xmlrpc_env * env,
const char * username,
const char * password);
extern void xmlrpc_authcookie_set(xmlrpc_env * const env,
const char * const username,
const char * const password);
char *xmlrpc_authcookie(void);
/*=========================================================================
Resource Limits
Ideally, there would be enough resource limits to ensure that
XML-RPC partners cannot cause libxmlrpc objects and routines to use
more resource than is available for them (either by accident or
malice). We have a long way to go to get there.
=========================================================================*/
/* These functions are _not_ re-entrant and the limits are per-process
(i.e. their values live in static global variables).
*/
/* 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 const limit_id, size_t const value);
/* Get the value of a specified limit. */
extern size_t xmlrpc_limit_get (int const limit_id);
#ifdef __cplusplus
}
#endif

View File

@ -1,5 +1,5 @@
#ifndef XMLRPC_HPP_INCLUDED
#define XMLRPC_HPP_INCLUDED
#ifndef XMLRPC_BASE_HPP_INCLUDED
#define XMLRPC_BASE_HPP_INCLUDED
#include <climits>
#include <cfloat>
@ -8,7 +8,7 @@
#include <map>
#include <string>
#include "xmlrpc-c/base.h"
#include <xmlrpc-c/base.h>
namespace xmlrpc_c {
@ -36,6 +36,7 @@ public:
TYPE_STRUCT = 7,
TYPE_C_PTR = 8,
TYPE_NIL = 9,
TYPE_I8 = 10,
TYPE_DEAD = 0xDEAD
};
@ -44,6 +45,9 @@ public:
xmlrpc_c::value&
operator=(xmlrpc_c::value const&);
bool
isInstantiated() 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
@ -54,7 +58,7 @@ public:
void
addToCStruct(xmlrpc_value * const structP,
std::string const key) const;
std::string const key) const;
xmlrpc_value *
cValue() const;
@ -63,7 +67,7 @@ public:
void
instantiate(xmlrpc_value * const valueP);
// Work only on a placeholder object created by the no-argument
// Works only on a placeholder object created by the no-argument
// constructor.
xmlrpc_value * cValueP;
@ -96,10 +100,18 @@ public:
class value_string : public value {
public:
value_string(std::string const& cvalue);
enum nlCode {nlCode_all, nlCode_lf};
value_string(std::string const& cppvalue,
nlCode const nlCode);
value_string(std::string const& cppvalue);
value_string(xmlrpc_c::value const baseValue);
std::string
crlfValue() const;
operator std::string() const;
};
@ -120,8 +132,12 @@ class value_datetime : public value {
public:
value_datetime(std::string const cvalue);
value_datetime(time_t const cvalue);
#if XMLRPC_HAVE_TIMEVAL
value_datetime(struct timeval const& cvalue);
#endif
#if XMLRPC_HAVE_TIMESPEC
value_datetime(struct timespec const& cvalue);
#endif
value_datetime(xmlrpc_c::value const baseValue);
@ -147,15 +163,6 @@ public:
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);
@ -182,6 +189,26 @@ public:
class value_nil : public value {
public:
value_nil();
value_nil(xmlrpc_c::value const baseValue);
};
class value_i8 : public value {
public:
value_i8(xmlrpc_int64 const cvalue);
value_i8(xmlrpc_c::value const baseValue);
operator xmlrpc_int64() const;
};
class fault {
/*----------------------------------------------------------------------------
This is an XML-RPC fault.
@ -255,9 +282,12 @@ class paramList {
public:
paramList(unsigned int const paramCount = 0);
void
paramList&
add(xmlrpc_c::value const param);
paramList&
addx(xmlrpc_c::value const param);
unsigned int
size() const;
@ -300,6 +330,11 @@ public:
void
getNil(unsigned int const paramNumber) const;
xmlrpc_int64
getI8(unsigned int const paramNumber,
xmlrpc_int64 const minimum = XMLRPC_INT64_MIN,
xmlrpc_int64 const maximum = XMLRPC_INT64_MAX) const;
void
verifyEnd(unsigned int const paramNumber) const;

View File

@ -0,0 +1,25 @@
#ifndef XMLRPC_BASE64_HPP_INCLUDED
#define XMLRPC_BASE64_HPP_INCLUDED
#include <string>
#include <vector>
namespace xmlrpc_c {
enum newlineCtl {NEWLINE_NO, NEWLINE_YES};
std::string
base64FromBytes(
std::vector<unsigned char> const& bytes,
xmlrpc_c::newlineCtl const newlineCtl = xmlrpc_c::NEWLINE_YES);
std::vector<unsigned char>
bytesFromBase64(std::string const& base64);
} // namespace
#endif

View File

@ -1,5 +1,5 @@
/*============================================================================
xmlrpc_client_int.h
base_int.h
==============================================================================
This header file defines the interface between modules inside
xmlrpc-c.
@ -11,12 +11,19 @@
============================================================================*/
#ifndef XMLRPC_INT_H_INCLUDED
#define XMLRPC_INT_H_INCLUDED
#ifndef XMLRPC_C_BASE_INT_H_INCLUDED
#define XMLRPC_C_BASE_INT_H_INCLUDED
#include "xmlrpc_config.h"
#include "bool.h"
#include "int.h"
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/util_int.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
struct _xmlrpc_value {
@ -26,20 +33,37 @@ struct _xmlrpc_value {
/* Certain data types store their data directly in the xmlrpc_value. */
union {
xmlrpc_int32 i;
xmlrpc_int64 i8;
xmlrpc_bool b;
double d;
/* time_t t */
void *c_ptr;
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.
For a string, this is the characters of the lines of the string
in UTF-8, with lines delimited by either CR, LF, or CRLF, plus
a NUL added to the end. The characters of the lines may be any
character representable in UTF-8, even the ones that are not
legal XML (XML doesn't allow ASCII control characters except
tab, CR, LF). But note that a line can't contain CR or LF
because that would form a line delimiter. To disambiguate:
CRLF together is always one line delimiter.
This format for string is quite convenient because it is also
the format of that part of an XML document which is the
contents of a <string> element (except of course that for the
non-XML characters, we have to stretch the definition of XML).
For base64, this is bytes of the byte string, directly.
For datetime, this is in the same format as the contents of
a <dateTime.iso8601> XML element. That really ought to be changed
to time_t some day.
*/
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,
@ -49,8 +73,10 @@ struct _xmlrpc_value {
redundant with _block.
This member is always NULL when the data type is not string.
This member is always NULL on a system that does not have
Unicode wchar functions.
*/
#endif
};
#define XMLRPC_ASSERT_VALUE_OK(val) \
@ -65,9 +91,9 @@ struct _xmlrpc_value {
typedef struct {
unsigned char key_hash;
xmlrpc_value *key;
xmlrpc_value *value;
uint32_t keyHash;
xmlrpc_value * key;
xmlrpc_value * value;
} _struct_member;
@ -78,38 +104,20 @@ xmlrpc_createXmlrpcValue(xmlrpc_env * const envP,
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_destroyString(xmlrpc_value * const stringP);
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,
@ -138,7 +146,7 @@ xmlrpc_read_string_lp_old(xmlrpc_env * const envP,
size_t * const lengthP,
const char ** const stringValueP);
#ifdef HAVE_UNICODE_WCHAR
#if XMLRPC_HAVE_WCHAR
void
xmlrpc_read_string_w_old(xmlrpc_env * const envP,
xmlrpc_value * const valueP,
@ -185,6 +193,6 @@ xmlrpc_read_base64_old(xmlrpc_env * const envP,
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif

View File

@ -0,0 +1,14 @@
#ifndef XMLRPC_C_C_UTIL_H_INCLUDED
#define XMLRPC_C_C_UTIL_H_INCLUDED
/* GNU_PRINTF_ATTR lets the GNU compiler check printf-type
calls to be sure the arguments match the format string, thus preventing
runtime segmentation faults and incorrect messages.
*/
#ifdef __GNUC__
#define GNU_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b)))
#else
#define GNU_PRINTF_ATTR(a,b)
#endif
#endif

View File

@ -16,33 +16,61 @@
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.
struct xmlrpc_client;
struct xmlrpc_client_transport;
struct xmlrpc_client_transport_ops;
#ifndef __cplusplus
typedef struct xmlrpc_client xmlrpc_client;
typedef struct xmlrpc_client_transport xmlrpc_client_transport;
typedef struct xmlrpc_client_transport_ops xmlrpc_client_transport_ops;
#endif
/* libxmlrpc_client typically does _not_ actually include all of the
XML transports declared here by xmlrpc_*_transport_ops.
Use 'xmlrpc-c-config --features' to determine which features are
installed.
*/
#define XMLRPC_CLIENT_NO_FLAGS (0)
#define XMLRPC_CLIENT_SKIP_LIBWWW_INIT (1)
/* Before Xmlrpc-c 1.13 (December 2007), we declared struct
xmlrpc_xportparms, as a sort of "base class." The struct was never
complete -- you just cast pointer to it it to pointers to other
types. It turned out not to be really helpful and casts are ugly,
so now we just use void * as a base class pointer.
*/
extern void
xmlrpc_client_init(int const flags,
const char * const appname,
const char * const appversion);
extern struct xmlrpc_client_transport_ops xmlrpc_libwww_transport_ops;
extern struct xmlrpc_client_transport_ops xmlrpc_wininet_transport_ops;
extern struct xmlrpc_client_transport_ops xmlrpc_curl_transport_ops;
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.
*/
enum xmlrpc_sslversion {
XMLRPC_SSLVERSION_DEFAULT,
XMLRPC_SSLVERSION_TLSv1,
XMLRPC_SSLVERSION_SSLv2,
XMLRPC_SSLVERSION_SSLv3
};
struct xmlrpc_curl_xportparms {
/* This is designed so that zero values are always the defaults. */
const char * network_interface;
xmlrpc_bool no_ssl_verifypeer;
xmlrpc_bool no_ssl_verifyhost;
const char * user_agent;
const char * ssl_cert;
const char * sslcerttype;
const char * sslcertpasswd;
const char * sslkey;
const char * sslkeytype;
const char * sslkeypasswd;
const char * sslengine;
xmlrpc_bool sslengine_default;
enum xmlrpc_sslversion sslversion;
const char * cainfo;
const char * capath;
const char * randomfile;
const char * egdsocket;
const char * ssl_cipher_list;
unsigned int timeout;
};
@ -61,10 +89,17 @@ struct xmlrpc_wininet_xportparms {
/* XMLRPC_WXPSIZE(xyz) is analogous to XMLRPC_CPSIZE, below */
struct xmlrpc_clientparms {
/* (transport, transportparmsP, transportparm_size) and
(transportOpsP, transportP) are mutually exclusive.
*/
const char * transport;
struct xmlrpc_xportparms * transportparmsP;
/* Cast a "struct ..._xportparms *" to fit here */
const void * transportparmsP;
/* This should be type "const struct ..._xportparms *" */
size_t transportparm_size;
const struct xmlrpc_client_transport_ops * transportOpsP;
xmlrpc_client_transport * transportP;
xmlrpc_dialect dialect;
};
#define XMLRPC_CPSIZE(mbrname) \
@ -77,24 +112,9 @@ struct xmlrpc_clientparms {
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
@ -112,32 +132,39 @@ typedef void (*xmlrpc_response_handler) (const char *server_url,
/*=========================================================================
** 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.)
*/
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);
xmlrpc_server_info_new(xmlrpc_env * const envP,
const char * const serverUrl);
/* 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);
xmlrpc_server_info_copy(xmlrpc_env * const envP,
xmlrpc_server_info * const srcP);
/* Delete a server info record. */
extern void
xmlrpc_server_info_free (xmlrpc_server_info *server);
void
xmlrpc_server_info_free(xmlrpc_server_info * const serverP);
void
xmlrpc_server_info_set_user(xmlrpc_env * const envP,
xmlrpc_server_info * const serverInfoP,
const char * const username,
const char * const password);
void
xmlrpc_server_info_set_basic_auth(xmlrpc_env * const envP,
@ -145,118 +172,116 @@ xmlrpc_server_info_set_basic_auth(xmlrpc_env * const envP,
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_server_info_allow_auth_basic(xmlrpc_env * const envP,
xmlrpc_server_info * const sP);
void
xmlrpc_client_transport_call(
xmlrpc_server_info_disallow_auth_basic(xmlrpc_env * const envP,
xmlrpc_server_info * const sP);
void
xmlrpc_server_info_allow_auth_digest(xmlrpc_env * const envP,
xmlrpc_server_info * const sP);
void
xmlrpc_server_info_disallow_auth_digest(xmlrpc_env * const envP,
xmlrpc_server_info * const sP);
void
xmlrpc_server_info_allow_auth_negotiate(xmlrpc_env * const envP,
xmlrpc_server_info * const sP);
void
xmlrpc_server_info_disallow_auth_negotiate(xmlrpc_env * const envP,
xmlrpc_server_info * const sP);
void
xmlrpc_server_info_allow_auth_ntlm(xmlrpc_env * const envP,
xmlrpc_server_info * const sP);
void
xmlrpc_server_info_disallow_auth_ntlm(xmlrpc_env * const envP,
xmlrpc_server_info * const sP);
extern unsigned int const xmlrpc_client_version_major;
extern unsigned int const xmlrpc_client_version_minor;
extern unsigned int const xmlrpc_client_version_point;
void
xmlrpc_client_setup_global_const(xmlrpc_env * const envP);
void
xmlrpc_client_teardown_global_const(void);
void
xmlrpc_client_create(xmlrpc_env * const envP,
int const flags,
const char * const appname,
const char * const appversion,
const struct xmlrpc_clientparms * const clientparmsP,
unsigned int const parmSize,
xmlrpc_client ** const clientPP);
void
xmlrpc_client_destroy(xmlrpc_client * const clientP);
void
xmlrpc_client_transport_call2(
xmlrpc_env * const envP,
void * const reserved, /* for client handle */
xmlrpc_client * const clientP,
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. */
xmlrpc_client_call2(xmlrpc_env * const envP,
struct xmlrpc_client * const clientP,
const xmlrpc_server_info * const serverInfoP,
const char * const methodName,
xmlrpc_value * const paramArrayP,
xmlrpc_value ** const resultPP);
void
xmlrpc_client_call2f(xmlrpc_env * const envP,
xmlrpc_client * const clientP,
const char * const serverUrl,
const char * const methodName,
xmlrpc_value ** const resultPP,
const char * const format,
...);
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.
*/
xmlrpc_client_event_loop_finish(xmlrpc_client * const clientP);
/* 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);
void
xmlrpc_client_event_loop_finish_timeout(xmlrpc_client * const clientP,
unsigned long const milliseconds);
void
xmlrpc_client_start_rpc(xmlrpc_env * const envP,
struct xmlrpc_client * const clientP,
xmlrpc_server_info * const serverInfoP,
const char * const methodName,
xmlrpc_value * const argP,
xmlrpc_response_handler responseHandler,
void * const userData);
/* Finish all outstanding asynchronous calls. */
extern void
xmlrpc_client_event_loop_finish_asynch_timeout(unsigned long milliseconds);
void
xmlrpc_client_start_rpcf(xmlrpc_env * const envP,
xmlrpc_client * const clientP,
const char * const serverUrl,
const char * const methodName,
xmlrpc_response_handler callback,
void * const userData,
const char * const format,
...);
void
xmlrpc_client_set_interrupt(xmlrpc_client * const clientP,
int * const interruptP);
#include <xmlrpc-c/client_global.h>
/* Copyright (C) 2001 by First Peer, Inc. All rights reserved.
**

View File

@ -2,33 +2,17 @@
#define CLIENT_HPP_INCLUDED
#include <string>
#include <vector>
#include <memory>
#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>
#include <xmlrpc-c/client_transport.hpp>
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 {
@ -50,13 +34,18 @@ class clientTransactionPtr : public girmem::autoObjectPtr {
public:
clientTransactionPtr();
clientTransactionPtr(clientTransaction * const transP);
virtual ~clientTransactionPtr();
virtual xmlrpc_c::clientTransaction *
operator->() const;
};
class client {
class clientPtr;
class client : public girmem::autoObject {
/*----------------------------------------------------------------------------
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.
@ -64,20 +53,71 @@ class client {
This is a base class. Derived classes define things such as that
XML and HTTP get used to perform the RPC.
-----------------------------------------------------------------------------*/
friend class clientTransactionPtr;
public:
virtual ~client();
virtual void
call(carriageParm * const carriageParmP,
std::string const methodName,
xmlrpc_c::paramList const& paramList,
xmlrpc_c::rpcOutcome * const outcomeP) = 0;
call(xmlrpc_c::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,
std::string const& methodName,
xmlrpc_c::paramList const& paramList,
xmlrpc_c::clientTransactionPtr const& tranP);
void
finishAsync(xmlrpc_c::timeout const timeout);
virtual void
setInterrupt(int *);
};
class clientPtr : public girmem::autoObjectPtr {
public:
clientPtr();
explicit clientPtr(xmlrpc_c::client * const clientP);
xmlrpc_c::client *
operator->() const;
xmlrpc_c::client *
get() const;
};
class serverAccessor : public girmem::autoObject {
public:
serverAccessor(xmlrpc_c::clientPtr const clientP,
xmlrpc_c::carriageParmPtr const carriageParmP);
void
call(std::string const& methodName,
xmlrpc_c::paramList const& paramList,
xmlrpc_c::rpcOutcome * const outcomeP) const;
private:
xmlrpc_c::clientPtr const clientP;
xmlrpc_c::carriageParmPtr const carriageParmP;
};
class serverAccessorPtr : public girmem::autoObjectPtr {
public:
serverAccessorPtr();
explicit
serverAccessorPtr(xmlrpc_c::serverAccessor * const serverAccessorP);
xmlrpc_c::serverAccessor *
operator->() const;
xmlrpc_c::serverAccessor *
get() const;
};
class connection {
@ -100,162 +140,6 @@ public:
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
@ -264,23 +148,36 @@ class client_xml : public xmlrpc_c::client {
public:
client_xml(xmlrpc_c::clientXmlTransport * const transportP);
client_xml(xmlrpc_c::clientXmlTransport * const transportP,
xmlrpc_dialect const dialect);
client_xml(xmlrpc_c::clientXmlTransportPtr const transportP);
client_xml(xmlrpc_c::clientXmlTransportPtr const transportP,
xmlrpc_dialect const dialect);
~client_xml();
void
call(carriageParm * const carriageParmP,
std::string const methodName,
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,
std::string const& methodName,
xmlrpc_c::paramList const& paramList,
xmlrpc_c::clientTransactionPtr const& tranP);
void
finishAsync(xmlrpc_c::timeout const timeout);
virtual void
setInterrupt(int * interruptP);
private:
xmlrpc_c::clientXmlTransport * transportP;
struct client_xml_impl * implP;
};
class xmlTransaction_client : public xmlrpc_c::xmlTransaction {
@ -363,32 +260,20 @@ public:
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;
struct rpc_impl * implP;
};
class rpcPtr : public clientTransactionPtr {
public:
rpcPtr();
rpcPtr(xmlrpc_c::rpc * const rpcP);
explicit rpcPtr(xmlrpc_c::rpc * const rpcP);
rpcPtr(std::string const methodName,
xmlrpc_c::paramList const& paramList);

View File

@ -0,0 +1,141 @@
#ifndef CLIENT_GLOBAL_H_INCLUDED
#define CLIENT_GLOBAL_H_INCLUDED
/*=========================================================================
** 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);
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);
/*=========================================================================
** 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 const milliseconds);
#endif

View File

@ -14,24 +14,43 @@
#ifndef XMLRPC_CLIENT_INT_H_INCLUDED
#define XMLRPC_CLIENT_INT_H_INCLUDED
#include "xmlrpc-c/util.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
struct _xmlrpc_server_info {
char *_server_url;
char *_http_basic_auth;
const char * serverUrl;
struct {
bool basic;
bool digest;
bool gssnegotiate;
bool ntlm;
} allowedAuth;
const char * userNamePw;
/* The username/password value for HTTP, i.e. in
"user:password" form
This can be NULL to indicate "none", but only if 'allowedAuth'
doesn't allow any form of authentication.
*/
const char * basicAuthHdrValue;
/* A complete value for an HTTP Authorization: header that
requests HTTP basic authentication. This exists whether
or not 'allowedAuth' allows basic authentication, and is
completely redundant with 'userNamePw'. It exists mainly
for historical reasons, and may also save some computation
when the same xmrpc_server_info is used for multiple
HTTP connections.
This is NULL exactly when 'userNamePw' is NULL.
*/
};
/* 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,

View File

@ -14,8 +14,6 @@ class clientSimple {
public:
clientSimple();
~clientSimple();
void
call(std::string const serverUrl,
std::string const methodName,
@ -35,8 +33,7 @@ public:
xmlrpc_c::value * const resultP);
private:
xmlrpc_c::client * clientP;
xmlrpc_c::clientXmlTransport * transportP;
xmlrpc_c::clientPtr clientP;
};
} // namespace

View File

@ -0,0 +1,448 @@
#ifndef CLIENT_TRANSPORT_HPP_INCLUDED
#define CLIENT_TRANSPORT_HPP_INCLUDED
#include <string>
#include <vector>
#include <xmlrpc-c/util.h>
#include <xmlrpc-c/client.h>
#include <xmlrpc-c/girerr.hpp>
#include <xmlrpc-c/girmem.hpp>
#include <xmlrpc-c/timeout.hpp>
namespace xmlrpc_c {
class carriageParmPtr;
class carriageParm : public girmem::autoObject {
/*----------------------------------------------------------------------------
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 carriageParmPtr : public girmem::autoObjectPtr {
public:
carriageParmPtr();
explicit carriageParmPtr(xmlrpc_c::carriageParm * const carriageParmP);
xmlrpc_c::carriageParm *
operator->() const;
xmlrpc_c::carriageParm *
get() const;
};
//----------------------------------------------------------------------------
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();
xmlTransactionPtr(xmlTransaction * xmlTransP);
xmlrpc_c::xmlTransaction *
operator->() const;
};
//----------------------------------------------------------------------------
class clientXmlTransport : public girmem::autoObject {
/*----------------------------------------------------------------------------
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);
virtual void
setInterrupt(int * const interruptP);
};
class clientXmlTransportPtr : public girmem::autoObjectPtr {
public:
clientXmlTransportPtr();
clientXmlTransportPtr(xmlrpc_c::clientXmlTransport * const transportP);
xmlrpc_c::clientXmlTransport *
operator->() const;
xmlrpc_c::clientXmlTransport *
get() const;
};
/*===========================================================================
HTTP
===========================================================================*/
class carriageParm_http0 : public xmlrpc_c::carriageParm {
public:
carriageParm_http0(std::string const serverUrl);
~carriageParm_http0();
void
setUser(std::string const userid,
std::string const password);
void
allowAuthBasic();
void
disallowAuthBasic();
void
allowAuthDigest();
void
disallowAuthDigest();
void
allowAuthNegotiate();
void
disallowAuthNegotiate();
void
allowAuthNtlm();
void
disallowAuthNtlm();
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 is expected to follow it up
// with an instantiate() to establish the server URL.
carriageParm_http0();
void
instantiate(std::string const serverUrl);
};
class carriageParm_http0Ptr : public xmlrpc_c::carriageParmPtr {
public:
carriageParm_http0Ptr();
carriageParm_http0Ptr(xmlrpc_c::carriageParm_http0 * const carriageParmP);
xmlrpc_c::carriageParm_http0 *
operator->() const;
};
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);
virtual void
setInterrupt(int * const interruptP);
static std::vector<std::string>
availableTypes();
static clientXmlTransportPtr
create();
protected:
clientXmlTransport_http() {} // ensure no one can create
struct xmlrpc_client_transport * c_transportP;
const struct xmlrpc_client_transport_ops * c_transportOpsP;
};
/*===========================================================================
curl
===========================================================================*/
class carriageParm_curl0 : public xmlrpc_c::carriageParm_http0 {
public:
carriageParm_curl0(std::string const serverUrl);
};
class carriageParm_curl0Ptr : public xmlrpc_c::carriageParm_http0Ptr {
public:
carriageParm_curl0Ptr();
carriageParm_curl0Ptr(xmlrpc_c::carriageParm_curl0 * const carriageParmP);
xmlrpc_c::carriageParm_curl0 *
operator->() const;
};
class clientXmlTransport_curl : public xmlrpc_c::clientXmlTransport_http {
public:
class constrOpt {
public:
constrOpt();
constrOpt & network_interface (std::string const& arg);
constrOpt & no_ssl_verifypeer (bool const& arg);
constrOpt & no_ssl_verifyhost (bool const& arg);
constrOpt & user_agent (std::string const& arg);
constrOpt & ssl_cert (std::string const& arg);
constrOpt & sslcerttype (std::string const& arg);
constrOpt & sslcertpasswd (std::string const& arg);
constrOpt & sslkey (std::string const& arg);
constrOpt & sslkeytype (std::string const& arg);
constrOpt & sslkeypasswd (std::string const& arg);
constrOpt & sslengine (std::string const& arg);
constrOpt & sslengine_default (bool const& arg);
constrOpt & sslversion (xmlrpc_sslversion const& arg);
constrOpt & cainfo (std::string const& arg);
constrOpt & capath (std::string const& arg);
constrOpt & randomfile (std::string const& arg);
constrOpt & egdsocket (std::string const& arg);
constrOpt & ssl_cipher_list (std::string const& arg);
constrOpt & timeout (unsigned int const& arg);
struct {
std::string network_interface;
bool no_ssl_verifypeer;
bool no_ssl_verifyhost;
std::string user_agent;
std::string ssl_cert;
std::string sslcerttype;
std::string sslcertpasswd;
std::string sslkey;
std::string sslkeytype;
std::string sslkeypasswd;
std::string sslengine;
bool sslengine_default;
xmlrpc_sslversion sslversion;
std::string cainfo;
std::string capath;
std::string randomfile;
std::string egdsocket;
std::string ssl_cipher_list;
unsigned int timeout;
} value;
struct {
bool network_interface;
bool no_ssl_verifypeer;
bool no_ssl_verifyhost;
bool user_agent;
bool ssl_cert;
bool sslcerttype;
bool sslcertpasswd;
bool sslkey;
bool sslkeytype;
bool sslkeypasswd;
bool sslengine;
bool sslengine_default;
bool sslversion;
bool cainfo;
bool capath;
bool randomfile;
bool egdsocket;
bool ssl_cipher_list;
bool timeout;
} present;
};
clientXmlTransport_curl(constrOpt const& opt);
clientXmlTransport_curl(std::string const networkInterface = "",
bool const noSslVerifyPeer = false,
bool const noSslVerifyHost = false,
std::string const userAgent = "");
~clientXmlTransport_curl();
private:
void
initialize(constrOpt const& opt);
};
/*===========================================================================
libwww
===========================================================================*/
class carriageParm_libwww0 : public xmlrpc_c::carriageParm_http0 {
public:
carriageParm_libwww0(std::string const serverUrl);
};
class carriageParm_libwww0Ptr : public xmlrpc_c::carriageParm_http0Ptr {
public:
carriageParm_libwww0Ptr();
carriageParm_libwww0Ptr(xmlrpc_c::carriageParm_libwww0 * const);
xmlrpc_c::carriageParm_libwww0 *
operator->() const;
};
class clientXmlTransport_libwww : public xmlrpc_c::clientXmlTransport_http {
public:
clientXmlTransport_libwww(std::string const appname = "",
std::string const appversion = "");
~clientXmlTransport_libwww();
};
/*===========================================================================
wininet
===========================================================================*/
class carriageParm_wininet0 : public xmlrpc_c::carriageParm_http0 {
public:
carriageParm_wininet0(std::string const serverUrl);
};
class carriageParm_wininet0Ptr : public xmlrpc_c::carriageParm_http0Ptr {
public:
carriageParm_wininet0Ptr();
carriageParm_wininet0Ptr(xmlrpc_c::carriageParm_wininet0 * const);
xmlrpc_c::carriageParm_wininet0 *
operator->() const;
};
class clientXmlTransport_wininet : public xmlrpc_c::clientXmlTransport_http {
public:
clientXmlTransport_wininet(bool const allowInvalidSslCerts = false);
~clientXmlTransport_wininet();
};
/*===========================================================================
pstream
===========================================================================*/
class packetSocket;
class carriageParm_pstream : public xmlrpc_c::carriageParm {
// There are no parameters for carrying an RPC on a packet stream.
// There's only one way to carry it.
};
class carriageParm_pstreamPtr : public xmlrpc_c::carriageParmPtr {
public:
carriageParm_pstreamPtr();
carriageParm_pstreamPtr(
xmlrpc_c::carriageParm_pstream * const carriageParmP);
xmlrpc_c::carriageParm_pstream *
operator->() const;
};
class clientXmlTransport_pstream : public xmlrpc_c::clientXmlTransport {
public:
class constrOpt {
public:
constrOpt();
constrOpt & fd (int const& arg);
struct {
int fd;
} value;
struct {
bool fd;
} present;
};
clientXmlTransport_pstream(constrOpt const& opt);
~clientXmlTransport_pstream();
void
call(xmlrpc_c::carriageParm * const carriageParmP,
std::string const& callXml,
std::string * const responseXmlP);
private:
packetSocket * packetSocketP;
};
} // namespace
#endif

View File

@ -21,6 +21,11 @@ private:
std::string _what;
};
// throwf() always throws a girerr::error .
void
throwf(const char * const format, ...);
} // namespace
#endif

View File

@ -19,6 +19,7 @@
# include <pthread.h>
typedef pthread_mutex_t girmem_lock;
#else
# include <windows.h>
typedef CRITICAL_SECTION girmem_lock;
#endif
@ -51,14 +52,20 @@ public:
~autoObjectPtr();
void
instantiate(girmem::autoObject * const objectP);
point(girmem::autoObject * const objectP);
void
unpoint();
autoObjectPtr
operator=(girmem::autoObjectPtr const& objectPtr);
girmem::autoObject *
operator->() const;
girmem::autoObject *
get() const;
protected:
girmem::autoObject * objectP;
};

View File

@ -0,0 +1,19 @@
#ifndef XMLRPC_INTTYPES_H_INCLUDED
#define XMLRPC_INTTYPES_H_INCLUDED
#ifdef _MSC_VER
typedef unsigned short xmlrpc_uint16_t;
typedef unsigned int xmlrpc_uint32_t;
typedef unsigned __int64 xmlrpc_uint64_t;
#else
#include <inttypes.h>
typedef uint16_t xmlrpc_uint16_t;
typedef uint32_t xmlrpc_uint32_t;
typedef uint64_t xmlrpc_uint64_t;
#endif
#endif

View File

@ -25,6 +25,7 @@
// -Bryan 2005.03.12.
#include <cstdlib>
#include <string>
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/client.h>
@ -87,7 +88,7 @@ public:
XmlRpcEnv (void) { xmlrpc_env_init(&mEnv); }
~XmlRpcEnv (void) { xmlrpc_env_clean(&mEnv); }
bool faultOccurred (void) const { return mEnv.fault_occurred; };
bool faultOccurred (void) const {return (mEnv.fault_occurred != 0);};
bool hasFaultOccurred (void) const { return faultOccurred(); };
/* hasFaultOccurred() is for backward compatibility.
faultOccurred() is a superior name for this.

View File

@ -0,0 +1,165 @@
#ifndef PACKETSOCKET_HPP_INCLUDED
#define PACKETSOCKET_HPP_INCLUDED
/*============================================================================
packetsocket
==============================================================================
This is a facility for communicating socket-style, with defined
packets like a datagram socket but with reliable delivery like a
stream socket. It's like a POSIX "sequential packet" socket, except
it is built on top of a stream socket, so it is usable on the many
systems that have stream sockets but not sequential packet sockets.
============================================================================*/
#include <sys/types.h>
#include <string>
#include <queue>
#include <xmlrpc-c/girmem.hpp>
namespace xmlrpc_c {
class packet : public girmem::autoObject {
public:
packet();
packet(const unsigned char * const data,
size_t const dataLength);
packet(const char * const data,
size_t const dataLength);
~packet();
unsigned char *
getBytes() const { return this->bytes; }
size_t
getLength() const { return this->length; }
void
addData(const unsigned char * const data,
size_t const dataLength);
private:
unsigned char * bytes; // malloc'ed
size_t length;
size_t allocSize;
void
initialize(const unsigned char * const data,
size_t const dataLength);
};
class packetPtr: public girmem::autoObjectPtr {
public:
packetPtr();
explicit packetPtr(packet * const packetP);
packet *
operator->() const;
};
class packetSocket {
/*----------------------------------------------------------------------------
This is an Internet communication vehicle that transmits individual
variable-length packets of text.
It is based on a stream socket.
It would be much better to use a kernel SOCK_SEQPACKET socket, but
Linux 2.4 does not have them.
-----------------------------------------------------------------------------*/
public:
packetSocket(int sockFd);
~packetSocket();
void
writeWait(packetPtr const& packetPtr) const;
void
read(bool * const eofP,
bool * const gotPacketP,
packetPtr * const packetPP);
void
readWait(volatile const int * const interruptP,
bool * const eofP,
bool * const gotPacketP,
packetPtr * const packetPP);
void
readWait(volatile const int * const interruptP,
bool * const eofP,
packetPtr * const packetPP);
void
readWait(bool * const eofP,
packetPtr * const packetPP);
private:
int sockFd;
// The kernel stream socket we use.
bool eof;
// The packet socket is at end-of-file for reads.
// 'readBuffer' is empty and there won't be any more data to fill
// it because the underlying stream socket is closed.
std::queue<packetPtr> readBuffer;
packetPtr packetAccumP;
// The receive packet we're currently accumulating; it will join
// 'readBuffer' when we've received the whole packet (and we've
// seen the END escape sequence so we know we've received it all).
// If we're not currently accumulating a packet (haven't seen a
// PKT escape sequence), this points to nothing.
bool inEscapeSeq;
// In our trek through the data read from the underlying stream
// socket, we are after an ESC character and before the end of the
// escape sequence. 'escAccum' shows what of the escape sequence
// we've seen so far.
bool inPacket;
// We're now receiving packet data from the underlying stream
// socket. We've seen a complete PKT escape sequence, but have not
// seen a complete END escape sequence since.
struct {
unsigned char bytes[3];
size_t len;
} escAccum;
void
bufferFinishedPacket();
void
takeSomeEscapeSeq(const unsigned char * const buffer,
size_t const length,
size_t * const bytesTakenP);
void
takeSomePacket(const unsigned char * const buffer,
size_t const length,
size_t * const bytesTakenP);
void
verifyNothingAccumulated();
void
processBytesRead(const unsigned char * const buffer,
size_t const bytesRead);
void
readFromFile();
};
} // namespace
#endif

View File

@ -32,15 +32,6 @@ public:
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;
@ -95,8 +86,6 @@ public:
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 {
@ -108,9 +97,14 @@ public:
xmlrpc_c::defaultMethod *
operator->() const;
xmlrpc_c::defaultMethod *
get() const;
};
class registry {
class registry : public girmem::autoObject {
/*----------------------------------------------------------------------------
An Xmlrpc-c server method registry. An Xmlrpc-c server transport
(e.g. an HTTP server) uses this object to process an incoming
@ -131,6 +125,20 @@ public:
void
disableIntrospection();
class shutdown {
public:
virtual ~shutdown() = 0;
virtual void
doit(std::string const& comment,
void * const callInfo) const = 0;
};
void
setShutdown(const shutdown * const shutdownP);
void
setDialect(xmlrpc_dialect const dialect);
void
processCall(std::string const& body,
@ -145,23 +153,37 @@ public:
private:
xmlrpc_registry * c_registryP;
/* Pointer to the C registry object we use to implement this
object.
*/
// 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.
*/
// 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.
*/
// 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.
};
class registryPtr : public girmem::autoObjectPtr {
public:
registryPtr();
registryPtr(xmlrpc_c::registry * const registryP);
xmlrpc_c::registry *
operator->() const;
xmlrpc_c::registry *
get() const;
};
} // namespace
#endif

View File

@ -0,0 +1,24 @@
#ifndef SELECT_INT_H_INCLUDED
#define SELECT_INT_H_INCLUDED
#ifndef WIN32
#include <sys/select.h>
#endif
#include <signal.h>
#include "xmlrpc-c/time_int.h"
#ifdef WIN32
#ifndef sigset_t
typedef int sigset_t;
#endif
#endif
int
xmlrpc_pselect(int const n,
fd_set * const readfdsP,
fd_set * const writefdsP,
fd_set * const exceptfdsP,
const xmlrpc_timespec * const timeoutP,
sigset_t * const sigmaskP);
#endif

View File

@ -9,145 +9,121 @@
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.
*/
typedef struct xmlrpc_registry xmlrpc_registry;
/* 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);
(*xmlrpc_preinvoke_method)(xmlrpc_env * const envP,
const char * const methodName,
xmlrpc_value * const paramArrayP,
void * const userData);
/* An ordinary method. */
typedef xmlrpc_value *
(*xmlrpc_method)(xmlrpc_env * env,
xmlrpc_value * param_array,
void * user_data);
(*xmlrpc_method1)(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
void * const serverInfo);
/* 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);
(*xmlrpc_method2)(xmlrpc_env * const envP,
xmlrpc_value * const paramArrayP,
void * const serverInfo,
void * const callInfo);
/* Our registry structure. This has no public members. */
typedef struct _xmlrpc_registry xmlrpc_registry;
typedef xmlrpc_method1 xmlrpc_method; /* backward compatibility */
typedef xmlrpc_value *
(*xmlrpc_default_method)(xmlrpc_env * const envP,
const char * const callInfoP,
const char * const methodName,
xmlrpc_value * const paramArrayP,
void * const serverInfo);
extern unsigned int const xmlrpc_server_version_major;
extern unsigned int const xmlrpc_server_version_minor;
extern unsigned int const xmlrpc_server_version_point;
/* Create a new method registry. */
xmlrpc_registry *
xmlrpc_registry_new(xmlrpc_env * env);
xmlrpc_registry_new(xmlrpc_env * const envP);
/* Delete a method registry. */
void
xmlrpc_registry_free(xmlrpc_registry * registry);
xmlrpc_registry_free(xmlrpc_registry * const registryP);
/* 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);
xmlrpc_registry_disable_introspection(xmlrpc_registry * const registryP);
/* 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);
xmlrpc_registry_add_method(xmlrpc_env * const envP,
xmlrpc_registry * const registryP,
const char * const host,
const char * const methodName,
xmlrpc_method const method,
void * const serverInfo);
/* 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);
xmlrpc_registry_add_method_w_doc(xmlrpc_env * const envP,
xmlrpc_registry * const registryP,
const char * const host,
const char * const methodName,
xmlrpc_method const method,
void * const serverInfo,
const char * const signatureString,
const char * const help);
void
xmlrpc_registry_add_method2(xmlrpc_env * const envP,
xmlrpc_registry * const registryP,
const char * const methodName,
xmlrpc_method2 method,
const char * const signatureString,
const char * const help,
void * const serverInfo);
void
xmlrpc_registry_set_default_method(xmlrpc_env * const envP,
xmlrpc_registry * const registryP,
xmlrpc_default_method const handler,
void * const userData);
void
xmlrpc_registry_set_preinvoke_method(xmlrpc_env * const envP,
xmlrpc_registry * const registryP,
xmlrpc_preinvoke_method const method,
void * const userData);
typedef void xmlrpc_server_shutdown_fn(xmlrpc_env * const envP,
void * const context,
const char * const comment,
void * const callInfo);
void
xmlrpc_registry_set_shutdown(xmlrpc_registry * const registryP,
xmlrpc_server_shutdown_fn * const shutdownFn,
void * const context);
void
xmlrpc_registry_set_dialect(xmlrpc_env * const envP,
xmlrpc_registry * const registryP,
xmlrpc_dialect const dialect);
/*----------------------------------------------------------------------------
Lower interface -- services to be used by an HTTP request handler
-----------------------------------------------------------------------------*/
void
xmlrpc_registry_process_call2(xmlrpc_env * const envP,
xmlrpc_registry * const registryP,
const char * const xmlData,
size_t const xmlLen,
void * const callInfo,
xmlrpc_mem_block ** const outputPP);
/* 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);
const char * const xmlData,
size_t const xmlLen);
/* 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

View File

@ -1,33 +1,43 @@
/*============================================================================
server_abyss.h
==============================================================================
This declares the user interface to libxmlrpc_server_abyss, which
provides facilities for running an XML-RPC server based on the Xmlrpc-c
Abyss HTTP server.
============================================================================*/
/* 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 WIN32
#include <winsock.h> /* For XMLRPC_SOCKET (= SOCKET) */
#endif
#include <xmlrpc-c/config.h> /* For XMLRPC_SOCKET */
#include <xmlrpc-c/abyss.h>
#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)
/*=========================================================================
** Global Initialization/Termination.
**
** These are not thread-safe. You call them at the beginning and end
** of your program, when it is only one thread.
**=======================================================================*/
void
xmlrpc_server_abyss_global_init(xmlrpc_env * const envP);
void
xmlrpc_server_abyss_global_term(void);
/*=========================================================================
** Basic Abyss Server Functions
@ -53,7 +63,11 @@ typedef struct {
unsigned int keepalive_max_conn;
unsigned int timeout;
xmlrpc_bool dont_advertise;
xmlrpc_bool socket_bound;
XMLRPC_SOCKET socket_handle;
const char * uri_path;
xmlrpc_bool chunk_response;
xmlrpc_bool enable_shutdown;
} xmlrpc_server_abyss_parms;
@ -62,23 +76,81 @@ typedef struct {
/* 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
backward compatibility, 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.
*/
/*=========================================================================
** Simple server with Abyss under the covers
**=======================================================================*/
void
xmlrpc_server_abyss(xmlrpc_env * const envP,
const xmlrpc_server_abyss_parms * const parms,
unsigned int const parm_size);
/*=========================================================================
** Object-oriented XML-RPC server with Abyss under the covers
**=======================================================================*/
typedef struct xmlrpc_server_abyss xmlrpc_server_abyss_t;
void
xmlrpc_server_abyss_set_handlers(struct _TServer * const srvP,
xmlrpc_server_abyss_create(xmlrpc_env * const envP,
const xmlrpc_server_abyss_parms * const parmsP,
unsigned int const parmSize,
xmlrpc_server_abyss_t ** const serverPP);
void
xmlrpc_server_abyss_destroy(xmlrpc_server_abyss_t * const serverP);
void
xmlrpc_server_abyss_run_server(xmlrpc_env * const envP,
xmlrpc_server_abyss_t * const serverP);
void
xmlrpc_server_abyss_terminate(xmlrpc_env * const envP,
xmlrpc_server_abyss_t * const serverP);
void
xmlrpc_server_abyss_reset_terminate(xmlrpc_env * const envP,
xmlrpc_server_abyss_t * const serverP);
void
xmlrpc_server_abyss_use_sigchld(xmlrpc_server_abyss_t * const serverP);
typedef struct xmlrpc_server_abyss_sig xmlrpc_server_abyss_sig;
void
xmlrpc_server_abyss_setup_sig(
xmlrpc_env * const envP,
xmlrpc_server_abyss_t * const serverP,
xmlrpc_server_abyss_sig ** const oldHandlersPP);
void
xmlrpc_server_abyss_restore_sig(
const xmlrpc_server_abyss_sig * const oldHandlersP);
/*=========================================================================
** Functions to make an XML-RPC server out of your own Abyss server
**=======================================================================*/
void
xmlrpc_server_abyss_set_handlers2(TServer * const srvP,
const char * const filename,
xmlrpc_registry * const registryP);
void
xmlrpc_server_abyss_set_handlers(TServer * const serverP,
xmlrpc_registry * const registryP);
void
xmlrpc_server_abyss_set_handler(xmlrpc_env * const envP,
struct _TServer * const srvP,
TServer * const serverP,
const char * const filename,
xmlrpc_registry * const registryP);
@ -109,8 +181,8 @@ xmlrpc_server_abyss_run(void);
** function.
**/
void
xmlrpc_server_abyss_run_first(void (runfirst(void *)),
void * const runfirstArg);
xmlrpc_server_abyss_run_first(runfirstFn const runfirst,
void * const runfirstArg);
/*=========================================================================
** Method Registry
@ -145,18 +217,18 @@ 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);
void xmlrpc_server_abyss_add_method (char * const method_name,
xmlrpc_method const method,
void * const 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);
xmlrpc_server_abyss_add_method_w_doc (char * const method_name,
xmlrpc_method const method,
void * const user_data,
char * const signature,
char * const help);
/*=========================================================================
** Content Handlers

View File

@ -1,5 +1,11 @@
#ifndef SERVER_ABYSS_HPP_INCLUDED
#define SERVER_ABYSS_HPP_INCLUDED
#ifdef WIN32
#include <winsock.h> // For XMLRPC_SOCKET (= SOCKET)
#endif
#include "xmlrpc-c/config.h" // For XMLRPC_SOCKET
#include "xmlrpc-c/base.hpp"
#include "abyss.h"
@ -8,6 +14,52 @@ namespace xmlrpc_c {
class serverAbyss {
public:
class constrOpt {
public:
constrOpt();
constrOpt & registryPtr (xmlrpc_c::registryPtr const& arg);
constrOpt & registryP (const xmlrpc_c::registry * const& arg);
constrOpt & socketFd (XMLRPC_SOCKET const& arg);
constrOpt & portNumber (unsigned int const& arg);
constrOpt & logFileName (std::string const& arg);
constrOpt & keepaliveTimeout (unsigned int const& arg);
constrOpt & keepaliveMaxConn (unsigned int const& arg);
constrOpt & timeout (unsigned int const& arg);
constrOpt & dontAdvertise (bool const& arg);
constrOpt & uriPath (std::string const& arg);
constrOpt & chunkResponse (bool const& arg);
struct value {
xmlrpc_c::registryPtr registryPtr;
const xmlrpc_c::registry * registryP;
XMLRPC_SOCKET socketFd;
unsigned int portNumber;
std::string logFileName;
unsigned int keepaliveTimeout;
unsigned int keepaliveMaxConn;
unsigned int timeout;
bool dontAdvertise;
std::string uriPath;
bool chunkResponse;
} value;
struct {
bool registryPtr;
bool registryP;
bool socketFd;
bool portNumber;
bool logFileName;
bool keepaliveTimeout;
bool keepaliveMaxConn;
bool timeout;
bool dontAdvertise;
bool uriPath;
bool chunkResponse;
} present;
};
serverAbyss(constrOpt const& opt);
serverAbyss(
xmlrpc_c::registry const& registry,
unsigned int const portNumber = 8080,
@ -15,32 +67,67 @@ public:
unsigned int const keepaliveTimeout = 0,
unsigned int const keepaliveMaxConn = 0,
unsigned int const timeout = 0,
bool const dontAdvertise = false
bool const dontAdvertise = false,
bool const socketBound = false,
XMLRPC_SOCKET const socketFd = 0
);
~serverAbyss();
void run();
void
run();
void
runOnce();
void
runConn(int const socketFd);
void
terminate();
class shutdown : public xmlrpc_c::registry::shutdown {
public:
shutdown(xmlrpc_c::serverAbyss * const severAbyssP);
virtual ~shutdown();
void doit(std::string const& comment, void * const callInfo) const;
private:
xmlrpc_c::serverAbyss * const serverAbyssP;
};
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;
// The user has the choice of supplying the registry by plain pointer
// (and managing the object's existence himself) or by autoObjectPtr
// (with automatic management). 'registryPtr' exists here only to
// maintain a reference count in the case that the user supplied an
// autoObjectPtr. The object doesn't reference the C++ registry
// object except during construction, because the C registry is the
// real registry.
xmlrpc_c::registryPtr registryPtr;
TServer cServer;
void
setAdditionalServerParms(constrOpt const& opt);
void
initialize(constrOpt const& opt);
};
void
server_abyss_set_handlers(TServer * const srvP,
xmlrpc_c::registry const& registry);
xmlrpc_c::registry const& registry,
std::string const& uriPath = "/RPC2");
void
server_abyss_set_handlers(TServer * const srvP,
const xmlrpc_c::registry * const registryP,
std::string const& uriPath = "/RPC2");
void
server_abyss_set_handlers(TServer * const srvP,
xmlrpc_c::registryPtr const registryPtr,
std::string const& uriPath = "/RPC2");
} // namespace

View File

@ -0,0 +1,75 @@
#ifndef SERVER_PSTREAM_HPP_INCLUDED
#define SERVER_PSTREAM_HPP_INCLUDED
#ifdef WIN32
#include <winsock.h> /* For XMLRPC_SOCKET (= SOCKET) */
#endif
#include <xmlrpc-c/config.h> /* For XMLRPC_SOCKET */
#include <xmlrpc-c/registry.hpp>
#include <xmlrpc-c/packetsocket.hpp>
namespace xmlrpc_c {
class serverPstreamConn {
public:
class constrOpt {
public:
constrOpt();
constrOpt & registryPtr (xmlrpc_c::registryPtr const& arg);
constrOpt & registryP (const xmlrpc_c::registry * const& arg);
constrOpt & socketFd (XMLRPC_SOCKET const& arg);
struct value {
xmlrpc_c::registryPtr registryPtr;
const xmlrpc_c::registry * registryP;
XMLRPC_SOCKET socketFd;
} value;
struct {
bool registryPtr;
bool registryP;
bool socketFd;
} present;
};
serverPstreamConn(constrOpt const& opt);
~serverPstreamConn();
void
runOnce(volatile const int * const interruptP,
bool * const eofP);
void
runOnce(bool * const eofP);
private:
// 'registryP' is what we actually use; 'registryHolder' just holds a
// reference to 'registryP' so the registry doesn't disappear while
// this server exists. But note that if the creator doesn't supply
// a registryPtr, 'registryHolder' is just a placeholder variable and
// the creator is responsible for making sure the registry doesn't
// go anywhere while the server exists.
registryPtr registryHolder;
const registry * registryP;
packetSocket * packetSocketP;
// The packet socket over which we received RPCs.
// This is permanently connected to our fixed client.
void
establishRegistry(constrOpt const& opt);
void
establishPacketSocket(constrOpt const& opt);
};
} // namespace
#endif

View File

@ -0,0 +1,7 @@
#ifndef SLEEP_INT_H_INCLUDED
#define SLEEP_INT_H_INCLUDED
void
xmlrpc_millisecond_sleep(unsigned int const milliseconds);
#endif

Some files were not shown because too many files have changed in this diff Show More