重构cache目录,将libxml2、libcurl放到vendor目录。
This commit is contained in:
5
cache/CMakeLists.txt
vendored
5
cache/CMakeLists.txt
vendored
@@ -0,0 +1,5 @@
|
||||
add_library(tango-cache-client src/cache_evbase_client.cpp src/ src/tango_cache_client.cpp src/ src/tango_cache_pending.cpp src/ src/tango_cache_tools.cpp src/ src/tango_cache_transfer.cpp src/ src/tango_cache_xml.cpp)
|
||||
target_link_libraries(tango-cache-client http)
|
||||
target_include_directories(tango-cache-client PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
|
||||
target_link_libraries(tango-cache-client libevent-static openssl-crypto-static openssl-ssl-static libxml2-static libcurl-static)
|
||||
target_link_libraries(tango-cache-client MESA_handle_logger MESA_htable MESA_prof_load wiredcfg)
|
||||
|
||||
24
cache/Makefile
vendored
24
cache/Makefile
vendored
@@ -1,24 +0,0 @@
|
||||
CCC=g++
|
||||
|
||||
INC_PATH=-I./include -I./include/libevent2
|
||||
CFLAGS=-Wall -g -fPIC $(INC_PATH)
|
||||
LDFLAGS =
|
||||
LIBS = -lMESA_handle_logger -lMESA_htable -lMESA_prof_load -lwiredcfg
|
||||
LIBS += -lssl -lcrypto -lcurl -levent -lxml2
|
||||
|
||||
OBJS = tango_cache_tools.o tango_cache_client.o tango_cache_transfer.o tango_cache_xml.o cache_evbase_client.o
|
||||
|
||||
TARGET_A=pangu_tango_cache.a
|
||||
|
||||
ALL:$(TARGET_A)
|
||||
|
||||
$(TARGET_A):$(OBJS)
|
||||
ar rs $@ $^
|
||||
|
||||
.cpp.o:
|
||||
$(CCC) $(CFLAGS) -c $<
|
||||
|
||||
-include $(DEPS)
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJS) $(DEPS) $(TARGET_A)
|
||||
2774
cache/include/curl/curl.h
vendored
2774
cache/include/curl/curl.h
vendored
File diff suppressed because it is too large
Load Diff
77
cache/include/curl/curlver.h
vendored
77
cache/include/curl/curlver.h
vendored
@@ -1,77 +0,0 @@
|
||||
#ifndef __CURL_CURLVER_H
|
||||
#define __CURL_CURLVER_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* This header file contains nothing but libcurl version info, generated by
|
||||
a script at release-time. This was made its own header file in 7.11.2 */
|
||||
|
||||
/* This is the global package copyright */
|
||||
#define LIBCURL_COPYRIGHT "1996 - 2018 Daniel Stenberg, <daniel@haxx.se>."
|
||||
|
||||
/* This is the version number of the libcurl package from which this header
|
||||
file origins: */
|
||||
#define LIBCURL_VERSION "7.59.0"
|
||||
|
||||
/* The numeric version number is also available "in parts" by using these
|
||||
defines: */
|
||||
#define LIBCURL_VERSION_MAJOR 7
|
||||
#define LIBCURL_VERSION_MINOR 59
|
||||
#define LIBCURL_VERSION_PATCH 0
|
||||
|
||||
/* This is the numeric version of the libcurl version number, meant for easier
|
||||
parsing and comparions by programs. The LIBCURL_VERSION_NUM define will
|
||||
always follow this syntax:
|
||||
|
||||
0xXXYYZZ
|
||||
|
||||
Where XX, YY and ZZ are the main version, release and patch numbers in
|
||||
hexadecimal (using 8 bits each). All three numbers are always represented
|
||||
using two digits. 1.2 would appear as "0x010200" while version 9.11.7
|
||||
appears as "0x090b07".
|
||||
|
||||
This 6-digit (24 bits) hexadecimal number does not show pre-release number,
|
||||
and it is always a greater number in a more recent release. It makes
|
||||
comparisons with greater than and less than work.
|
||||
|
||||
Note: This define is the full hex number and _does not_ use the
|
||||
CURL_VERSION_BITS() macro since curl's own configure script greps for it
|
||||
and needs it to contain the full number.
|
||||
*/
|
||||
#define LIBCURL_VERSION_NUM 0x073b00
|
||||
|
||||
/*
|
||||
* This is the date and time when the full source package was created. The
|
||||
* timestamp is not stored in git, as the timestamp is properly set in the
|
||||
* tarballs by the maketgz script.
|
||||
*
|
||||
* The format of the date follows this template:
|
||||
*
|
||||
* "2007-11-23"
|
||||
*/
|
||||
#define LIBCURL_TIMESTAMP "2018-03-14"
|
||||
|
||||
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|z)
|
||||
#define CURL_AT_LEAST_VERSION(x,y,z) \
|
||||
(LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))
|
||||
|
||||
#endif /* __CURL_CURLVER_H */
|
||||
102
cache/include/curl/easy.h
vendored
102
cache/include/curl/easy.h
vendored
@@ -1,102 +0,0 @@
|
||||
#ifndef __CURL_EASY_H
|
||||
#define __CURL_EASY_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
CURL_EXTERN CURL *curl_easy_init(void);
|
||||
CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
|
||||
CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
|
||||
CURL_EXTERN void curl_easy_cleanup(CURL *curl);
|
||||
|
||||
/*
|
||||
* NAME curl_easy_getinfo()
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Request internal information from the curl session with this function. The
|
||||
* third argument MUST be a pointer to a long, a pointer to a char * or a
|
||||
* pointer to a double (as the documentation describes elsewhere). The data
|
||||
* pointed to will be filled in accordingly and can be relied upon only if the
|
||||
* function returns CURLE_OK. This function is intended to get used *AFTER* a
|
||||
* performed transfer, all results from this function are undefined until the
|
||||
* transfer is completed.
|
||||
*/
|
||||
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
|
||||
|
||||
|
||||
/*
|
||||
* NAME curl_easy_duphandle()
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Creates a new curl session handle with the same options set for the handle
|
||||
* passed in. Duplicating a handle could only be a matter of cloning data and
|
||||
* options, internal state info and things like persistent connections cannot
|
||||
* be transferred. It is useful in multithreaded applications when you can run
|
||||
* curl_easy_duphandle() for each new thread to avoid a series of identical
|
||||
* curl_easy_setopt() invokes in every thread.
|
||||
*/
|
||||
CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl);
|
||||
|
||||
/*
|
||||
* NAME curl_easy_reset()
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Re-initializes a CURL handle to the default values. This puts back the
|
||||
* handle to the same state as it was in when it was just created.
|
||||
*
|
||||
* It does keep: live connections, the Session ID cache, the DNS cache and the
|
||||
* cookies.
|
||||
*/
|
||||
CURL_EXTERN void curl_easy_reset(CURL *curl);
|
||||
|
||||
/*
|
||||
* NAME curl_easy_recv()
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Receives data from the connected socket. Use after successful
|
||||
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
||||
*/
|
||||
CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
|
||||
size_t *n);
|
||||
|
||||
/*
|
||||
* NAME curl_easy_send()
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Sends data over the connected socket. Use after successful
|
||||
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
|
||||
*/
|
||||
CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
|
||||
size_t buflen, size_t *n);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
50
cache/include/curl/mprintf.h
vendored
50
cache/include/curl/mprintf.h
vendored
@@ -1,50 +0,0 @@
|
||||
#ifndef __CURL_MPRINTF_H
|
||||
#define __CURL_MPRINTF_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h> /* needed for FILE */
|
||||
#include "curl.h" /* for CURL_EXTERN */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
CURL_EXTERN int curl_mprintf(const char *format, ...);
|
||||
CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...);
|
||||
CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...);
|
||||
CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,
|
||||
const char *format, ...);
|
||||
CURL_EXTERN int curl_mvprintf(const char *format, va_list args);
|
||||
CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args);
|
||||
CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args);
|
||||
CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,
|
||||
const char *format, va_list args);
|
||||
CURL_EXTERN char *curl_maprintf(const char *format, ...);
|
||||
CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CURL_MPRINTF_H */
|
||||
441
cache/include/curl/multi.h
vendored
441
cache/include/curl/multi.h
vendored
@@ -1,441 +0,0 @@
|
||||
#ifndef __CURL_MULTI_H
|
||||
#define __CURL_MULTI_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
/*
|
||||
This is an "external" header file. Don't give away any internals here!
|
||||
|
||||
GOALS
|
||||
|
||||
o Enable a "pull" interface. The application that uses libcurl decides where
|
||||
and when to ask libcurl to get/send data.
|
||||
|
||||
o Enable multiple simultaneous transfers in the same thread without making it
|
||||
complicated for the application.
|
||||
|
||||
o Enable the application to select() on its own file descriptors and curl's
|
||||
file descriptors simultaneous easily.
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* This header file should not really need to include "curl.h" since curl.h
|
||||
* itself includes this file and we expect user applications to do #include
|
||||
* <curl/curl.h> without the need for especially including multi.h.
|
||||
*
|
||||
* For some reason we added this include here at one point, and rather than to
|
||||
* break existing (wrongly written) libcurl applications, we leave it as-is
|
||||
* but with this warning attached.
|
||||
*/
|
||||
#include "curl.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
|
||||
typedef struct Curl_multi CURLM;
|
||||
#else
|
||||
typedef void CURLM;
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or
|
||||
curl_multi_socket*() soon */
|
||||
CURLM_OK,
|
||||
CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */
|
||||
CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */
|
||||
CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */
|
||||
CURLM_INTERNAL_ERROR, /* this is a libcurl bug */
|
||||
CURLM_BAD_SOCKET, /* the passed in socket argument did not match */
|
||||
CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */
|
||||
CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was
|
||||
attempted to get added - again */
|
||||
CURLM_RECURSIVE_API_CALL, /* an api function was called from inside a
|
||||
callback */
|
||||
CURLM_LAST
|
||||
} CURLMcode;
|
||||
|
||||
/* just to make code nicer when using curl_multi_socket() you can now check
|
||||
for CURLM_CALL_MULTI_SOCKET too in the same style it works for
|
||||
curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */
|
||||
#define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM
|
||||
|
||||
/* bitmask bits for CURLMOPT_PIPELINING */
|
||||
#define CURLPIPE_NOTHING 0L
|
||||
#define CURLPIPE_HTTP1 1L
|
||||
#define CURLPIPE_MULTIPLEX 2L
|
||||
|
||||
typedef enum {
|
||||
CURLMSG_NONE, /* first, not used */
|
||||
CURLMSG_DONE, /* This easy handle has completed. 'result' contains
|
||||
the CURLcode of the transfer */
|
||||
CURLMSG_LAST /* last, not used */
|
||||
} CURLMSG;
|
||||
|
||||
struct CURLMsg {
|
||||
CURLMSG msg; /* what this message means */
|
||||
CURL *easy_handle; /* the handle it concerns */
|
||||
union {
|
||||
void *whatever; /* message-specific data */
|
||||
CURLcode result; /* return code for transfer */
|
||||
} data;
|
||||
};
|
||||
typedef struct CURLMsg CURLMsg;
|
||||
|
||||
/* Based on poll(2) structure and values.
|
||||
* We don't use pollfd and POLL* constants explicitly
|
||||
* to cover platforms without poll(). */
|
||||
#define CURL_WAIT_POLLIN 0x0001
|
||||
#define CURL_WAIT_POLLPRI 0x0002
|
||||
#define CURL_WAIT_POLLOUT 0x0004
|
||||
|
||||
struct curl_waitfd {
|
||||
curl_socket_t fd;
|
||||
short events;
|
||||
short revents; /* not supported yet */
|
||||
};
|
||||
|
||||
/*
|
||||
* Name: curl_multi_init()
|
||||
*
|
||||
* Desc: inititalize multi-style curl usage
|
||||
*
|
||||
* Returns: a new CURLM handle to use in all 'curl_multi' functions.
|
||||
*/
|
||||
CURL_EXTERN CURLM *curl_multi_init(void);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_add_handle()
|
||||
*
|
||||
* Desc: add a standard curl handle to the multi stack
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle,
|
||||
CURL *curl_handle);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_remove_handle()
|
||||
*
|
||||
* Desc: removes a curl handle from the multi stack again
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
||||
CURL *curl_handle);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_fdset()
|
||||
*
|
||||
* Desc: Ask curl for its fd_set sets. The app can use these to select() or
|
||||
* poll() on. We want curl_multi_perform() called as soon as one of
|
||||
* them are ready.
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle,
|
||||
fd_set *read_fd_set,
|
||||
fd_set *write_fd_set,
|
||||
fd_set *exc_fd_set,
|
||||
int *max_fd);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_wait()
|
||||
*
|
||||
* Desc: Poll on all fds within a CURLM set as well as any
|
||||
* additional fds passed to the function.
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle,
|
||||
struct curl_waitfd extra_fds[],
|
||||
unsigned int extra_nfds,
|
||||
int timeout_ms,
|
||||
int *ret);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_perform()
|
||||
*
|
||||
* Desc: When the app thinks there's data available for curl it calls this
|
||||
* function to read/write whatever there is right now. This returns
|
||||
* as soon as the reads and writes are done. This function does not
|
||||
* require that there actually is data available for reading or that
|
||||
* data can be written, it can be called just in case. It returns
|
||||
* the number of handles that still transfer data in the second
|
||||
* argument's integer-pointer.
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code. *NOTE* that this only
|
||||
* returns errors etc regarding the whole multi stack. There might
|
||||
* still have occurred problems on individual transfers even when
|
||||
* this returns OK.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle,
|
||||
int *running_handles);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_cleanup()
|
||||
*
|
||||
* Desc: Cleans up and removes a whole multi stack. It does not free or
|
||||
* touch any individual easy handles in any way. We need to define
|
||||
* in what state those handles will be if this function is called
|
||||
* in the middle of a transfer.
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_info_read()
|
||||
*
|
||||
* Desc: Ask the multi handle if there's any messages/informationals from
|
||||
* the individual transfers. Messages include informationals such as
|
||||
* error code from the transfer or just the fact that a transfer is
|
||||
* completed. More details on these should be written down as well.
|
||||
*
|
||||
* Repeated calls to this function will return a new struct each
|
||||
* time, until a special "end of msgs" struct is returned as a signal
|
||||
* that there is no more to get at this point.
|
||||
*
|
||||
* The data the returned pointer points to will not survive calling
|
||||
* curl_multi_cleanup().
|
||||
*
|
||||
* The 'CURLMsg' struct is meant to be very simple and only contain
|
||||
* very basic information. If more involved information is wanted,
|
||||
* we will provide the particular "transfer handle" in that struct
|
||||
* and that should/could/would be used in subsequent
|
||||
* curl_easy_getinfo() calls (or similar). The point being that we
|
||||
* must never expose complex structs to applications, as then we'll
|
||||
* undoubtably get backwards compatibility problems in the future.
|
||||
*
|
||||
* Returns: A pointer to a filled-in struct, or NULL if it failed or ran out
|
||||
* of structs. It also writes the number of messages left in the
|
||||
* queue (after this read) in the integer the second argument points
|
||||
* to.
|
||||
*/
|
||||
CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle,
|
||||
int *msgs_in_queue);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_strerror()
|
||||
*
|
||||
* Desc: The curl_multi_strerror function may be used to turn a CURLMcode
|
||||
* value into the equivalent human readable error string. This is
|
||||
* useful for printing meaningful error messages.
|
||||
*
|
||||
* Returns: A pointer to a zero-terminated error message.
|
||||
*/
|
||||
CURL_EXTERN const char *curl_multi_strerror(CURLMcode);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_socket() and
|
||||
* curl_multi_socket_all()
|
||||
*
|
||||
* Desc: An alternative version of curl_multi_perform() that allows the
|
||||
* application to pass in one of the file descriptors that have been
|
||||
* detected to have "action" on them and let libcurl perform.
|
||||
* See man page for details.
|
||||
*/
|
||||
#define CURL_POLL_NONE 0
|
||||
#define CURL_POLL_IN 1
|
||||
#define CURL_POLL_OUT 2
|
||||
#define CURL_POLL_INOUT 3
|
||||
#define CURL_POLL_REMOVE 4
|
||||
|
||||
#define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD
|
||||
|
||||
#define CURL_CSELECT_IN 0x01
|
||||
#define CURL_CSELECT_OUT 0x02
|
||||
#define CURL_CSELECT_ERR 0x04
|
||||
|
||||
typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */
|
||||
curl_socket_t s, /* socket */
|
||||
int what, /* see above */
|
||||
void *userp, /* private callback
|
||||
pointer */
|
||||
void *socketp); /* private socket
|
||||
pointer */
|
||||
/*
|
||||
* Name: curl_multi_timer_callback
|
||||
*
|
||||
* Desc: Called by libcurl whenever the library detects a change in the
|
||||
* maximum number of milliseconds the app is allowed to wait before
|
||||
* curl_multi_socket() or curl_multi_perform() must be called
|
||||
* (to allow libcurl's timed events to take place).
|
||||
*
|
||||
* Returns: The callback should return zero.
|
||||
*/
|
||||
typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */
|
||||
long timeout_ms, /* see above */
|
||||
void *userp); /* private callback
|
||||
pointer */
|
||||
|
||||
CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s,
|
||||
int *running_handles);
|
||||
|
||||
CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle,
|
||||
curl_socket_t s,
|
||||
int ev_bitmask,
|
||||
int *running_handles);
|
||||
|
||||
CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle,
|
||||
int *running_handles);
|
||||
|
||||
#ifndef CURL_ALLOW_OLD_MULTI_SOCKET
|
||||
/* This macro below was added in 7.16.3 to push users who recompile to use
|
||||
the new curl_multi_socket_action() instead of the old curl_multi_socket()
|
||||
*/
|
||||
#define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Name: curl_multi_timeout()
|
||||
*
|
||||
* Desc: Returns the maximum number of milliseconds the app is allowed to
|
||||
* wait before curl_multi_socket() or curl_multi_perform() must be
|
||||
* called (to allow libcurl's timed events to take place).
|
||||
*
|
||||
* Returns: CURLM error code.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle,
|
||||
long *milliseconds);
|
||||
|
||||
#undef CINIT /* re-using the same name as in curl.h */
|
||||
|
||||
#ifdef CURL_ISOCPP
|
||||
#define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num
|
||||
#else
|
||||
/* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */
|
||||
#define LONG CURLOPTTYPE_LONG
|
||||
#define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT
|
||||
#define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT
|
||||
#define OFF_T CURLOPTTYPE_OFF_T
|
||||
#define CINIT(name,type,number) CURLMOPT_/**/name = type + number
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
/* This is the socket callback function pointer */
|
||||
CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1),
|
||||
|
||||
/* This is the argument passed to the socket callback */
|
||||
CINIT(SOCKETDATA, OBJECTPOINT, 2),
|
||||
|
||||
/* set to 1 to enable pipelining for this multi handle */
|
||||
CINIT(PIPELINING, LONG, 3),
|
||||
|
||||
/* This is the timer callback function pointer */
|
||||
CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4),
|
||||
|
||||
/* This is the argument passed to the timer callback */
|
||||
CINIT(TIMERDATA, OBJECTPOINT, 5),
|
||||
|
||||
/* maximum number of entries in the connection cache */
|
||||
CINIT(MAXCONNECTS, LONG, 6),
|
||||
|
||||
/* maximum number of (pipelining) connections to one host */
|
||||
CINIT(MAX_HOST_CONNECTIONS, LONG, 7),
|
||||
|
||||
/* maximum number of requests in a pipeline */
|
||||
CINIT(MAX_PIPELINE_LENGTH, LONG, 8),
|
||||
|
||||
/* a connection with a content-length longer than this
|
||||
will not be considered for pipelining */
|
||||
CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9),
|
||||
|
||||
/* a connection with a chunk length longer than this
|
||||
will not be considered for pipelining */
|
||||
CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10),
|
||||
|
||||
/* a list of site names(+port) that are blacklisted from
|
||||
pipelining */
|
||||
CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11),
|
||||
|
||||
/* a list of server types that are blacklisted from
|
||||
pipelining */
|
||||
CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12),
|
||||
|
||||
/* maximum number of open connections in total */
|
||||
CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13),
|
||||
|
||||
/* This is the server push callback function pointer */
|
||||
CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14),
|
||||
|
||||
/* This is the argument passed to the server push callback */
|
||||
CINIT(PUSHDATA, OBJECTPOINT, 15),
|
||||
|
||||
CURLMOPT_LASTENTRY /* the last unused */
|
||||
} CURLMoption;
|
||||
|
||||
|
||||
/*
|
||||
* Name: curl_multi_setopt()
|
||||
*
|
||||
* Desc: Sets options for the multi handle.
|
||||
*
|
||||
* Returns: CURLM error code.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle,
|
||||
CURLMoption option, ...);
|
||||
|
||||
|
||||
/*
|
||||
* Name: curl_multi_assign()
|
||||
*
|
||||
* Desc: This function sets an association in the multi handle between the
|
||||
* given socket and a private pointer of the application. This is
|
||||
* (only) useful for curl_multi_socket uses.
|
||||
*
|
||||
* Returns: CURLM error code.
|
||||
*/
|
||||
CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle,
|
||||
curl_socket_t sockfd, void *sockp);
|
||||
|
||||
|
||||
/*
|
||||
* Name: curl_push_callback
|
||||
*
|
||||
* Desc: This callback gets called when a new stream is being pushed by the
|
||||
* server. It approves or denies the new stream.
|
||||
*
|
||||
* Returns: CURL_PUSH_OK or CURL_PUSH_DENY.
|
||||
*/
|
||||
#define CURL_PUSH_OK 0
|
||||
#define CURL_PUSH_DENY 1
|
||||
|
||||
struct curl_pushheaders; /* forward declaration only */
|
||||
|
||||
CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h,
|
||||
size_t num);
|
||||
CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h,
|
||||
const char *name);
|
||||
|
||||
typedef int (*curl_push_callback)(CURL *parent,
|
||||
CURL *easy,
|
||||
size_t num_headers,
|
||||
struct curl_pushheaders *headers,
|
||||
void *userp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
33
cache/include/curl/stdcheaders.h
vendored
33
cache/include/curl/stdcheaders.h
vendored
@@ -1,33 +0,0 @@
|
||||
#ifndef __STDC_HEADERS_H
|
||||
#define __STDC_HEADERS_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
size_t fread(void *, size_t, size_t, FILE *);
|
||||
size_t fwrite(const void *, size_t, size_t, FILE *);
|
||||
|
||||
int strcasecmp(const char *, const char *);
|
||||
int strncasecmp(const char *, const char *, size_t);
|
||||
|
||||
#endif /* __STDC_HEADERS_H */
|
||||
473
cache/include/curl/system.h
vendored
473
cache/include/curl/system.h
vendored
@@ -1,473 +0,0 @@
|
||||
#ifndef __CURL_SYSTEM_H
|
||||
#define __CURL_SYSTEM_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/*
|
||||
* Try to keep one section per platform, compiler and architecture, otherwise,
|
||||
* if an existing section is reused for a different one and later on the
|
||||
* original is adjusted, probably the piggybacking one can be adversely
|
||||
* changed.
|
||||
*
|
||||
* In order to differentiate between platforms/compilers/architectures use
|
||||
* only compiler built in predefined preprocessor symbols.
|
||||
*
|
||||
* curl_off_t
|
||||
* ----------
|
||||
*
|
||||
* For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit
|
||||
* wide signed integral data type. The width of this data type must remain
|
||||
* constant and independent of any possible large file support settings.
|
||||
*
|
||||
* As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit
|
||||
* wide signed integral data type if there is no 64-bit type.
|
||||
*
|
||||
* As a general rule, curl_off_t shall not be mapped to off_t. This rule shall
|
||||
* only be violated if off_t is the only 64-bit data type available and the
|
||||
* size of off_t is independent of large file support settings. Keep your
|
||||
* build on the safe side avoiding an off_t gating. If you have a 64-bit
|
||||
* off_t then take for sure that another 64-bit data type exists, dig deeper
|
||||
* and you will find it.
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(__DJGPP__) || defined(__GO32__)
|
||||
# if defined(__DJGPP__) && (__DJGPP__ > 1)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# else
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
|
||||
#elif defined(__SALFORDC__)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# if (__BORLANDC__ < 0x520)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# else
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
||||
# endif
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
|
||||
#elif defined(__TURBOC__)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(__386__)
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
||||
# else
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
|
||||
#elif defined(__POCC__)
|
||||
# if (__POCC__ < 280)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# elif defined(_MSC_VER)
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
||||
# else
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# endif
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
|
||||
#elif defined(__LCC__)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
|
||||
#elif defined(__SYMBIAN32__)
|
||||
# if defined(__EABI__) /* Treat all ARM compilers equally */
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# elif defined(__CW32__)
|
||||
# pragma longlong on
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# elif defined(__VC32__)
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# endif
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
|
||||
|
||||
#elif defined(__MWERKS__)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
|
||||
#elif defined(_WIN32_WCE)
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
|
||||
#elif defined(__MINGW32__)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
||||
# define CURL_PULL_SYS_TYPES_H 1
|
||||
# define CURL_PULL_WS2TCPIP_H 1
|
||||
|
||||
#elif defined(__VMS)
|
||||
# if defined(__VAX)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# else
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# endif
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
|
||||
|
||||
#elif defined(__OS400__)
|
||||
# if defined(__ILEC400__)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
||||
# define CURL_PULL_SYS_TYPES_H 1
|
||||
# define CURL_PULL_SYS_SOCKET_H 1
|
||||
# endif
|
||||
|
||||
#elif defined(__MVS__)
|
||||
# if defined(__IBMC__) || defined(__IBMCPP__)
|
||||
# if defined(_ILP32)
|
||||
# elif defined(_LP64)
|
||||
# endif
|
||||
# if defined(_LONG_LONG)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# elif defined(_LP64)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# else
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
||||
# define CURL_PULL_SYS_TYPES_H 1
|
||||
# define CURL_PULL_SYS_SOCKET_H 1
|
||||
# endif
|
||||
|
||||
#elif defined(__370__)
|
||||
# if defined(__IBMC__) || defined(__IBMCPP__)
|
||||
# if defined(_ILP32)
|
||||
# elif defined(_LP64)
|
||||
# endif
|
||||
# if defined(_LONG_LONG)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# elif defined(_LP64)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# else
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
||||
# define CURL_PULL_SYS_TYPES_H 1
|
||||
# define CURL_PULL_SYS_SOCKET_H 1
|
||||
# endif
|
||||
|
||||
#elif defined(TPF)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
|
||||
#elif defined(__TINYC__) /* also known as tcc */
|
||||
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
||||
# define CURL_PULL_SYS_TYPES_H 1
|
||||
# define CURL_PULL_SYS_SOCKET_H 1
|
||||
|
||||
#elif defined(__SUNPRO_C) /* Oracle Solaris Studio */
|
||||
# if !defined(__LP64) && (defined(__ILP32) || \
|
||||
defined(__i386) || defined(__sparcv8))
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# elif defined(__LP64) || \
|
||||
defined(__amd64) || defined(__sparcv9)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
||||
# define CURL_PULL_SYS_TYPES_H 1
|
||||
# define CURL_PULL_SYS_SOCKET_H 1
|
||||
|
||||
/* ===================================== */
|
||||
/* KEEP MSVC THE PENULTIMATE ENTRY */
|
||||
/* ===================================== */
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
|
||||
# define CURL_TYPEOF_CURL_OFF_T __int64
|
||||
# define CURL_FORMAT_CURL_OFF_T "I64d"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "I64u"
|
||||
# define CURL_SUFFIX_CURL_OFF_T i64
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ui64
|
||||
# else
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
|
||||
/* ===================================== */
|
||||
/* KEEP GENERIC GCC THE LAST ENTRY */
|
||||
/* ===================================== */
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
# if !defined(__LP64__) && \
|
||||
(defined(__ILP32__) || defined(__i386__) || defined(__hppa__) || \
|
||||
defined(__ppc__) || defined(__powerpc__) || defined(__arm__) || \
|
||||
defined(__sparc__) || defined(__mips__) || defined(__sh__) || \
|
||||
defined(__XTENSA__) || \
|
||||
(defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 4) || \
|
||||
(defined(__LONG_MAX__) && __LONG_MAX__ == 2147483647L))
|
||||
# define CURL_TYPEOF_CURL_OFF_T long long
|
||||
# define CURL_FORMAT_CURL_OFF_T "lld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "llu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T LL
|
||||
# define CURL_SUFFIX_CURL_OFF_TU ULL
|
||||
# elif defined(__LP64__) || \
|
||||
defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) || \
|
||||
(defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8) || \
|
||||
(defined(__LONG_MAX__) && __LONG_MAX__ == 9223372036854775807L)
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# endif
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
|
||||
# define CURL_PULL_SYS_TYPES_H 1
|
||||
# define CURL_PULL_SYS_SOCKET_H 1
|
||||
|
||||
#else
|
||||
/* generic "safe guess" on old 32 bit style */
|
||||
# define CURL_TYPEOF_CURL_OFF_T long
|
||||
# define CURL_FORMAT_CURL_OFF_T "ld"
|
||||
# define CURL_FORMAT_CURL_OFF_TU "lu"
|
||||
# define CURL_SUFFIX_CURL_OFF_T L
|
||||
# define CURL_SUFFIX_CURL_OFF_TU UL
|
||||
# define CURL_TYPEOF_CURL_SOCKLEN_T int
|
||||
#endif
|
||||
|
||||
#ifdef _AIX
|
||||
/* AIX needs <sys/poll.h> */
|
||||
#define CURL_PULL_SYS_POLL_H
|
||||
#endif
|
||||
|
||||
|
||||
/* CURL_PULL_WS2TCPIP_H is defined above when inclusion of header file */
|
||||
/* ws2tcpip.h is required here to properly make type definitions below. */
|
||||
#ifdef CURL_PULL_WS2TCPIP_H
|
||||
# include <winsock2.h>
|
||||
# include <windows.h>
|
||||
# include <ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */
|
||||
/* sys/types.h is required here to properly make type definitions below. */
|
||||
#ifdef CURL_PULL_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */
|
||||
/* sys/socket.h is required here to properly make type definitions below. */
|
||||
#ifdef CURL_PULL_SYS_SOCKET_H
|
||||
# include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
/* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file */
|
||||
/* sys/poll.h is required here to properly make type definitions below. */
|
||||
#ifdef CURL_PULL_SYS_POLL_H
|
||||
# include <sys/poll.h>
|
||||
#endif
|
||||
|
||||
/* Data type definition of curl_socklen_t. */
|
||||
#ifdef CURL_TYPEOF_CURL_SOCKLEN_T
|
||||
typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
|
||||
#endif
|
||||
|
||||
/* Data type definition of curl_off_t. */
|
||||
|
||||
#ifdef CURL_TYPEOF_CURL_OFF_T
|
||||
typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
|
||||
* these to be visible and exported by the external libcurl interface API,
|
||||
* while also making them visible to the library internals, simply including
|
||||
* curl_setup.h, without actually needing to include curl.h internally.
|
||||
* If some day this section would grow big enough, all this should be moved
|
||||
* to its own header file.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Figure out if we can use the ## preprocessor operator, which is supported
|
||||
* by ISO/ANSI C and C++. Some compilers support it without setting __STDC__
|
||||
* or __cplusplus so we need to carefully check for them too.
|
||||
*/
|
||||
|
||||
#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \
|
||||
defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \
|
||||
defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \
|
||||
defined(__ILEC400__)
|
||||
/* This compiler is believed to have an ISO compatible preprocessor */
|
||||
#define CURL_ISOCPP
|
||||
#else
|
||||
/* This compiler is believed NOT to have an ISO compatible preprocessor */
|
||||
#undef CURL_ISOCPP
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Macros for minimum-width signed and unsigned curl_off_t integer constants.
|
||||
*/
|
||||
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551)
|
||||
# define __CURL_OFF_T_C_HLPR2(x) x
|
||||
# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x)
|
||||
# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
|
||||
__CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T)
|
||||
# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \
|
||||
__CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU)
|
||||
#else
|
||||
# ifdef CURL_ISOCPP
|
||||
# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix
|
||||
# else
|
||||
# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix
|
||||
# endif
|
||||
# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix)
|
||||
# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T)
|
||||
# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU)
|
||||
#endif
|
||||
|
||||
#endif /* __CURL_SYSTEM_H */
|
||||
696
cache/include/curl/typecheck-gcc.h
vendored
696
cache/include/curl/typecheck-gcc.h
vendored
@@ -1,696 +0,0 @@
|
||||
#ifndef __CURL_TYPECHECK_GCC_H
|
||||
#define __CURL_TYPECHECK_GCC_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/* wraps curl_easy_setopt() with typechecking */
|
||||
|
||||
/* To add a new kind of warning, add an
|
||||
* if(_curl_is_sometype_option(_curl_opt))
|
||||
* if(!_curl_is_sometype(value))
|
||||
* _curl_easy_setopt_err_sometype();
|
||||
* block and define _curl_is_sometype_option, _curl_is_sometype and
|
||||
* _curl_easy_setopt_err_sometype below
|
||||
*
|
||||
* NOTE: We use two nested 'if' statements here instead of the && operator, in
|
||||
* order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x
|
||||
* when compiling with -Wlogical-op.
|
||||
*
|
||||
* To add an option that uses the same type as an existing option, you'll just
|
||||
* need to extend the appropriate _curl_*_option macro
|
||||
*/
|
||||
#define curl_easy_setopt(handle, option, value) \
|
||||
__extension__ ({ \
|
||||
__typeof__(option) _curl_opt = option; \
|
||||
if(__builtin_constant_p(_curl_opt)) { \
|
||||
if(_curl_is_long_option(_curl_opt)) \
|
||||
if(!_curl_is_long(value)) \
|
||||
_curl_easy_setopt_err_long(); \
|
||||
if(_curl_is_off_t_option(_curl_opt)) \
|
||||
if(!_curl_is_off_t(value)) \
|
||||
_curl_easy_setopt_err_curl_off_t(); \
|
||||
if(_curl_is_string_option(_curl_opt)) \
|
||||
if(!_curl_is_string(value)) \
|
||||
_curl_easy_setopt_err_string(); \
|
||||
if(_curl_is_write_cb_option(_curl_opt)) \
|
||||
if(!_curl_is_write_cb(value)) \
|
||||
_curl_easy_setopt_err_write_callback(); \
|
||||
if((_curl_opt) == CURLOPT_RESOLVER_START_FUNCTION) \
|
||||
if(!_curl_is_resolver_start_callback(value)) \
|
||||
_curl_easy_setopt_err_resolver_start_callback(); \
|
||||
if((_curl_opt) == CURLOPT_READFUNCTION) \
|
||||
if(!_curl_is_read_cb(value)) \
|
||||
_curl_easy_setopt_err_read_cb(); \
|
||||
if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \
|
||||
if(!_curl_is_ioctl_cb(value)) \
|
||||
_curl_easy_setopt_err_ioctl_cb(); \
|
||||
if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \
|
||||
if(!_curl_is_sockopt_cb(value)) \
|
||||
_curl_easy_setopt_err_sockopt_cb(); \
|
||||
if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \
|
||||
if(!_curl_is_opensocket_cb(value)) \
|
||||
_curl_easy_setopt_err_opensocket_cb(); \
|
||||
if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \
|
||||
if(!_curl_is_progress_cb(value)) \
|
||||
_curl_easy_setopt_err_progress_cb(); \
|
||||
if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \
|
||||
if(!_curl_is_debug_cb(value)) \
|
||||
_curl_easy_setopt_err_debug_cb(); \
|
||||
if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \
|
||||
if(!_curl_is_ssl_ctx_cb(value)) \
|
||||
_curl_easy_setopt_err_ssl_ctx_cb(); \
|
||||
if(_curl_is_conv_cb_option(_curl_opt)) \
|
||||
if(!_curl_is_conv_cb(value)) \
|
||||
_curl_easy_setopt_err_conv_cb(); \
|
||||
if((_curl_opt) == CURLOPT_SEEKFUNCTION) \
|
||||
if(!_curl_is_seek_cb(value)) \
|
||||
_curl_easy_setopt_err_seek_cb(); \
|
||||
if(_curl_is_cb_data_option(_curl_opt)) \
|
||||
if(!_curl_is_cb_data(value)) \
|
||||
_curl_easy_setopt_err_cb_data(); \
|
||||
if((_curl_opt) == CURLOPT_ERRORBUFFER) \
|
||||
if(!_curl_is_error_buffer(value)) \
|
||||
_curl_easy_setopt_err_error_buffer(); \
|
||||
if((_curl_opt) == CURLOPT_STDERR) \
|
||||
if(!_curl_is_FILE(value)) \
|
||||
_curl_easy_setopt_err_FILE(); \
|
||||
if(_curl_is_postfields_option(_curl_opt)) \
|
||||
if(!_curl_is_postfields(value)) \
|
||||
_curl_easy_setopt_err_postfields(); \
|
||||
if((_curl_opt) == CURLOPT_HTTPPOST) \
|
||||
if(!_curl_is_arr((value), struct curl_httppost)) \
|
||||
_curl_easy_setopt_err_curl_httpost(); \
|
||||
if((_curl_opt) == CURLOPT_MIMEPOST) \
|
||||
if(!_curl_is_ptr((value), curl_mime)) \
|
||||
_curl_easy_setopt_err_curl_mimepost(); \
|
||||
if(_curl_is_slist_option(_curl_opt)) \
|
||||
if(!_curl_is_arr((value), struct curl_slist)) \
|
||||
_curl_easy_setopt_err_curl_slist(); \
|
||||
if((_curl_opt) == CURLOPT_SHARE) \
|
||||
if(!_curl_is_ptr((value), CURLSH)) \
|
||||
_curl_easy_setopt_err_CURLSH(); \
|
||||
} \
|
||||
curl_easy_setopt(handle, _curl_opt, value); \
|
||||
})
|
||||
|
||||
/* wraps curl_easy_getinfo() with typechecking */
|
||||
/* FIXME: don't allow const pointers */
|
||||
#define curl_easy_getinfo(handle, info, arg) \
|
||||
__extension__ ({ \
|
||||
__typeof__(info) _curl_info = info; \
|
||||
if(__builtin_constant_p(_curl_info)) { \
|
||||
if(_curl_is_string_info(_curl_info)) \
|
||||
if(!_curl_is_arr((arg), char *)) \
|
||||
_curl_easy_getinfo_err_string(); \
|
||||
if(_curl_is_long_info(_curl_info)) \
|
||||
if(!_curl_is_arr((arg), long)) \
|
||||
_curl_easy_getinfo_err_long(); \
|
||||
if(_curl_is_double_info(_curl_info)) \
|
||||
if(!_curl_is_arr((arg), double)) \
|
||||
_curl_easy_getinfo_err_double(); \
|
||||
if(_curl_is_slist_info(_curl_info)) \
|
||||
if(!_curl_is_arr((arg), struct curl_slist *)) \
|
||||
_curl_easy_getinfo_err_curl_slist(); \
|
||||
if(_curl_is_tlssessioninfo_info(_curl_info)) \
|
||||
if(!_curl_is_arr((arg), struct curl_tlssessioninfo *)) \
|
||||
_curl_easy_getinfo_err_curl_tlssesssioninfo(); \
|
||||
if(_curl_is_certinfo_info(_curl_info)) \
|
||||
if(!_curl_is_arr((arg), struct curl_certinfo *)) \
|
||||
_curl_easy_getinfo_err_curl_certinfo(); \
|
||||
if(_curl_is_socket_info(_curl_info)) \
|
||||
if(!_curl_is_arr((arg), curl_socket_t)) \
|
||||
_curl_easy_getinfo_err_curl_socket(); \
|
||||
if(_curl_is_off_t_info(_curl_info)) \
|
||||
if(!_curl_is_arr((arg), curl_off_t)) \
|
||||
_curl_easy_getinfo_err_curl_off_t(); \
|
||||
} \
|
||||
curl_easy_getinfo(handle, _curl_info, arg); \
|
||||
})
|
||||
|
||||
/* TODO: typechecking for curl_share_setopt() and curl_multi_setopt(),
|
||||
* for now just make sure that the functions are called with three
|
||||
* arguments
|
||||
*/
|
||||
#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
|
||||
#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
|
||||
|
||||
|
||||
/* the actual warnings, triggered by calling the _curl_easy_setopt_err*
|
||||
* functions */
|
||||
|
||||
/* To define a new warning, use _CURL_WARNING(identifier, "message") */
|
||||
#define _CURL_WARNING(id, message) \
|
||||
static void __attribute__((__warning__(message))) \
|
||||
__attribute__((__unused__)) __attribute__((__noinline__)) \
|
||||
id(void) { __asm__(""); }
|
||||
|
||||
_CURL_WARNING(_curl_easy_setopt_err_long,
|
||||
"curl_easy_setopt expects a long argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_curl_off_t,
|
||||
"curl_easy_setopt expects a curl_off_t argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_string,
|
||||
"curl_easy_setopt expects a "
|
||||
"string ('char *' or char[]) argument for this option"
|
||||
)
|
||||
_CURL_WARNING(_curl_easy_setopt_err_write_callback,
|
||||
"curl_easy_setopt expects a curl_write_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_resolver_start_callback,
|
||||
"curl_easy_setopt expects a "
|
||||
"curl_resolver_start_callback argument for this option"
|
||||
)
|
||||
_CURL_WARNING(_curl_easy_setopt_err_read_cb,
|
||||
"curl_easy_setopt expects a curl_read_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_ioctl_cb,
|
||||
"curl_easy_setopt expects a curl_ioctl_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_sockopt_cb,
|
||||
"curl_easy_setopt expects a curl_sockopt_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_opensocket_cb,
|
||||
"curl_easy_setopt expects a "
|
||||
"curl_opensocket_callback argument for this option"
|
||||
)
|
||||
_CURL_WARNING(_curl_easy_setopt_err_progress_cb,
|
||||
"curl_easy_setopt expects a curl_progress_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_debug_cb,
|
||||
"curl_easy_setopt expects a curl_debug_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_ssl_ctx_cb,
|
||||
"curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_conv_cb,
|
||||
"curl_easy_setopt expects a curl_conv_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_seek_cb,
|
||||
"curl_easy_setopt expects a curl_seek_callback argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_cb_data,
|
||||
"curl_easy_setopt expects a "
|
||||
"private data pointer as argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_error_buffer,
|
||||
"curl_easy_setopt expects a "
|
||||
"char buffer of CURL_ERROR_SIZE as argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_FILE,
|
||||
"curl_easy_setopt expects a 'FILE *' argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_postfields,
|
||||
"curl_easy_setopt expects a 'void *' or 'char *' argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_curl_httpost,
|
||||
"curl_easy_setopt expects a 'struct curl_httppost *' "
|
||||
"argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_curl_mimepost,
|
||||
"curl_easy_setopt expects a 'curl_mime *' "
|
||||
"argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_curl_slist,
|
||||
"curl_easy_setopt expects a 'struct curl_slist *' argument for this option")
|
||||
_CURL_WARNING(_curl_easy_setopt_err_CURLSH,
|
||||
"curl_easy_setopt expects a CURLSH* argument for this option")
|
||||
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_string,
|
||||
"curl_easy_getinfo expects a pointer to 'char *' for this info")
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_long,
|
||||
"curl_easy_getinfo expects a pointer to long for this info")
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_double,
|
||||
"curl_easy_getinfo expects a pointer to double for this info")
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_curl_slist,
|
||||
"curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this info")
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_curl_tlssesssioninfo,
|
||||
"curl_easy_getinfo expects a pointer to "
|
||||
"'struct curl_tlssessioninfo *' for this info")
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_curl_certinfo,
|
||||
"curl_easy_getinfo expects a pointer to "
|
||||
"'struct curl_certinfo *' for this info")
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_curl_socket,
|
||||
"curl_easy_getinfo expects a pointer to curl_socket_t for this info")
|
||||
_CURL_WARNING(_curl_easy_getinfo_err_curl_off_t,
|
||||
"curl_easy_getinfo expects a pointer to curl_off_t for this info")
|
||||
|
||||
/* groups of curl_easy_setops options that take the same type of argument */
|
||||
|
||||
/* To add a new option to one of the groups, just add
|
||||
* (option) == CURLOPT_SOMETHING
|
||||
* to the or-expression. If the option takes a long or curl_off_t, you don't
|
||||
* have to do anything
|
||||
*/
|
||||
|
||||
/* evaluates to true if option takes a long argument */
|
||||
#define _curl_is_long_option(option) \
|
||||
(0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT)
|
||||
|
||||
#define _curl_is_off_t_option(option) \
|
||||
((option) > CURLOPTTYPE_OFF_T)
|
||||
|
||||
/* evaluates to true if option takes a char* argument */
|
||||
#define _curl_is_string_option(option) \
|
||||
((option) == CURLOPT_ABSTRACT_UNIX_SOCKET || \
|
||||
(option) == CURLOPT_ACCEPT_ENCODING || \
|
||||
(option) == CURLOPT_CAINFO || \
|
||||
(option) == CURLOPT_CAPATH || \
|
||||
(option) == CURLOPT_COOKIE || \
|
||||
(option) == CURLOPT_COOKIEFILE || \
|
||||
(option) == CURLOPT_COOKIEJAR || \
|
||||
(option) == CURLOPT_COOKIELIST || \
|
||||
(option) == CURLOPT_CRLFILE || \
|
||||
(option) == CURLOPT_CUSTOMREQUEST || \
|
||||
(option) == CURLOPT_DEFAULT_PROTOCOL || \
|
||||
(option) == CURLOPT_DNS_INTERFACE || \
|
||||
(option) == CURLOPT_DNS_LOCAL_IP4 || \
|
||||
(option) == CURLOPT_DNS_LOCAL_IP6 || \
|
||||
(option) == CURLOPT_DNS_SERVERS || \
|
||||
(option) == CURLOPT_EGDSOCKET || \
|
||||
(option) == CURLOPT_FTPPORT || \
|
||||
(option) == CURLOPT_FTP_ACCOUNT || \
|
||||
(option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \
|
||||
(option) == CURLOPT_INTERFACE || \
|
||||
(option) == CURLOPT_ISSUERCERT || \
|
||||
(option) == CURLOPT_KEYPASSWD || \
|
||||
(option) == CURLOPT_KRBLEVEL || \
|
||||
(option) == CURLOPT_LOGIN_OPTIONS || \
|
||||
(option) == CURLOPT_MAIL_AUTH || \
|
||||
(option) == CURLOPT_MAIL_FROM || \
|
||||
(option) == CURLOPT_NETRC_FILE || \
|
||||
(option) == CURLOPT_NOPROXY || \
|
||||
(option) == CURLOPT_PASSWORD || \
|
||||
(option) == CURLOPT_PINNEDPUBLICKEY || \
|
||||
(option) == CURLOPT_PRE_PROXY || \
|
||||
(option) == CURLOPT_PROXY || \
|
||||
(option) == CURLOPT_PROXYPASSWORD || \
|
||||
(option) == CURLOPT_PROXYUSERNAME || \
|
||||
(option) == CURLOPT_PROXYUSERPWD || \
|
||||
(option) == CURLOPT_PROXY_CAINFO || \
|
||||
(option) == CURLOPT_PROXY_CAPATH || \
|
||||
(option) == CURLOPT_PROXY_CRLFILE || \
|
||||
(option) == CURLOPT_PROXY_KEYPASSWD || \
|
||||
(option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \
|
||||
(option) == CURLOPT_PROXY_SERVICE_NAME || \
|
||||
(option) == CURLOPT_PROXY_SSLCERT || \
|
||||
(option) == CURLOPT_PROXY_SSLCERTTYPE || \
|
||||
(option) == CURLOPT_PROXY_SSLKEY || \
|
||||
(option) == CURLOPT_PROXY_SSLKEYTYPE || \
|
||||
(option) == CURLOPT_PROXY_SSL_CIPHER_LIST || \
|
||||
(option) == CURLOPT_PROXY_TLSAUTH_PASSWORD || \
|
||||
(option) == CURLOPT_PROXY_TLSAUTH_USERNAME || \
|
||||
(option) == CURLOPT_PROXY_TLSAUTH_TYPE || \
|
||||
(option) == CURLOPT_RANDOM_FILE || \
|
||||
(option) == CURLOPT_RANGE || \
|
||||
(option) == CURLOPT_REFERER || \
|
||||
(option) == CURLOPT_RTSP_SESSION_ID || \
|
||||
(option) == CURLOPT_RTSP_STREAM_URI || \
|
||||
(option) == CURLOPT_RTSP_TRANSPORT || \
|
||||
(option) == CURLOPT_SERVICE_NAME || \
|
||||
(option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \
|
||||
(option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \
|
||||
(option) == CURLOPT_SSH_KNOWNHOSTS || \
|
||||
(option) == CURLOPT_SSH_PRIVATE_KEYFILE || \
|
||||
(option) == CURLOPT_SSH_PUBLIC_KEYFILE || \
|
||||
(option) == CURLOPT_SSLCERT || \
|
||||
(option) == CURLOPT_SSLCERTTYPE || \
|
||||
(option) == CURLOPT_SSLENGINE || \
|
||||
(option) == CURLOPT_SSLKEY || \
|
||||
(option) == CURLOPT_SSLKEYTYPE || \
|
||||
(option) == CURLOPT_SSL_CIPHER_LIST || \
|
||||
(option) == CURLOPT_TLSAUTH_PASSWORD || \
|
||||
(option) == CURLOPT_TLSAUTH_TYPE || \
|
||||
(option) == CURLOPT_TLSAUTH_USERNAME || \
|
||||
(option) == CURLOPT_UNIX_SOCKET_PATH || \
|
||||
(option) == CURLOPT_URL || \
|
||||
(option) == CURLOPT_USERAGENT || \
|
||||
(option) == CURLOPT_USERNAME || \
|
||||
(option) == CURLOPT_USERPWD || \
|
||||
(option) == CURLOPT_XOAUTH2_BEARER || \
|
||||
0)
|
||||
|
||||
/* evaluates to true if option takes a curl_write_callback argument */
|
||||
#define _curl_is_write_cb_option(option) \
|
||||
((option) == CURLOPT_HEADERFUNCTION || \
|
||||
(option) == CURLOPT_WRITEFUNCTION)
|
||||
|
||||
/* evaluates to true if option takes a curl_conv_callback argument */
|
||||
#define _curl_is_conv_cb_option(option) \
|
||||
((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \
|
||||
(option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \
|
||||
(option) == CURLOPT_CONV_FROM_UTF8_FUNCTION)
|
||||
|
||||
/* evaluates to true if option takes a data argument to pass to a callback */
|
||||
#define _curl_is_cb_data_option(option) \
|
||||
((option) == CURLOPT_CHUNK_DATA || \
|
||||
(option) == CURLOPT_CLOSESOCKETDATA || \
|
||||
(option) == CURLOPT_DEBUGDATA || \
|
||||
(option) == CURLOPT_FNMATCH_DATA || \
|
||||
(option) == CURLOPT_HEADERDATA || \
|
||||
(option) == CURLOPT_INTERLEAVEDATA || \
|
||||
(option) == CURLOPT_IOCTLDATA || \
|
||||
(option) == CURLOPT_OPENSOCKETDATA || \
|
||||
(option) == CURLOPT_PRIVATE || \
|
||||
(option) == CURLOPT_PROGRESSDATA || \
|
||||
(option) == CURLOPT_READDATA || \
|
||||
(option) == CURLOPT_SEEKDATA || \
|
||||
(option) == CURLOPT_SOCKOPTDATA || \
|
||||
(option) == CURLOPT_SSH_KEYDATA || \
|
||||
(option) == CURLOPT_SSL_CTX_DATA || \
|
||||
(option) == CURLOPT_WRITEDATA || \
|
||||
(option) == CURLOPT_RESOLVER_START_DATA || \
|
||||
0)
|
||||
|
||||
/* evaluates to true if option takes a POST data argument (void* or char*) */
|
||||
#define _curl_is_postfields_option(option) \
|
||||
((option) == CURLOPT_POSTFIELDS || \
|
||||
(option) == CURLOPT_COPYPOSTFIELDS || \
|
||||
0)
|
||||
|
||||
/* evaluates to true if option takes a struct curl_slist * argument */
|
||||
#define _curl_is_slist_option(option) \
|
||||
((option) == CURLOPT_HTTP200ALIASES || \
|
||||
(option) == CURLOPT_HTTPHEADER || \
|
||||
(option) == CURLOPT_MAIL_RCPT || \
|
||||
(option) == CURLOPT_POSTQUOTE || \
|
||||
(option) == CURLOPT_PREQUOTE || \
|
||||
(option) == CURLOPT_PROXYHEADER || \
|
||||
(option) == CURLOPT_QUOTE || \
|
||||
(option) == CURLOPT_RESOLVE || \
|
||||
(option) == CURLOPT_TELNETOPTIONS || \
|
||||
0)
|
||||
|
||||
/* groups of curl_easy_getinfo infos that take the same type of argument */
|
||||
|
||||
/* evaluates to true if info expects a pointer to char * argument */
|
||||
#define _curl_is_string_info(info) \
|
||||
(CURLINFO_STRING < (info) && (info) < CURLINFO_LONG)
|
||||
|
||||
/* evaluates to true if info expects a pointer to long argument */
|
||||
#define _curl_is_long_info(info) \
|
||||
(CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE)
|
||||
|
||||
/* evaluates to true if info expects a pointer to double argument */
|
||||
#define _curl_is_double_info(info) \
|
||||
(CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST)
|
||||
|
||||
/* true if info expects a pointer to struct curl_slist * argument */
|
||||
#define _curl_is_slist_info(info) \
|
||||
(((info) == CURLINFO_SSL_ENGINES) || ((info) == CURLINFO_COOKIELIST))
|
||||
|
||||
/* true if info expects a pointer to struct curl_tlssessioninfo * argument */
|
||||
#define _curl_is_tlssessioninfo_info(info) \
|
||||
(((info) == CURLINFO_TLS_SSL_PTR) || ((info) == CURLINFO_TLS_SESSION))
|
||||
|
||||
/* true if info expects a pointer to struct curl_certinfo * argument */
|
||||
#define _curl_is_certinfo_info(info) ((info) == CURLINFO_CERTINFO)
|
||||
|
||||
/* true if info expects a pointer to struct curl_socket_t argument */
|
||||
#define _curl_is_socket_info(info) \
|
||||
(CURLINFO_SOCKET < (info) && (info) < CURLINFO_OFF_T)
|
||||
|
||||
/* true if info expects a pointer to curl_off_t argument */
|
||||
#define _curl_is_off_t_info(info) \
|
||||
(CURLINFO_OFF_T < (info))
|
||||
|
||||
|
||||
/* typecheck helpers -- check whether given expression has requested type*/
|
||||
|
||||
/* For pointers, you can use the _curl_is_ptr/_curl_is_arr macros,
|
||||
* otherwise define a new macro. Search for __builtin_types_compatible_p
|
||||
* in the GCC manual.
|
||||
* NOTE: these macros MUST NOT EVALUATE their arguments! The argument is
|
||||
* the actual expression passed to the curl_easy_setopt macro. This
|
||||
* means that you can only apply the sizeof and __typeof__ operators, no
|
||||
* == or whatsoever.
|
||||
*/
|
||||
|
||||
/* XXX: should evaluate to true iff expr is a pointer */
|
||||
#define _curl_is_any_ptr(expr) \
|
||||
(sizeof(expr) == sizeof(void *))
|
||||
|
||||
/* evaluates to true if expr is NULL */
|
||||
/* XXX: must not evaluate expr, so this check is not accurate */
|
||||
#define _curl_is_NULL(expr) \
|
||||
(__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL)))
|
||||
|
||||
/* evaluates to true if expr is type*, const type* or NULL */
|
||||
#define _curl_is_ptr(expr, type) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), type *) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), const type *))
|
||||
|
||||
/* evaluates to true if expr is one of type[], type*, NULL or const type* */
|
||||
#define _curl_is_arr(expr, type) \
|
||||
(_curl_is_ptr((expr), type) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), type []))
|
||||
|
||||
/* evaluates to true if expr is a string */
|
||||
#define _curl_is_string(expr) \
|
||||
(_curl_is_arr((expr), char) || \
|
||||
_curl_is_arr((expr), signed char) || \
|
||||
_curl_is_arr((expr), unsigned char))
|
||||
|
||||
/* evaluates to true if expr is a long (no matter the signedness)
|
||||
* XXX: for now, int is also accepted (and therefore short and char, which
|
||||
* are promoted to int when passed to a variadic function) */
|
||||
#define _curl_is_long(expr) \
|
||||
(__builtin_types_compatible_p(__typeof__(expr), long) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), signed long) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), unsigned long) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), int) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), signed int) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), unsigned int) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), short) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), signed short) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), unsigned short) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), char) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), signed char) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), unsigned char))
|
||||
|
||||
/* evaluates to true if expr is of type curl_off_t */
|
||||
#define _curl_is_off_t(expr) \
|
||||
(__builtin_types_compatible_p(__typeof__(expr), curl_off_t))
|
||||
|
||||
/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */
|
||||
/* XXX: also check size of an char[] array? */
|
||||
#define _curl_is_error_buffer(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), char *) || \
|
||||
__builtin_types_compatible_p(__typeof__(expr), char[]))
|
||||
|
||||
/* evaluates to true if expr is of type (const) void* or (const) FILE* */
|
||||
#if 0
|
||||
#define _curl_is_cb_data(expr) \
|
||||
(_curl_is_ptr((expr), void) || \
|
||||
_curl_is_ptr((expr), FILE))
|
||||
#else /* be less strict */
|
||||
#define _curl_is_cb_data(expr) \
|
||||
_curl_is_any_ptr(expr)
|
||||
#endif
|
||||
|
||||
/* evaluates to true if expr is of type FILE* */
|
||||
#define _curl_is_FILE(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
(__builtin_types_compatible_p(__typeof__(expr), FILE *)))
|
||||
|
||||
/* evaluates to true if expr can be passed as POST data (void* or char*) */
|
||||
#define _curl_is_postfields(expr) \
|
||||
(_curl_is_ptr((expr), void) || \
|
||||
_curl_is_arr((expr), char))
|
||||
|
||||
/* FIXME: the whole callback checking is messy...
|
||||
* The idea is to tolerate char vs. void and const vs. not const
|
||||
* pointers in arguments at least
|
||||
*/
|
||||
/* helper: __builtin_types_compatible_p distinguishes between functions and
|
||||
* function pointers, hide it */
|
||||
#define _curl_callback_compatible(func, type) \
|
||||
(__builtin_types_compatible_p(__typeof__(func), type) || \
|
||||
__builtin_types_compatible_p(__typeof__(func) *, type))
|
||||
|
||||
/* evaluates to true if expr is of type curl_resolver_start_callback */
|
||||
#define _curl_is_resolver_start_callback(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
_curl_callback_compatible((expr), curl_resolver_start_callback))
|
||||
|
||||
/* evaluates to true if expr is of type curl_read_callback or "similar" */
|
||||
#define _curl_is_read_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
_curl_callback_compatible((expr), __typeof__(fread) *) || \
|
||||
_curl_callback_compatible((expr), curl_read_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback4) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback5) || \
|
||||
_curl_callback_compatible((expr), _curl_read_callback6))
|
||||
typedef size_t (*_curl_read_callback1)(char *, size_t, size_t, void *);
|
||||
typedef size_t (*_curl_read_callback2)(char *, size_t, size_t, const void *);
|
||||
typedef size_t (*_curl_read_callback3)(char *, size_t, size_t, FILE *);
|
||||
typedef size_t (*_curl_read_callback4)(void *, size_t, size_t, void *);
|
||||
typedef size_t (*_curl_read_callback5)(void *, size_t, size_t, const void *);
|
||||
typedef size_t (*_curl_read_callback6)(void *, size_t, size_t, FILE *);
|
||||
|
||||
/* evaluates to true if expr is of type curl_write_callback or "similar" */
|
||||
#define _curl_is_write_cb(expr) \
|
||||
(_curl_is_read_cb(expr) || \
|
||||
_curl_callback_compatible((expr), __typeof__(fwrite) *) || \
|
||||
_curl_callback_compatible((expr), curl_write_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback4) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback5) || \
|
||||
_curl_callback_compatible((expr), _curl_write_callback6))
|
||||
typedef size_t (*_curl_write_callback1)(const char *, size_t, size_t, void *);
|
||||
typedef size_t (*_curl_write_callback2)(const char *, size_t, size_t,
|
||||
const void *);
|
||||
typedef size_t (*_curl_write_callback3)(const char *, size_t, size_t, FILE *);
|
||||
typedef size_t (*_curl_write_callback4)(const void *, size_t, size_t, void *);
|
||||
typedef size_t (*_curl_write_callback5)(const void *, size_t, size_t,
|
||||
const void *);
|
||||
typedef size_t (*_curl_write_callback6)(const void *, size_t, size_t, FILE *);
|
||||
|
||||
/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */
|
||||
#define _curl_is_ioctl_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
_curl_callback_compatible((expr), curl_ioctl_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_ioctl_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_ioctl_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_ioctl_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_ioctl_callback4))
|
||||
typedef curlioerr (*_curl_ioctl_callback1)(CURL *, int, void *);
|
||||
typedef curlioerr (*_curl_ioctl_callback2)(CURL *, int, const void *);
|
||||
typedef curlioerr (*_curl_ioctl_callback3)(CURL *, curliocmd, void *);
|
||||
typedef curlioerr (*_curl_ioctl_callback4)(CURL *, curliocmd, const void *);
|
||||
|
||||
/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */
|
||||
#define _curl_is_sockopt_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
_curl_callback_compatible((expr), curl_sockopt_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_sockopt_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_sockopt_callback2))
|
||||
typedef int (*_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype);
|
||||
typedef int (*_curl_sockopt_callback2)(const void *, curl_socket_t,
|
||||
curlsocktype);
|
||||
|
||||
/* evaluates to true if expr is of type curl_opensocket_callback or
|
||||
"similar" */
|
||||
#define _curl_is_opensocket_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
_curl_callback_compatible((expr), curl_opensocket_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_opensocket_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_opensocket_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_opensocket_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_opensocket_callback4))
|
||||
typedef curl_socket_t (*_curl_opensocket_callback1)
|
||||
(void *, curlsocktype, struct curl_sockaddr *);
|
||||
typedef curl_socket_t (*_curl_opensocket_callback2)
|
||||
(void *, curlsocktype, const struct curl_sockaddr *);
|
||||
typedef curl_socket_t (*_curl_opensocket_callback3)
|
||||
(const void *, curlsocktype, struct curl_sockaddr *);
|
||||
typedef curl_socket_t (*_curl_opensocket_callback4)
|
||||
(const void *, curlsocktype, const struct curl_sockaddr *);
|
||||
|
||||
/* evaluates to true if expr is of type curl_progress_callback or "similar" */
|
||||
#define _curl_is_progress_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
_curl_callback_compatible((expr), curl_progress_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_progress_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_progress_callback2))
|
||||
typedef int (*_curl_progress_callback1)(void *,
|
||||
double, double, double, double);
|
||||
typedef int (*_curl_progress_callback2)(const void *,
|
||||
double, double, double, double);
|
||||
|
||||
/* evaluates to true if expr is of type curl_debug_callback or "similar" */
|
||||
#define _curl_is_debug_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
_curl_callback_compatible((expr), curl_debug_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback4) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback5) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback6) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback7) || \
|
||||
_curl_callback_compatible((expr), _curl_debug_callback8))
|
||||
typedef int (*_curl_debug_callback1) (CURL *,
|
||||
curl_infotype, char *, size_t, void *);
|
||||
typedef int (*_curl_debug_callback2) (CURL *,
|
||||
curl_infotype, char *, size_t, const void *);
|
||||
typedef int (*_curl_debug_callback3) (CURL *,
|
||||
curl_infotype, const char *, size_t, void *);
|
||||
typedef int (*_curl_debug_callback4) (CURL *,
|
||||
curl_infotype, const char *, size_t, const void *);
|
||||
typedef int (*_curl_debug_callback5) (CURL *,
|
||||
curl_infotype, unsigned char *, size_t, void *);
|
||||
typedef int (*_curl_debug_callback6) (CURL *,
|
||||
curl_infotype, unsigned char *, size_t, const void *);
|
||||
typedef int (*_curl_debug_callback7) (CURL *,
|
||||
curl_infotype, const unsigned char *, size_t, void *);
|
||||
typedef int (*_curl_debug_callback8) (CURL *,
|
||||
curl_infotype, const unsigned char *, size_t, const void *);
|
||||
|
||||
/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */
|
||||
/* this is getting even messier... */
|
||||
#define _curl_is_ssl_ctx_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
_curl_callback_compatible((expr), curl_ssl_ctx_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback4) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback5) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback6) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback7) || \
|
||||
_curl_callback_compatible((expr), _curl_ssl_ctx_callback8))
|
||||
typedef CURLcode (*_curl_ssl_ctx_callback1)(CURL *, void *, void *);
|
||||
typedef CURLcode (*_curl_ssl_ctx_callback2)(CURL *, void *, const void *);
|
||||
typedef CURLcode (*_curl_ssl_ctx_callback3)(CURL *, const void *, void *);
|
||||
typedef CURLcode (*_curl_ssl_ctx_callback4)(CURL *, const void *,
|
||||
const void *);
|
||||
#ifdef HEADER_SSL_H
|
||||
/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX
|
||||
* this will of course break if we're included before OpenSSL headers...
|
||||
*/
|
||||
typedef CURLcode (*_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *);
|
||||
typedef CURLcode (*_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *);
|
||||
typedef CURLcode (*_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *);
|
||||
typedef CURLcode (*_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX,
|
||||
const void *);
|
||||
#else
|
||||
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5;
|
||||
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6;
|
||||
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7;
|
||||
typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8;
|
||||
#endif
|
||||
|
||||
/* evaluates to true if expr is of type curl_conv_callback or "similar" */
|
||||
#define _curl_is_conv_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
_curl_callback_compatible((expr), curl_conv_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_conv_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_conv_callback2) || \
|
||||
_curl_callback_compatible((expr), _curl_conv_callback3) || \
|
||||
_curl_callback_compatible((expr), _curl_conv_callback4))
|
||||
typedef CURLcode (*_curl_conv_callback1)(char *, size_t length);
|
||||
typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length);
|
||||
typedef CURLcode (*_curl_conv_callback3)(void *, size_t length);
|
||||
typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length);
|
||||
|
||||
/* evaluates to true if expr is of type curl_seek_callback or "similar" */
|
||||
#define _curl_is_seek_cb(expr) \
|
||||
(_curl_is_NULL(expr) || \
|
||||
_curl_callback_compatible((expr), curl_seek_callback) || \
|
||||
_curl_callback_compatible((expr), _curl_seek_callback1) || \
|
||||
_curl_callback_compatible((expr), _curl_seek_callback2))
|
||||
typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int);
|
||||
typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int);
|
||||
|
||||
|
||||
#endif /* __CURL_TYPECHECK_GCC_H */
|
||||
45
cache/include/libevent2/evdns.h
vendored
45
cache/include/libevent2/evdns.h
vendored
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT1_EVDNS_H_INCLUDED_
|
||||
#define EVENT1_EVDNS_H_INCLUDED_
|
||||
|
||||
/** @file evdns.h
|
||||
|
||||
A dns subsystem for Libevent.
|
||||
|
||||
The <evdns.h> header is deprecated in Libevent 2.0 and later; please
|
||||
use <event2/evdns.h> instead. Depending on what functionality you
|
||||
need, you may also want to include more of the other <event2/...>
|
||||
headers.
|
||||
*/
|
||||
|
||||
#include <event.h>
|
||||
#include <event2/dns.h>
|
||||
#include <event2/dns_compat.h>
|
||||
#include <event2/dns_struct.h>
|
||||
|
||||
#endif /* EVENT1_EVDNS_H_INCLUDED_ */
|
||||
83
cache/include/libevent2/event.h
vendored
83
cache/include/libevent2/event.h
vendored
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT1_EVENT_H_INCLUDED_
|
||||
#define EVENT1_EVENT_H_INCLUDED_
|
||||
|
||||
/** @file event.h
|
||||
|
||||
A library for writing event-driven network servers.
|
||||
|
||||
The <event.h> header is deprecated in Libevent 2.0 and later; please
|
||||
use <event2/event.h> instead. Depending on what functionality you
|
||||
need, you may also want to include more of the other event2/
|
||||
headers.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event-config.h>
|
||||
#ifdef EVENT__HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
|
||||
/* For int types. */
|
||||
#include <evutil.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#include <event2/event_struct.h>
|
||||
#include <event2/event.h>
|
||||
#include <event2/event_compat.h>
|
||||
#include <event2/buffer.h>
|
||||
#include <event2/buffer_compat.h>
|
||||
#include <event2/bufferevent.h>
|
||||
#include <event2/bufferevent_struct.h>
|
||||
#include <event2/bufferevent_compat.h>
|
||||
#include <event2/tag.h>
|
||||
#include <event2/tag_compat.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT1_EVENT_H_INCLUDED_ */
|
||||
1076
cache/include/libevent2/event2/buffer.h
vendored
1076
cache/include/libevent2/event2/buffer.h
vendored
File diff suppressed because it is too large
Load Diff
115
cache/include/libevent2/event2/buffer_compat.h
vendored
115
cache/include/libevent2/event2/buffer_compat.h
vendored
@@ -1,115 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef EVENT2_BUFFER_COMPAT_H_INCLUDED_
|
||||
#define EVENT2_BUFFER_COMPAT_H_INCLUDED_
|
||||
|
||||
#include <event2/visibility.h>
|
||||
|
||||
/** @file event2/buffer_compat.h
|
||||
|
||||
Obsolete and deprecated versions of the functions in buffer.h: provided
|
||||
only for backward compatibility.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
Obsolete alias for evbuffer_readln(buffer, NULL, EVBUFFER_EOL_ANY).
|
||||
|
||||
@deprecated This function is deprecated because its behavior is not correct
|
||||
for almost any protocol, and also because it's wholly subsumed by
|
||||
evbuffer_readln().
|
||||
|
||||
@param buffer the evbuffer to read from
|
||||
@return pointer to a single line, or NULL if an error occurred
|
||||
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
char *evbuffer_readline(struct evbuffer *buffer);
|
||||
|
||||
/** Type definition for a callback that is invoked whenever data is added or
|
||||
removed from an evbuffer.
|
||||
|
||||
An evbuffer may have one or more callbacks set at a time. The order
|
||||
in which they are executed is undefined.
|
||||
|
||||
A callback function may add more callbacks, or remove itself from the
|
||||
list of callbacks, or add or remove data from the buffer. It may not
|
||||
remove another callback from the list.
|
||||
|
||||
If a callback adds or removes data from the buffer or from another
|
||||
buffer, this can cause a recursive invocation of your callback or
|
||||
other callbacks. If you ask for an infinite loop, you might just get
|
||||
one: watch out!
|
||||
|
||||
@param buffer the buffer whose size has changed
|
||||
@param old_len the previous length of the buffer
|
||||
@param new_len the current length of the buffer
|
||||
@param arg a pointer to user data
|
||||
*/
|
||||
typedef void (*evbuffer_cb)(struct evbuffer *buffer, size_t old_len, size_t new_len, void *arg);
|
||||
|
||||
/**
|
||||
Replace all callbacks on an evbuffer with a single new callback, or
|
||||
remove them.
|
||||
|
||||
Subsequent calls to evbuffer_setcb() replace callbacks set by previous
|
||||
calls. Setting the callback to NULL removes any previously set callback.
|
||||
|
||||
@deprecated This function is deprecated because it clears all previous
|
||||
callbacks set on the evbuffer, which can cause confusing behavior if
|
||||
multiple parts of the code all want to add their own callbacks on a
|
||||
buffer. Instead, use evbuffer_add(), evbuffer_del(), and
|
||||
evbuffer_setflags() to manage your own evbuffer callbacks without
|
||||
interfering with callbacks set by others.
|
||||
|
||||
@param buffer the evbuffer to be monitored
|
||||
@param cb the callback function to invoke when the evbuffer is modified,
|
||||
or NULL to remove all callbacks.
|
||||
@param cbarg an argument to be provided to the callback function
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evbuffer_setcb(struct evbuffer *buffer, evbuffer_cb cb, void *cbarg);
|
||||
|
||||
|
||||
/**
|
||||
Find a string within an evbuffer.
|
||||
|
||||
@param buffer the evbuffer to be searched
|
||||
@param what the string to be searched for
|
||||
@param len the length of the search string
|
||||
@return a pointer to the beginning of the search string, or NULL if the search failed.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
unsigned char *evbuffer_find(struct evbuffer *buffer, const unsigned char *what, size_t len);
|
||||
|
||||
/** deprecated in favor of calling the functions directly */
|
||||
#define EVBUFFER_LENGTH(x) evbuffer_get_length(x)
|
||||
/** deprecated in favor of calling the functions directly */
|
||||
#define EVBUFFER_DATA(x) evbuffer_pullup((x), -1)
|
||||
|
||||
#endif
|
||||
|
||||
1021
cache/include/libevent2/event2/bufferevent.h
vendored
1021
cache/include/libevent2/event2/bufferevent.h
vendored
File diff suppressed because it is too large
Load Diff
100
cache/include/libevent2/event2/bufferevent_compat.h
vendored
100
cache/include/libevent2/event2/bufferevent_compat.h
vendored
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007-2012 Niels Provos, Nick Mathewson
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_
|
||||
#define EVENT2_BUFFEREVENT_COMPAT_H_INCLUDED_
|
||||
|
||||
#define evbuffercb bufferevent_data_cb
|
||||
#define everrorcb bufferevent_event_cb
|
||||
|
||||
/**
|
||||
Create a new bufferevent for an fd.
|
||||
|
||||
This function is deprecated. Use bufferevent_socket_new and
|
||||
bufferevent_set_callbacks instead.
|
||||
|
||||
Libevent provides an abstraction on top of the regular event callbacks.
|
||||
This abstraction is called a buffered event. A buffered event provides
|
||||
input and output buffers that get filled and drained automatically. The
|
||||
user of a buffered event no longer deals directly with the I/O, but
|
||||
instead is reading from input and writing to output buffers.
|
||||
|
||||
Once initialized, the bufferevent structure can be used repeatedly with
|
||||
bufferevent_enable() and bufferevent_disable().
|
||||
|
||||
When read enabled the bufferevent will try to read from the file descriptor
|
||||
and call the read callback. The write callback is executed whenever the
|
||||
output buffer is drained below the write low watermark, which is 0 by
|
||||
default.
|
||||
|
||||
If multiple bases are in use, bufferevent_base_set() must be called before
|
||||
enabling the bufferevent for the first time.
|
||||
|
||||
@deprecated This function is deprecated because it uses the current
|
||||
event base, and as such can be error prone for multithreaded programs.
|
||||
Use bufferevent_socket_new() instead.
|
||||
|
||||
@param fd the file descriptor from which data is read and written to.
|
||||
This file descriptor is not allowed to be a pipe(2).
|
||||
@param readcb callback to invoke when there is data to be read, or NULL if
|
||||
no callback is desired
|
||||
@param writecb callback to invoke when the file descriptor is ready for
|
||||
writing, or NULL if no callback is desired
|
||||
@param errorcb callback to invoke when there is an error on the file
|
||||
descriptor
|
||||
@param cbarg an argument that will be supplied to each of the callbacks
|
||||
(readcb, writecb, and errorcb)
|
||||
@return a pointer to a newly allocated bufferevent struct, or NULL if an
|
||||
error occurred
|
||||
@see bufferevent_base_set(), bufferevent_free()
|
||||
*/
|
||||
struct bufferevent *bufferevent_new(evutil_socket_t fd,
|
||||
evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg);
|
||||
|
||||
|
||||
/**
|
||||
Set the read and write timeout for a buffered event.
|
||||
|
||||
@param bufev the bufferevent to be modified
|
||||
@param timeout_read the read timeout
|
||||
@param timeout_write the write timeout
|
||||
*/
|
||||
void bufferevent_settimeout(struct bufferevent *bufev,
|
||||
int timeout_read, int timeout_write);
|
||||
|
||||
#define EVBUFFER_READ BEV_EVENT_READING
|
||||
#define EVBUFFER_WRITE BEV_EVENT_WRITING
|
||||
#define EVBUFFER_EOF BEV_EVENT_EOF
|
||||
#define EVBUFFER_ERROR BEV_EVENT_ERROR
|
||||
#define EVBUFFER_TIMEOUT BEV_EVENT_TIMEOUT
|
||||
|
||||
/** macro for getting access to the input buffer of a bufferevent */
|
||||
#define EVBUFFER_INPUT(x) bufferevent_get_input(x)
|
||||
/** macro for getting access to the output buffer of a bufferevent */
|
||||
#define EVBUFFER_OUTPUT(x) bufferevent_get_output(x)
|
||||
|
||||
#endif
|
||||
134
cache/include/libevent2/event2/bufferevent_ssl.h
vendored
134
cache/include/libevent2/event2/bufferevent_ssl.h
vendored
@@ -1,134 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2009-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_BUFFEREVENT_SSL_H_INCLUDED_
|
||||
#define EVENT2_BUFFEREVENT_SSL_H_INCLUDED_
|
||||
|
||||
/** @file event2/bufferevent_ssl.h
|
||||
|
||||
OpenSSL support for bufferevents.
|
||||
*/
|
||||
#include <event2/visibility.h>
|
||||
#include <event2/event-config.h>
|
||||
#include <event2/bufferevent.h>
|
||||
#include <event2/util.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* This is what openssl's SSL objects are underneath. */
|
||||
struct ssl_st;
|
||||
|
||||
/**
|
||||
The state of an SSL object to be used when creating a new
|
||||
SSL bufferevent.
|
||||
*/
|
||||
enum bufferevent_ssl_state {
|
||||
BUFFEREVENT_SSL_OPEN = 0,
|
||||
BUFFEREVENT_SSL_CONNECTING = 1,
|
||||
BUFFEREVENT_SSL_ACCEPTING = 2
|
||||
};
|
||||
|
||||
#if defined(EVENT__HAVE_OPENSSL) || defined(EVENT_IN_DOXYGEN_)
|
||||
/**
|
||||
Create a new SSL bufferevent to send its data over another bufferevent.
|
||||
|
||||
@param base An event_base to use to detect reading and writing. It
|
||||
must also be the base for the underlying bufferevent.
|
||||
@param underlying A socket to use for this SSL
|
||||
@param ssl A SSL* object from openssl.
|
||||
@param state The current state of the SSL connection
|
||||
@param options One or more bufferevent_options
|
||||
@return A new bufferevent on success, or NULL on failure
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct bufferevent *
|
||||
bufferevent_openssl_filter_new(struct event_base *base,
|
||||
struct bufferevent *underlying,
|
||||
struct ssl_st *ssl,
|
||||
enum bufferevent_ssl_state state,
|
||||
int options);
|
||||
|
||||
/**
|
||||
Create a new SSL bufferevent to send its data over an SSL * on a socket.
|
||||
|
||||
@param base An event_base to use to detect reading and writing
|
||||
@param fd A socket to use for this SSL
|
||||
@param ssl A SSL* object from openssl.
|
||||
@param state The current state of the SSL connection
|
||||
@param options One or more bufferevent_options
|
||||
@return A new bufferevent on success, or NULL on failure.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct bufferevent *
|
||||
bufferevent_openssl_socket_new(struct event_base *base,
|
||||
evutil_socket_t fd,
|
||||
struct ssl_st *ssl,
|
||||
enum bufferevent_ssl_state state,
|
||||
int options);
|
||||
|
||||
/** Control how to report dirty SSL shutdowns.
|
||||
|
||||
If the peer (or the network, or an attacker) closes the TCP
|
||||
connection before closing the SSL channel, and the protocol is SSL >= v3,
|
||||
this is a "dirty" shutdown. If allow_dirty_shutdown is 0 (default),
|
||||
this is reported as BEV_EVENT_ERROR.
|
||||
|
||||
If instead allow_dirty_shutdown=1, a dirty shutdown is reported as
|
||||
BEV_EVENT_EOF.
|
||||
|
||||
(Note that if the protocol is < SSLv3, you will always receive
|
||||
BEV_EVENT_EOF, since SSL 2 and earlier cannot distinguish a secure
|
||||
connection close from a dirty one. This is one reason (among many)
|
||||
not to use SSL 2.)
|
||||
*/
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int bufferevent_openssl_get_allow_dirty_shutdown(struct bufferevent *bev);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void bufferevent_openssl_set_allow_dirty_shutdown(struct bufferevent *bev,
|
||||
int allow_dirty_shutdown);
|
||||
|
||||
/** Return the underlying openssl SSL * object for an SSL bufferevent. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct ssl_st *
|
||||
bufferevent_openssl_get_ssl(struct bufferevent *bufev);
|
||||
|
||||
/** Tells a bufferevent to begin SSL renegotiation. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int bufferevent_ssl_renegotiate(struct bufferevent *bev);
|
||||
|
||||
/** Return the most recent OpenSSL error reported on an SSL bufferevent. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
unsigned long bufferevent_get_openssl_error(struct bufferevent *bev);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_BUFFEREVENT_SSL_H_INCLUDED_ */
|
||||
116
cache/include/libevent2/event2/bufferevent_struct.h
vendored
116
cache/include/libevent2/event2/bufferevent_struct.h
vendored
@@ -1,116 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_
|
||||
#define EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_
|
||||
|
||||
/** @file event2/bufferevent_struct.h
|
||||
|
||||
Data structures for bufferevents. Using these structures may hurt forward
|
||||
compatibility with later versions of Libevent: be careful!
|
||||
|
||||
@deprecated Use of bufferevent_struct.h is completely deprecated; these
|
||||
structures are only exposed for backward compatibility with programs
|
||||
written before Libevent 2.0 that used them.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event-config.h>
|
||||
#ifdef EVENT__HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* For int types. */
|
||||
#include <event2/util.h>
|
||||
/* For struct event */
|
||||
#include <event2/event_struct.h>
|
||||
|
||||
struct event_watermark {
|
||||
size_t low;
|
||||
size_t high;
|
||||
};
|
||||
|
||||
/**
|
||||
Shared implementation of a bufferevent.
|
||||
|
||||
This type is exposed only because it was exposed in previous versions,
|
||||
and some people's code may rely on manipulating it. Otherwise, you
|
||||
should really not rely on the layout, size, or contents of this structure:
|
||||
it is fairly volatile, and WILL change in future versions of the code.
|
||||
**/
|
||||
struct bufferevent {
|
||||
/** Event base for which this bufferevent was created. */
|
||||
struct event_base *ev_base;
|
||||
/** Pointer to a table of function pointers to set up how this
|
||||
bufferevent behaves. */
|
||||
const struct bufferevent_ops *be_ops;
|
||||
|
||||
/** A read event that triggers when a timeout has happened or a socket
|
||||
is ready to read data. Only used by some subtypes of
|
||||
bufferevent. */
|
||||
struct event ev_read;
|
||||
/** A write event that triggers when a timeout has happened or a socket
|
||||
is ready to write data. Only used by some subtypes of
|
||||
bufferevent. */
|
||||
struct event ev_write;
|
||||
|
||||
/** An input buffer. Only the bufferevent is allowed to add data to
|
||||
this buffer, though the user is allowed to drain it. */
|
||||
struct evbuffer *input;
|
||||
|
||||
/** An input buffer. Only the bufferevent is allowed to drain data
|
||||
from this buffer, though the user is allowed to add it. */
|
||||
struct evbuffer *output;
|
||||
|
||||
struct event_watermark wm_read;
|
||||
struct event_watermark wm_write;
|
||||
|
||||
bufferevent_data_cb readcb;
|
||||
bufferevent_data_cb writecb;
|
||||
/* This should be called 'eventcb', but renaming it would break
|
||||
* backward compatibility */
|
||||
bufferevent_event_cb errorcb;
|
||||
void *cbarg;
|
||||
|
||||
struct timeval timeout_read;
|
||||
struct timeval timeout_write;
|
||||
|
||||
/** Events that are currently enabled: currently EV_READ and EV_WRITE
|
||||
are supported. */
|
||||
short enabled;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_BUFFEREVENT_STRUCT_H_INCLUDED_ */
|
||||
717
cache/include/libevent2/event2/dns.h
vendored
717
cache/include/libevent2/event2/dns.h
vendored
@@ -1,717 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The original DNS code is due to Adam Langley with heavy
|
||||
* modifications by Nick Mathewson. Adam put his DNS software in the
|
||||
* public domain. You can find his original copyright below. Please,
|
||||
* aware that the code as part of Libevent is governed by the 3-clause
|
||||
* BSD license above.
|
||||
*
|
||||
* This software is Public Domain. To view a copy of the public domain dedication,
|
||||
* visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
|
||||
* Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
|
||||
*
|
||||
* I ask and expect, but do not require, that all derivative works contain an
|
||||
* attribution similar to:
|
||||
* Parts developed by Adam Langley <agl@imperialviolet.org>
|
||||
*
|
||||
* You may wish to replace the word "Parts" with something else depending on
|
||||
* the amount of original code.
|
||||
*
|
||||
* (Derivative works does not include programs which link against, run or include
|
||||
* the source verbatim in their source distributions)
|
||||
*/
|
||||
|
||||
/** @file event2/dns.h
|
||||
*
|
||||
* Welcome, gentle reader
|
||||
*
|
||||
* Async DNS lookups are really a whole lot harder than they should be,
|
||||
* mostly stemming from the fact that the libc resolver has never been
|
||||
* very good at them. Before you use this library you should see if libc
|
||||
* can do the job for you with the modern async call getaddrinfo_a
|
||||
* (see http://www.imperialviolet.org/page25.html#e498). Otherwise,
|
||||
* please continue.
|
||||
*
|
||||
* The library keeps track of the state of nameservers and will avoid
|
||||
* them when they go down. Otherwise it will round robin between them.
|
||||
*
|
||||
* Quick start guide:
|
||||
* #include "evdns.h"
|
||||
* void callback(int result, char type, int count, int ttl,
|
||||
* void *addresses, void *arg);
|
||||
* evdns_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf");
|
||||
* evdns_resolve("www.hostname.com", 0, callback, NULL);
|
||||
*
|
||||
* When the lookup is complete the callback function is called. The
|
||||
* first argument will be one of the DNS_ERR_* defines in evdns.h.
|
||||
* Hopefully it will be DNS_ERR_NONE, in which case type will be
|
||||
* DNS_IPv4_A, count will be the number of IP addresses, ttl is the time
|
||||
* which the data can be cached for (in seconds), addresses will point
|
||||
* to an array of uint32_t's and arg will be whatever you passed to
|
||||
* evdns_resolve.
|
||||
*
|
||||
* Searching:
|
||||
*
|
||||
* In order for this library to be a good replacement for glibc's resolver it
|
||||
* supports searching. This involves setting a list of default domains, in
|
||||
* which names will be queried for. The number of dots in the query name
|
||||
* determines the order in which this list is used.
|
||||
*
|
||||
* Searching appears to be a single lookup from the point of view of the API,
|
||||
* although many DNS queries may be generated from a single call to
|
||||
* evdns_resolve. Searching can also drastically slow down the resolution
|
||||
* of names.
|
||||
*
|
||||
* To disable searching:
|
||||
* 1. Never set it up. If you never call evdns_resolv_conf_parse or
|
||||
* evdns_search_add then no searching will occur.
|
||||
*
|
||||
* 2. If you do call evdns_resolv_conf_parse then don't pass
|
||||
* DNS_OPTION_SEARCH (or DNS_OPTIONS_ALL, which implies it).
|
||||
*
|
||||
* 3. When calling evdns_resolve, pass the DNS_QUERY_NO_SEARCH flag.
|
||||
*
|
||||
* The order of searches depends on the number of dots in the name. If the
|
||||
* number is greater than the ndots setting then the names is first tried
|
||||
* globally. Otherwise each search domain is appended in turn.
|
||||
*
|
||||
* The ndots setting can either be set from a resolv.conf, or by calling
|
||||
* evdns_search_ndots_set.
|
||||
*
|
||||
* For example, with ndots set to 1 (the default) and a search domain list of
|
||||
* ["myhome.net"]:
|
||||
* Query: www
|
||||
* Order: www.myhome.net, www.
|
||||
*
|
||||
* Query: www.abc
|
||||
* Order: www.abc., www.abc.myhome.net
|
||||
*
|
||||
* Internals:
|
||||
*
|
||||
* Requests are kept in two queues. The first is the inflight queue. In
|
||||
* this queue requests have an allocated transaction id and nameserver.
|
||||
* They will soon be transmitted if they haven't already been.
|
||||
*
|
||||
* The second is the waiting queue. The size of the inflight ring is
|
||||
* limited and all other requests wait in waiting queue for space. This
|
||||
* bounds the number of concurrent requests so that we don't flood the
|
||||
* nameserver. Several algorithms require a full walk of the inflight
|
||||
* queue and so bounding its size keeps thing going nicely under huge
|
||||
* (many thousands of requests) loads.
|
||||
*
|
||||
* If a nameserver loses too many requests it is considered down and we
|
||||
* try not to use it. After a while we send a probe to that nameserver
|
||||
* (a lookup for google.com) and, if it replies, we consider it working
|
||||
* again. If the nameserver fails a probe we wait longer to try again
|
||||
* with the next probe.
|
||||
*/
|
||||
|
||||
#ifndef EVENT2_DNS_H_INCLUDED_
|
||||
#define EVENT2_DNS_H_INCLUDED_
|
||||
|
||||
#include <event2/visibility.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* For integer types. */
|
||||
#include <event2/util.h>
|
||||
|
||||
/** Error codes 0-5 are as described in RFC 1035. */
|
||||
#define DNS_ERR_NONE 0
|
||||
/** The name server was unable to interpret the query */
|
||||
#define DNS_ERR_FORMAT 1
|
||||
/** The name server was unable to process this query due to a problem with the
|
||||
* name server */
|
||||
#define DNS_ERR_SERVERFAILED 2
|
||||
/** The domain name does not exist */
|
||||
#define DNS_ERR_NOTEXIST 3
|
||||
/** The name server does not support the requested kind of query */
|
||||
#define DNS_ERR_NOTIMPL 4
|
||||
/** The name server refuses to reform the specified operation for policy
|
||||
* reasons */
|
||||
#define DNS_ERR_REFUSED 5
|
||||
/** The reply was truncated or ill-formatted */
|
||||
#define DNS_ERR_TRUNCATED 65
|
||||
/** An unknown error occurred */
|
||||
#define DNS_ERR_UNKNOWN 66
|
||||
/** Communication with the server timed out */
|
||||
#define DNS_ERR_TIMEOUT 67
|
||||
/** The request was canceled because the DNS subsystem was shut down. */
|
||||
#define DNS_ERR_SHUTDOWN 68
|
||||
/** The request was canceled via a call to evdns_cancel_request */
|
||||
#define DNS_ERR_CANCEL 69
|
||||
/** There were no answers and no error condition in the DNS packet.
|
||||
* This can happen when you ask for an address that exists, but a record
|
||||
* type that doesn't. */
|
||||
#define DNS_ERR_NODATA 70
|
||||
|
||||
#define DNS_IPv4_A 1
|
||||
#define DNS_PTR 2
|
||||
#define DNS_IPv6_AAAA 3
|
||||
|
||||
#define DNS_QUERY_NO_SEARCH 1
|
||||
|
||||
#define DNS_OPTION_SEARCH 1
|
||||
#define DNS_OPTION_NAMESERVERS 2
|
||||
#define DNS_OPTION_MISC 4
|
||||
#define DNS_OPTION_HOSTSFILE 8
|
||||
#define DNS_OPTIONS_ALL 15
|
||||
|
||||
/* Obsolete name for DNS_QUERY_NO_SEARCH */
|
||||
#define DNS_NO_SEARCH DNS_QUERY_NO_SEARCH
|
||||
|
||||
/**
|
||||
* The callback that contains the results from a lookup.
|
||||
* - result is one of the DNS_ERR_* values (DNS_ERR_NONE for success)
|
||||
* - type is either DNS_IPv4_A or DNS_PTR or DNS_IPv6_AAAA
|
||||
* - count contains the number of addresses of form type
|
||||
* - ttl is the number of seconds the resolution may be cached for.
|
||||
* - addresses needs to be cast according to type. It will be an array of
|
||||
* 4-byte sequences for ipv4, or an array of 16-byte sequences for ipv6,
|
||||
* or a nul-terminated string for PTR.
|
||||
*/
|
||||
typedef void (*evdns_callback_type) (int result, char type, int count, int ttl, void *addresses, void *arg);
|
||||
|
||||
struct evdns_base;
|
||||
struct event_base;
|
||||
|
||||
/** Flag for evdns_base_new: process resolv.conf. */
|
||||
#define EVDNS_BASE_INITIALIZE_NAMESERVERS 1
|
||||
/** Flag for evdns_base_new: Do not prevent the libevent event loop from
|
||||
* exiting when we have no active dns requests. */
|
||||
#define EVDNS_BASE_DISABLE_WHEN_INACTIVE 0x8000
|
||||
|
||||
/**
|
||||
Initialize the asynchronous DNS library.
|
||||
|
||||
This function initializes support for non-blocking name resolution by
|
||||
calling evdns_resolv_conf_parse() on UNIX and
|
||||
evdns_config_windows_nameservers() on Windows.
|
||||
|
||||
@param event_base the event base to associate the dns client with
|
||||
@param flags any of EVDNS_BASE_INITIALIZE_NAMESERVERS|
|
||||
EVDNS_BASE_DISABLE_WHEN_INACTIVE
|
||||
@return evdns_base object if successful, or NULL if an error occurred.
|
||||
@see evdns_base_free()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct evdns_base * evdns_base_new(struct event_base *event_base, int initialize_nameservers);
|
||||
|
||||
|
||||
/**
|
||||
Shut down the asynchronous DNS resolver and terminate all active requests.
|
||||
|
||||
If the 'fail_requests' option is enabled, all active requests will return
|
||||
an empty result with the error flag set to DNS_ERR_SHUTDOWN. Otherwise,
|
||||
the requests will be silently discarded.
|
||||
|
||||
@param evdns_base the evdns base to free
|
||||
@param fail_requests if zero, active requests will be aborted; if non-zero,
|
||||
active requests will return DNS_ERR_SHUTDOWN.
|
||||
@see evdns_base_new()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_base_free(struct evdns_base *base, int fail_requests);
|
||||
|
||||
/**
|
||||
Remove all hosts entries that have been loaded into the event_base via
|
||||
evdns_base_load_hosts or via event_base_resolv_conf_parse.
|
||||
|
||||
@param evdns_base the evdns base to remove outdated host addresses from
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_base_clear_host_addresses(struct evdns_base *base);
|
||||
|
||||
/**
|
||||
Convert a DNS error code to a string.
|
||||
|
||||
@param err the DNS error code
|
||||
@return a string containing an explanation of the error code
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
const char *evdns_err_to_string(int err);
|
||||
|
||||
|
||||
/**
|
||||
Add a nameserver.
|
||||
|
||||
The address should be an IPv4 address in network byte order.
|
||||
The type of address is chosen so that it matches in_addr.s_addr.
|
||||
|
||||
@param base the evdns_base to which to add the name server
|
||||
@param address an IP address in network byte order
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_base_nameserver_ip_add()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_base_nameserver_add(struct evdns_base *base,
|
||||
unsigned long int address);
|
||||
|
||||
/**
|
||||
Get the number of configured nameservers.
|
||||
|
||||
This returns the number of configured nameservers (not necessarily the
|
||||
number of running nameservers). This is useful for double-checking
|
||||
whether our calls to the various nameserver configuration functions
|
||||
have been successful.
|
||||
|
||||
@param base the evdns_base to which to apply this operation
|
||||
@return the number of configured nameservers
|
||||
@see evdns_base_nameserver_add()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_base_count_nameservers(struct evdns_base *base);
|
||||
|
||||
/**
|
||||
Remove all configured nameservers, and suspend all pending resolves.
|
||||
|
||||
Resolves will not necessarily be re-attempted until evdns_base_resume() is called.
|
||||
|
||||
@param base the evdns_base to which to apply this operation
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_base_resume()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_base_clear_nameservers_and_suspend(struct evdns_base *base);
|
||||
|
||||
|
||||
/**
|
||||
Resume normal operation and continue any suspended resolve requests.
|
||||
|
||||
Re-attempt resolves left in limbo after an earlier call to
|
||||
evdns_base_clear_nameservers_and_suspend().
|
||||
|
||||
@param base the evdns_base to which to apply this operation
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_base_clear_nameservers_and_suspend()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_base_resume(struct evdns_base *base);
|
||||
|
||||
/**
|
||||
Add a nameserver by string address.
|
||||
|
||||
This function parses a n IPv4 or IPv6 address from a string and adds it as a
|
||||
nameserver. It supports the following formats:
|
||||
- [IPv6Address]:port
|
||||
- [IPv6Address]
|
||||
- IPv6Address
|
||||
- IPv4Address:port
|
||||
- IPv4Address
|
||||
|
||||
If no port is specified, it defaults to 53.
|
||||
|
||||
@param base the evdns_base to which to apply this operation
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_base_nameserver_add()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_base_nameserver_ip_add(struct evdns_base *base,
|
||||
const char *ip_as_string);
|
||||
|
||||
/**
|
||||
Add a nameserver by sockaddr.
|
||||
**/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int
|
||||
evdns_base_nameserver_sockaddr_add(struct evdns_base *base,
|
||||
const struct sockaddr *sa, ev_socklen_t len, unsigned flags);
|
||||
|
||||
struct evdns_request;
|
||||
|
||||
/**
|
||||
Lookup an A record for a given name.
|
||||
|
||||
@param base the evdns_base to which to apply this operation
|
||||
@param name a DNS hostname
|
||||
@param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
|
||||
@param callback a callback function to invoke when the request is completed
|
||||
@param ptr an argument to pass to the callback function
|
||||
@return an evdns_request object if successful, or NULL if an error occurred.
|
||||
@see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6(), evdns_cancel_request()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct evdns_request *evdns_base_resolve_ipv4(struct evdns_base *base, const char *name, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
/**
|
||||
Lookup an AAAA record for a given name.
|
||||
|
||||
@param base the evdns_base to which to apply this operation
|
||||
@param name a DNS hostname
|
||||
@param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
|
||||
@param callback a callback function to invoke when the request is completed
|
||||
@param ptr an argument to pass to the callback function
|
||||
@return an evdns_request object if successful, or NULL if an error occurred.
|
||||
@see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6(), evdns_cancel_request()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct evdns_request *evdns_base_resolve_ipv6(struct evdns_base *base, const char *name, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
struct in_addr;
|
||||
struct in6_addr;
|
||||
|
||||
/**
|
||||
Lookup a PTR record for a given IP address.
|
||||
|
||||
@param base the evdns_base to which to apply this operation
|
||||
@param in an IPv4 address
|
||||
@param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
|
||||
@param callback a callback function to invoke when the request is completed
|
||||
@param ptr an argument to pass to the callback function
|
||||
@return an evdns_request object if successful, or NULL if an error occurred.
|
||||
@see evdns_resolve_reverse_ipv6(), evdns_cancel_request()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct evdns_request *evdns_base_resolve_reverse(struct evdns_base *base, const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
|
||||
/**
|
||||
Lookup a PTR record for a given IPv6 address.
|
||||
|
||||
@param base the evdns_base to which to apply this operation
|
||||
@param in an IPv6 address
|
||||
@param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
|
||||
@param callback a callback function to invoke when the request is completed
|
||||
@param ptr an argument to pass to the callback function
|
||||
@return an evdns_request object if successful, or NULL if an error occurred.
|
||||
@see evdns_resolve_reverse_ipv6(), evdns_cancel_request()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct evdns_request *evdns_base_resolve_reverse_ipv6(struct evdns_base *base, const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
/**
|
||||
Cancels a pending DNS resolution request.
|
||||
|
||||
@param base the evdns_base that was used to make the request
|
||||
@param req the evdns_request that was returned by calling a resolve function
|
||||
@see evdns_base_resolve_ipv4(), evdns_base_resolve_ipv6, evdns_base_resolve_reverse
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_cancel_request(struct evdns_base *base, struct evdns_request *req);
|
||||
|
||||
/**
|
||||
Set the value of a configuration option.
|
||||
|
||||
The currently available configuration options are:
|
||||
|
||||
ndots, timeout, max-timeouts, max-inflight, attempts, randomize-case,
|
||||
bind-to, initial-probe-timeout, getaddrinfo-allow-skew.
|
||||
|
||||
In versions before Libevent 2.0.3-alpha, the option name needed to end with
|
||||
a colon.
|
||||
|
||||
@param base the evdns_base to which to apply this operation
|
||||
@param option the name of the configuration option to be modified
|
||||
@param val the value to be set
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_base_set_option(struct evdns_base *base, const char *option, const char *val);
|
||||
|
||||
|
||||
/**
|
||||
Parse a resolv.conf file.
|
||||
|
||||
The 'flags' parameter determines what information is parsed from the
|
||||
resolv.conf file. See the man page for resolv.conf for the format of this
|
||||
file.
|
||||
|
||||
The following directives are not parsed from the file: sortlist, rotate,
|
||||
no-check-names, inet6, debug.
|
||||
|
||||
If this function encounters an error, the possible return values are: 1 =
|
||||
failed to open file, 2 = failed to stat file, 3 = file too large, 4 = out of
|
||||
memory, 5 = short read from file, 6 = no nameservers listed in the file
|
||||
|
||||
@param base the evdns_base to which to apply this operation
|
||||
@param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC|
|
||||
DNS_OPTION_HOSTSFILE|DNS_OPTIONS_ALL
|
||||
@param filename the path to the resolv.conf file
|
||||
@return 0 if successful, or various positive error codes if an error
|
||||
occurred (see above)
|
||||
@see resolv.conf(3), evdns_config_windows_nameservers()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_base_resolv_conf_parse(struct evdns_base *base, int flags, const char *const filename);
|
||||
|
||||
/**
|
||||
Load an /etc/hosts-style file from 'hosts_fname' into 'base'.
|
||||
|
||||
If hosts_fname is NULL, add minimal entries for localhost, and nothing
|
||||
else.
|
||||
|
||||
Note that only evdns_getaddrinfo uses the /etc/hosts entries.
|
||||
|
||||
This function does not replace previously loaded hosts entries; to do that,
|
||||
call evdns_base_clear_host_addresses first.
|
||||
|
||||
Return 0 on success, negative on failure.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_base_load_hosts(struct evdns_base *base, const char *hosts_fname);
|
||||
|
||||
/**
|
||||
Obtain nameserver information using the Windows API.
|
||||
|
||||
Attempt to configure a set of nameservers based on platform settings on
|
||||
a win32 host. Preferentially tries to use GetNetworkParams; if that fails,
|
||||
looks in the registry.
|
||||
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_resolv_conf_parse()
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_base_config_windows_nameservers(struct evdns_base *);
|
||||
#define EVDNS_BASE_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
Clear the list of search domains.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_base_search_clear(struct evdns_base *base);
|
||||
|
||||
|
||||
/**
|
||||
Add a domain to the list of search domains
|
||||
|
||||
@param domain the domain to be added to the search list
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_base_search_add(struct evdns_base *base, const char *domain);
|
||||
|
||||
|
||||
/**
|
||||
Set the 'ndots' parameter for searches.
|
||||
|
||||
Sets the number of dots which, when found in a name, causes
|
||||
the first query to be without any search domain.
|
||||
|
||||
@param ndots the new ndots parameter
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_base_search_ndots_set(struct evdns_base *base, const int ndots);
|
||||
|
||||
/**
|
||||
A callback that is invoked when a log message is generated
|
||||
|
||||
@param is_warning indicates if the log message is a 'warning'
|
||||
@param msg the content of the log message
|
||||
*/
|
||||
typedef void (*evdns_debug_log_fn_type)(int is_warning, const char *msg);
|
||||
|
||||
|
||||
/**
|
||||
Set the callback function to handle DNS log messages. If this
|
||||
callback is not set, evdns log messages are handled with the regular
|
||||
Libevent logging system.
|
||||
|
||||
@param fn the callback to be invoked when a log message is generated
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_set_log_fn(evdns_debug_log_fn_type fn);
|
||||
|
||||
/**
|
||||
Set a callback that will be invoked to generate transaction IDs. By
|
||||
default, we pick transaction IDs based on the current clock time, which
|
||||
is bad for security.
|
||||
|
||||
@param fn the new callback, or NULL to use the default.
|
||||
|
||||
NOTE: This function has no effect in Libevent 2.0.4-alpha and later,
|
||||
since Libevent now provides its own secure RNG.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_set_transaction_id_fn(ev_uint16_t (*fn)(void));
|
||||
|
||||
/**
|
||||
Set a callback used to generate random bytes. By default, we use
|
||||
the same function as passed to evdns_set_transaction_id_fn to generate
|
||||
bytes two at a time. If a function is provided here, it's also used
|
||||
to generate transaction IDs.
|
||||
|
||||
NOTE: This function has no effect in Libevent 2.0.4-alpha and later,
|
||||
since Libevent now provides its own secure RNG.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_set_random_bytes_fn(void (*fn)(char *, size_t));
|
||||
|
||||
/*
|
||||
* Functions used to implement a DNS server.
|
||||
*/
|
||||
|
||||
struct evdns_server_request;
|
||||
struct evdns_server_question;
|
||||
|
||||
/**
|
||||
A callback to implement a DNS server. The callback function receives a DNS
|
||||
request. It should then optionally add a number of answers to the reply
|
||||
using the evdns_server_request_add_*_reply functions, before calling either
|
||||
evdns_server_request_respond to send the reply back, or
|
||||
evdns_server_request_drop to decline to answer the request.
|
||||
|
||||
@param req A newly received request
|
||||
@param user_data A pointer that was passed to
|
||||
evdns_add_server_port_with_base().
|
||||
*/
|
||||
typedef void (*evdns_request_callback_fn_type)(struct evdns_server_request *, void *);
|
||||
#define EVDNS_ANSWER_SECTION 0
|
||||
#define EVDNS_AUTHORITY_SECTION 1
|
||||
#define EVDNS_ADDITIONAL_SECTION 2
|
||||
|
||||
#define EVDNS_TYPE_A 1
|
||||
#define EVDNS_TYPE_NS 2
|
||||
#define EVDNS_TYPE_CNAME 5
|
||||
#define EVDNS_TYPE_SOA 6
|
||||
#define EVDNS_TYPE_PTR 12
|
||||
#define EVDNS_TYPE_MX 15
|
||||
#define EVDNS_TYPE_TXT 16
|
||||
#define EVDNS_TYPE_AAAA 28
|
||||
|
||||
#define EVDNS_QTYPE_AXFR 252
|
||||
#define EVDNS_QTYPE_ALL 255
|
||||
|
||||
#define EVDNS_CLASS_INET 1
|
||||
|
||||
/* flags that can be set in answers; as part of the err parameter */
|
||||
#define EVDNS_FLAGS_AA 0x400
|
||||
#define EVDNS_FLAGS_RD 0x080
|
||||
|
||||
/** Create a new DNS server port.
|
||||
|
||||
@param base The event base to handle events for the server port.
|
||||
@param socket A UDP socket to accept DNS requests.
|
||||
@param flags Always 0 for now.
|
||||
@param callback A function to invoke whenever we get a DNS request
|
||||
on the socket.
|
||||
@param user_data Data to pass to the callback.
|
||||
@return an evdns_server_port structure for this server port.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct evdns_server_port *evdns_add_server_port_with_base(struct event_base *base, evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data);
|
||||
/** Close down a DNS server port, and free associated structures. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_close_server_port(struct evdns_server_port *port);
|
||||
|
||||
/** Sets some flags in a reply we're building.
|
||||
Allows setting of the AA or RD flags
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_server_request_set_flags(struct evdns_server_request *req, int flags);
|
||||
|
||||
/* Functions to add an answer to an in-progress DNS reply.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_server_request_add_reply(struct evdns_server_request *req, int section, const char *name, int type, int dns_class, int ttl, int datalen, int is_name, const char *data);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_server_request_add_aaaa_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_server_request_add_ptr_reply(struct evdns_server_request *req, struct in_addr *in, const char *inaddr_name, const char *hostname, int ttl);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_server_request_add_cname_reply(struct evdns_server_request *req, const char *name, const char *cname, int ttl);
|
||||
|
||||
/**
|
||||
Send back a response to a DNS request, and free the request structure.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_server_request_respond(struct evdns_server_request *req, int err);
|
||||
/**
|
||||
Free a DNS request without sending back a reply.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_server_request_drop(struct evdns_server_request *req);
|
||||
struct sockaddr;
|
||||
/**
|
||||
Get the address that made a DNS request.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_server_request_get_requesting_addr(struct evdns_server_request *req, struct sockaddr *sa, int addr_len);
|
||||
|
||||
/** Callback for evdns_getaddrinfo. */
|
||||
typedef void (*evdns_getaddrinfo_cb)(int result, struct evutil_addrinfo *res, void *arg);
|
||||
|
||||
struct evdns_base;
|
||||
struct evdns_getaddrinfo_request;
|
||||
/** Make a non-blocking getaddrinfo request using the dns_base in 'dns_base'.
|
||||
*
|
||||
* If we can answer the request immediately (with an error or not!), then we
|
||||
* invoke cb immediately and return NULL. Otherwise we return
|
||||
* an evdns_getaddrinfo_request and invoke cb later.
|
||||
*
|
||||
* When the callback is invoked, we pass as its first argument the error code
|
||||
* that getaddrinfo would return (or 0 for no error). As its second argument,
|
||||
* we pass the evutil_addrinfo structures we found (or NULL on error). We
|
||||
* pass 'arg' as the third argument.
|
||||
*
|
||||
* Limitations:
|
||||
*
|
||||
* - The AI_V4MAPPED and AI_ALL flags are not currently implemented.
|
||||
* - For ai_socktype, we only handle SOCKTYPE_STREAM, SOCKTYPE_UDP, and 0.
|
||||
* - For ai_protocol, we only handle IPPROTO_TCP, IPPROTO_UDP, and 0.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct evdns_getaddrinfo_request *evdns_getaddrinfo(
|
||||
struct evdns_base *dns_base,
|
||||
const char *nodename, const char *servname,
|
||||
const struct evutil_addrinfo *hints_in,
|
||||
evdns_getaddrinfo_cb cb, void *arg);
|
||||
|
||||
/* Cancel an in-progress evdns_getaddrinfo. This MUST NOT be called after the
|
||||
* getaddrinfo's callback has been invoked. The resolves will be canceled,
|
||||
* and the callback will be invoked with the error EVUTIL_EAI_CANCEL. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evdns_getaddrinfo_cancel(struct evdns_getaddrinfo_request *req);
|
||||
|
||||
/**
|
||||
Retrieve the address of the 'idx'th configured nameserver.
|
||||
|
||||
@param base The evdns_base to examine.
|
||||
@param idx The index of the nameserver to get the address of.
|
||||
@param sa A location to receive the server's address.
|
||||
@param len The number of bytes available at sa.
|
||||
|
||||
@return the number of bytes written into sa on success. On failure, returns
|
||||
-1 if idx is greater than the number of configured nameservers, or a
|
||||
value greater than 'len' if len was not high enough.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evdns_base_get_nameserver_addr(struct evdns_base *base, int idx,
|
||||
struct sockaddr *sa, ev_socklen_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !EVENT2_DNS_H_INCLUDED_ */
|
||||
336
cache/include/libevent2/event2/dns_compat.h
vendored
336
cache/include/libevent2/event2/dns_compat.h
vendored
@@ -1,336 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_DNS_COMPAT_H_INCLUDED_
|
||||
#define EVENT2_DNS_COMPAT_H_INCLUDED_
|
||||
|
||||
/** @file event2/dns_compat.h
|
||||
|
||||
Potentially non-threadsafe versions of the functions in dns.h: provided
|
||||
only for backwards compatibility.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event-config.h>
|
||||
#ifdef EVENT__HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* For int types. */
|
||||
#include <event2/util.h>
|
||||
|
||||
/**
|
||||
Initialize the asynchronous DNS library.
|
||||
|
||||
This function initializes support for non-blocking name resolution by
|
||||
calling evdns_resolv_conf_parse() on UNIX and
|
||||
evdns_config_windows_nameservers() on Windows.
|
||||
|
||||
@deprecated This function is deprecated because it always uses the current
|
||||
event base, and is easily confused by multiple calls to event_init(), and
|
||||
so is not safe for multithreaded use. Additionally, it allocates a global
|
||||
structure that only one thread can use. The replacement is
|
||||
evdns_base_new().
|
||||
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_shutdown()
|
||||
*/
|
||||
int evdns_init(void);
|
||||
|
||||
struct evdns_base;
|
||||
/**
|
||||
Return the global evdns_base created by event_init() and used by the other
|
||||
deprecated functions.
|
||||
|
||||
@deprecated This function is deprecated because use of the global
|
||||
evdns_base is error-prone.
|
||||
*/
|
||||
struct evdns_base *evdns_get_global_base(void);
|
||||
|
||||
/**
|
||||
Shut down the asynchronous DNS resolver and terminate all active requests.
|
||||
|
||||
If the 'fail_requests' option is enabled, all active requests will return
|
||||
an empty result with the error flag set to DNS_ERR_SHUTDOWN. Otherwise,
|
||||
the requests will be silently discarded.
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_shutdown().
|
||||
|
||||
@param fail_requests if zero, active requests will be aborted; if non-zero,
|
||||
active requests will return DNS_ERR_SHUTDOWN.
|
||||
@see evdns_init()
|
||||
*/
|
||||
void evdns_shutdown(int fail_requests);
|
||||
|
||||
/**
|
||||
Add a nameserver.
|
||||
|
||||
The address should be an IPv4 address in network byte order.
|
||||
The type of address is chosen so that it matches in_addr.s_addr.
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_nameserver_add().
|
||||
|
||||
@param address an IP address in network byte order
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_nameserver_ip_add()
|
||||
*/
|
||||
int evdns_nameserver_add(unsigned long int address);
|
||||
|
||||
/**
|
||||
Get the number of configured nameservers.
|
||||
|
||||
This returns the number of configured nameservers (not necessarily the
|
||||
number of running nameservers). This is useful for double-checking
|
||||
whether our calls to the various nameserver configuration functions
|
||||
have been successful.
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_count_nameservers().
|
||||
|
||||
@return the number of configured nameservers
|
||||
@see evdns_nameserver_add()
|
||||
*/
|
||||
int evdns_count_nameservers(void);
|
||||
|
||||
/**
|
||||
Remove all configured nameservers, and suspend all pending resolves.
|
||||
|
||||
Resolves will not necessarily be re-attempted until evdns_resume() is called.
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_clear_nameservers_and_suspend().
|
||||
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_resume()
|
||||
*/
|
||||
int evdns_clear_nameservers_and_suspend(void);
|
||||
|
||||
/**
|
||||
Resume normal operation and continue any suspended resolve requests.
|
||||
|
||||
Re-attempt resolves left in limbo after an earlier call to
|
||||
evdns_clear_nameservers_and_suspend().
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_resume().
|
||||
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_clear_nameservers_and_suspend()
|
||||
*/
|
||||
int evdns_resume(void);
|
||||
|
||||
/**
|
||||
Add a nameserver.
|
||||
|
||||
This wraps the evdns_nameserver_add() function by parsing a string as an IP
|
||||
address and adds it as a nameserver.
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_nameserver_ip_add().
|
||||
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_nameserver_add()
|
||||
*/
|
||||
int evdns_nameserver_ip_add(const char *ip_as_string);
|
||||
|
||||
/**
|
||||
Lookup an A record for a given name.
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_resolve_ipv4().
|
||||
|
||||
@param name a DNS hostname
|
||||
@param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
|
||||
@param callback a callback function to invoke when the request is completed
|
||||
@param ptr an argument to pass to the callback function
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6()
|
||||
*/
|
||||
int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
/**
|
||||
Lookup an AAAA record for a given name.
|
||||
|
||||
@param name a DNS hostname
|
||||
@param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
|
||||
@param callback a callback function to invoke when the request is completed
|
||||
@param ptr an argument to pass to the callback function
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6()
|
||||
*/
|
||||
int evdns_resolve_ipv6(const char *name, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
struct in_addr;
|
||||
struct in6_addr;
|
||||
|
||||
/**
|
||||
Lookup a PTR record for a given IP address.
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_resolve_reverse().
|
||||
|
||||
@param in an IPv4 address
|
||||
@param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
|
||||
@param callback a callback function to invoke when the request is completed
|
||||
@param ptr an argument to pass to the callback function
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_resolve_reverse_ipv6()
|
||||
*/
|
||||
int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
/**
|
||||
Lookup a PTR record for a given IPv6 address.
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_resolve_reverse_ipv6().
|
||||
|
||||
@param in an IPv6 address
|
||||
@param flags either 0, or DNS_QUERY_NO_SEARCH to disable searching for this query.
|
||||
@param callback a callback function to invoke when the request is completed
|
||||
@param ptr an argument to pass to the callback function
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_resolve_reverse_ipv6()
|
||||
*/
|
||||
int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
/**
|
||||
Set the value of a configuration option.
|
||||
|
||||
The currently available configuration options are:
|
||||
|
||||
ndots, timeout, max-timeouts, max-inflight, and attempts
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_set_option().
|
||||
|
||||
@param option the name of the configuration option to be modified
|
||||
@param val the value to be set
|
||||
@param flags Ignored.
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
*/
|
||||
int evdns_set_option(const char *option, const char *val, int flags);
|
||||
|
||||
/**
|
||||
Parse a resolv.conf file.
|
||||
|
||||
The 'flags' parameter determines what information is parsed from the
|
||||
resolv.conf file. See the man page for resolv.conf for the format of this
|
||||
file.
|
||||
|
||||
The following directives are not parsed from the file: sortlist, rotate,
|
||||
no-check-names, inet6, debug.
|
||||
|
||||
If this function encounters an error, the possible return values are: 1 =
|
||||
failed to open file, 2 = failed to stat file, 3 = file too large, 4 = out of
|
||||
memory, 5 = short read from file, 6 = no nameservers listed in the file
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_resolv_conf_parse().
|
||||
|
||||
@param flags any of DNS_OPTION_NAMESERVERS|DNS_OPTION_SEARCH|DNS_OPTION_MISC|
|
||||
DNS_OPTIONS_ALL
|
||||
@param filename the path to the resolv.conf file
|
||||
@return 0 if successful, or various positive error codes if an error
|
||||
occurred (see above)
|
||||
@see resolv.conf(3), evdns_config_windows_nameservers()
|
||||
*/
|
||||
int evdns_resolv_conf_parse(int flags, const char *const filename);
|
||||
|
||||
/**
|
||||
Clear the list of search domains.
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_search_clear().
|
||||
*/
|
||||
void evdns_search_clear(void);
|
||||
|
||||
/**
|
||||
Add a domain to the list of search domains
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_search_add().
|
||||
|
||||
@param domain the domain to be added to the search list
|
||||
*/
|
||||
void evdns_search_add(const char *domain);
|
||||
|
||||
/**
|
||||
Set the 'ndots' parameter for searches.
|
||||
|
||||
Sets the number of dots which, when found in a name, causes
|
||||
the first query to be without any search domain.
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_search_ndots_set().
|
||||
|
||||
@param ndots the new ndots parameter
|
||||
*/
|
||||
void evdns_search_ndots_set(const int ndots);
|
||||
|
||||
/**
|
||||
As evdns_server_new_with_base.
|
||||
|
||||
@deprecated This function is deprecated because it does not allow the
|
||||
caller to specify which even_base it uses. The recommended
|
||||
function is evdns_add_server_port_with_base().
|
||||
|
||||
*/
|
||||
struct evdns_server_port *evdns_add_server_port(evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data);
|
||||
|
||||
#ifdef _WIN32
|
||||
int evdns_config_windows_nameservers(void);
|
||||
#define EVDNS_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */
|
||||
80
cache/include/libevent2/event2/dns_struct.h
vendored
80
cache/include/libevent2/event2/dns_struct.h
vendored
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_DNS_STRUCT_H_INCLUDED_
|
||||
#define EVENT2_DNS_STRUCT_H_INCLUDED_
|
||||
|
||||
/** @file event2/dns_struct.h
|
||||
|
||||
Data structures for dns. Using these structures may hurt forward
|
||||
compatibility with later versions of Libevent: be careful!
|
||||
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event-config.h>
|
||||
#ifdef EVENT__HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* For int types. */
|
||||
#include <event2/util.h>
|
||||
|
||||
/*
|
||||
* Structures used to implement a DNS server.
|
||||
*/
|
||||
|
||||
struct evdns_server_request {
|
||||
int flags;
|
||||
int nquestions;
|
||||
struct evdns_server_question **questions;
|
||||
};
|
||||
struct evdns_server_question {
|
||||
int type;
|
||||
#ifdef __cplusplus
|
||||
int dns_question_class;
|
||||
#else
|
||||
/* You should refer to this field as "dns_question_class". The
|
||||
* name "class" works in C for backward compatibility, and will be
|
||||
* removed in a future version. (1.5 or later). */
|
||||
int class;
|
||||
#define dns_question_class class
|
||||
#endif
|
||||
char name[1];
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_DNS_STRUCT_H_INCLUDED_ */
|
||||
|
||||
545
cache/include/libevent2/event2/event-config.h
vendored
545
cache/include/libevent2/event2/event-config.h
vendored
@@ -1,545 +0,0 @@
|
||||
/* event2/event-config.h
|
||||
*
|
||||
* This file was generated by autoconf when libevent was built, and post-
|
||||
* processed by Libevent so that its macros would have a uniform prefix.
|
||||
*
|
||||
* DO NOT EDIT THIS FILE.
|
||||
*
|
||||
* Do not rely on macros in this file existing in later versions.
|
||||
*/
|
||||
|
||||
#ifndef EVENT2_EVENT_CONFIG_H_INCLUDED_
|
||||
#define EVENT2_EVENT_CONFIG_H_INCLUDED_
|
||||
|
||||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if libevent should build without support for a debug mode */
|
||||
/* #undef EVENT__DISABLE_DEBUG_MODE */
|
||||
|
||||
/* Define if libevent should not allow replacing the mm functions */
|
||||
/* #undef EVENT__DISABLE_MM_REPLACEMENT */
|
||||
|
||||
/* Define if libevent should not be compiled with thread support */
|
||||
/* #undef EVENT__DISABLE_THREAD_SUPPORT */
|
||||
|
||||
/* Define to 1 if you have the `accept4' function. */
|
||||
#define EVENT__HAVE_ACCEPT4 1
|
||||
|
||||
/* Define to 1 if you have the `arc4random' function. */
|
||||
/* #undef EVENT__HAVE_ARC4RANDOM */
|
||||
|
||||
/* Define to 1 if you have the `arc4random_buf' function. */
|
||||
/* #undef EVENT__HAVE_ARC4RANDOM_BUF */
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define EVENT__HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define to 1 if you have the `clock_gettime' function. */
|
||||
#define EVENT__HAVE_CLOCK_GETTIME 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `CTL_KERN', and to 0 if you
|
||||
don't. */
|
||||
#define EVENT__HAVE_DECL_CTL_KERN 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `KERN_ARND', and to 0 if you
|
||||
don't. */
|
||||
#define EVENT__HAVE_DECL_KERN_ARND 0
|
||||
|
||||
/* Define to 1 if you have the declaration of `KERN_RANDOM', and to 0 if you
|
||||
don't. */
|
||||
#define EVENT__HAVE_DECL_KERN_RANDOM 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `RANDOM_UUID', and to 0 if you
|
||||
don't. */
|
||||
#define EVENT__HAVE_DECL_RANDOM_UUID 1
|
||||
|
||||
/* Define if /dev/poll is available */
|
||||
/* #undef EVENT__HAVE_DEVPOLL */
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define EVENT__HAVE_DLFCN_H 1
|
||||
|
||||
/* Define if your system supports the epoll system calls */
|
||||
#define EVENT__HAVE_EPOLL 1
|
||||
|
||||
/* Define to 1 if you have the `epoll_create1' function. */
|
||||
#define EVENT__HAVE_EPOLL_CREATE1 1
|
||||
|
||||
/* Define to 1 if you have the `epoll_ctl' function. */
|
||||
#define EVENT__HAVE_EPOLL_CTL 1
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#define EVENT__HAVE_ERRNO_H 1
|
||||
|
||||
/* Define to 1 if you have ERR_remove_thread_stat(). */
|
||||
#define EVENT__HAVE_ERR_REMOVE_THREAD_STATE 1
|
||||
|
||||
/* Define to 1 if you have the `eventfd' function. */
|
||||
#define EVENT__HAVE_EVENTFD 1
|
||||
|
||||
/* Define if your system supports event ports */
|
||||
/* #undef EVENT__HAVE_EVENT_PORTS */
|
||||
|
||||
/* Define to 1 if you have the `fcntl' function. */
|
||||
#define EVENT__HAVE_FCNTL 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define EVENT__HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if the system has the type `fd_mask'. */
|
||||
#define EVENT__HAVE_FD_MASK 1
|
||||
|
||||
/* Do we have getaddrinfo()? */
|
||||
#define EVENT__HAVE_GETADDRINFO 1
|
||||
|
||||
/* Define to 1 if you have the `getegid' function. */
|
||||
#define EVENT__HAVE_GETEGID 1
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#define EVENT__HAVE_GETEUID 1
|
||||
|
||||
/* Define this if you have any gethostbyname_r() */
|
||||
/* #undef EVENT__HAVE_GETHOSTBYNAME_R */
|
||||
|
||||
/* Define this if gethostbyname_r takes 3 arguments */
|
||||
/* #undef EVENT__HAVE_GETHOSTBYNAME_R_3_ARG */
|
||||
|
||||
/* Define this if gethostbyname_r takes 5 arguments */
|
||||
/* #undef EVENT__HAVE_GETHOSTBYNAME_R_5_ARG */
|
||||
|
||||
/* Define this if gethostbyname_r takes 6 arguments */
|
||||
/* #undef EVENT__HAVE_GETHOSTBYNAME_R_6_ARG */
|
||||
|
||||
/* Define to 1 if you have the `getifaddrs' function. */
|
||||
#define EVENT__HAVE_GETIFADDRS 1
|
||||
|
||||
/* Define to 1 if you have the `getnameinfo' function. */
|
||||
#define EVENT__HAVE_GETNAMEINFO 1
|
||||
|
||||
/* Define to 1 if you have the `getprotobynumber' function. */
|
||||
#define EVENT__HAVE_GETPROTOBYNUMBER 1
|
||||
|
||||
/* Define to 1 if you have the `getservbyname' function. */
|
||||
#define EVENT__HAVE_GETSERVBYNAME 1
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define EVENT__HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the <ifaddrs.h> header file. */
|
||||
#define EVENT__HAVE_IFADDRS_H 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntop' function. */
|
||||
#define EVENT__HAVE_INET_NTOP 1
|
||||
|
||||
/* Define to 1 if you have the `inet_pton' function. */
|
||||
#define EVENT__HAVE_INET_PTON 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define EVENT__HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `issetugid' function. */
|
||||
/* #undef EVENT__HAVE_ISSETUGID */
|
||||
|
||||
/* Define to 1 if you have the `kqueue' function. */
|
||||
/* #undef EVENT__HAVE_KQUEUE */
|
||||
|
||||
/* Define if the system has zlib */
|
||||
#define EVENT__HAVE_LIBZ 1
|
||||
|
||||
/* Define to 1 if you have the `mach_absolute_time' function. */
|
||||
/* #undef EVENT__HAVE_MACH_ABSOLUTE_TIME */
|
||||
|
||||
/* Define to 1 if you have the <mach/mach_time.h> header file. */
|
||||
/* #undef EVENT__HAVE_MACH_MACH_TIME_H */
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define EVENT__HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
#define EVENT__HAVE_MMAP 1
|
||||
|
||||
/* Define to 1 if you have the `nanosleep' function. */
|
||||
#define EVENT__HAVE_NANOSLEEP 1
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#define EVENT__HAVE_NETDB_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in6.h> header file. */
|
||||
/* #undef EVENT__HAVE_NETINET_IN6_H */
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define EVENT__HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||
#define EVENT__HAVE_NETINET_TCP_H 1
|
||||
|
||||
/* Define if the system has openssl */
|
||||
#define EVENT__HAVE_OPENSSL 1
|
||||
|
||||
/* Define to 1 if you have the `pipe' function. */
|
||||
#define EVENT__HAVE_PIPE 1
|
||||
|
||||
/* Define to 1 if you have the `pipe2' function. */
|
||||
#define EVENT__HAVE_PIPE2 1
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#define EVENT__HAVE_POLL 1
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#define EVENT__HAVE_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the `port_create' function. */
|
||||
/* #undef EVENT__HAVE_PORT_CREATE */
|
||||
|
||||
/* Define to 1 if you have the <port.h> header file. */
|
||||
/* #undef EVENT__HAVE_PORT_H */
|
||||
|
||||
/* Define if you have POSIX threads libraries and header files. */
|
||||
/* #undef EVENT__HAVE_PTHREAD */
|
||||
|
||||
/* Define if we have pthreads on this system */
|
||||
#define EVENT__HAVE_PTHREADS 1
|
||||
|
||||
/* Define to 1 if you have the `putenv' function. */
|
||||
#define EVENT__HAVE_PUTENV 1
|
||||
|
||||
/* Define to 1 if the system has the type `sa_family_t'. */
|
||||
#define EVENT__HAVE_SA_FAMILY_T 1
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#define EVENT__HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have the `sendfile' function. */
|
||||
#define EVENT__HAVE_SENDFILE 1
|
||||
|
||||
/* Define to 1 if you have the `setenv' function. */
|
||||
#define EVENT__HAVE_SETENV 1
|
||||
|
||||
/* Define if F_SETFD is defined in <fcntl.h> */
|
||||
#define EVENT__HAVE_SETFD 1
|
||||
|
||||
/* Define to 1 if you have the `setrlimit' function. */
|
||||
#define EVENT__HAVE_SETRLIMIT 1
|
||||
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#define EVENT__HAVE_SIGACTION 1
|
||||
|
||||
/* Define to 1 if you have the `signal' function. */
|
||||
#define EVENT__HAVE_SIGNAL 1
|
||||
|
||||
/* Define to 1 if you have the `splice' function. */
|
||||
#define EVENT__HAVE_SPLICE 1
|
||||
|
||||
/* Define to 1 if you have the <stdarg.h> header file. */
|
||||
#define EVENT__HAVE_STDARG_H 1
|
||||
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#define EVENT__HAVE_STDDEF_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define EVENT__HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define EVENT__HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define EVENT__HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define EVENT__HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
/* #undef EVENT__HAVE_STRLCPY */
|
||||
|
||||
/* Define to 1 if you have the `strsep' function. */
|
||||
#define EVENT__HAVE_STRSEP 1
|
||||
|
||||
/* Define to 1 if you have the `strtok_r' function. */
|
||||
#define EVENT__HAVE_STRTOK_R 1
|
||||
|
||||
/* Define to 1 if you have the `strtoll' function. */
|
||||
#define EVENT__HAVE_STRTOLL 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct addrinfo'. */
|
||||
#define EVENT__HAVE_STRUCT_ADDRINFO 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct in6_addr'. */
|
||||
#define EVENT__HAVE_STRUCT_IN6_ADDR 1
|
||||
|
||||
/* Define to 1 if `s6_addr16' is a member of `struct in6_addr'. */
|
||||
#define EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1
|
||||
|
||||
/* Define to 1 if `s6_addr32' is a member of `struct in6_addr'. */
|
||||
#define EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct sockaddr_in6'. */
|
||||
#define EVENT__HAVE_STRUCT_SOCKADDR_IN6 1
|
||||
|
||||
/* Define to 1 if `sin6_len' is a member of `struct sockaddr_in6'. */
|
||||
/* #undef EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN */
|
||||
|
||||
/* Define to 1 if `sin_len' is a member of `struct sockaddr_in'. */
|
||||
/* #undef EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
|
||||
|
||||
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
|
||||
#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1
|
||||
|
||||
/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
|
||||
#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
|
||||
|
||||
/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */
|
||||
/* #undef EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */
|
||||
|
||||
/* Define to 1 if the system has the type `struct so_linger'. */
|
||||
/* #undef EVENT__HAVE_STRUCT_SO_LINGER */
|
||||
|
||||
/* Define to 1 if you have the `sysctl' function. */
|
||||
#define EVENT__HAVE_SYSCTL 1
|
||||
|
||||
/* Define to 1 if you have the <sys/devpoll.h> header file. */
|
||||
/* #undef EVENT__HAVE_SYS_DEVPOLL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
#define EVENT__HAVE_SYS_EPOLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/eventfd.h> header file. */
|
||||
#define EVENT__HAVE_SYS_EVENTFD_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/event.h> header file. */
|
||||
/* #undef EVENT__HAVE_SYS_EVENT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#define EVENT__HAVE_SYS_IOCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||
#define EVENT__HAVE_SYS_MMAN_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define EVENT__HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/queue.h> header file. */
|
||||
#define EVENT__HAVE_SYS_QUEUE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
#define EVENT__HAVE_SYS_RESOURCE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define EVENT__HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sendfile.h> header file. */
|
||||
#define EVENT__HAVE_SYS_SENDFILE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define EVENT__HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define EVENT__HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sysctl.h> header file. */
|
||||
#define EVENT__HAVE_SYS_SYSCTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/timerfd.h> header file. */
|
||||
#define EVENT__HAVE_SYS_TIMERFD_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define EVENT__HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define EVENT__HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||
#define EVENT__HAVE_SYS_UIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
#define EVENT__HAVE_SYS_WAIT_H 1
|
||||
|
||||
/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
|
||||
#define EVENT__HAVE_TAILQFOREACH 1
|
||||
|
||||
/* Define if timeradd is defined in <sys/time.h> */
|
||||
#define EVENT__HAVE_TIMERADD 1
|
||||
|
||||
/* Define if timerclear is defined in <sys/time.h> */
|
||||
#define EVENT__HAVE_TIMERCLEAR 1
|
||||
|
||||
/* Define if timercmp is defined in <sys/time.h> */
|
||||
#define EVENT__HAVE_TIMERCMP 1
|
||||
|
||||
/* Define to 1 if you have the `timerfd_create' function. */
|
||||
#define EVENT__HAVE_TIMERFD_CREATE 1
|
||||
|
||||
/* Define if timerisset is defined in <sys/time.h> */
|
||||
#define EVENT__HAVE_TIMERISSET 1
|
||||
|
||||
/* Define to 1 if the system has the type `uint16_t'. */
|
||||
#define EVENT__HAVE_UINT16_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `uint32_t'. */
|
||||
#define EVENT__HAVE_UINT32_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `uint64_t'. */
|
||||
#define EVENT__HAVE_UINT64_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `uint8_t'. */
|
||||
#define EVENT__HAVE_UINT8_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `uintptr_t'. */
|
||||
#define EVENT__HAVE_UINTPTR_T 1
|
||||
|
||||
/* Define to 1 if you have the `umask' function. */
|
||||
#define EVENT__HAVE_UMASK 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define EVENT__HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `unsetenv' function. */
|
||||
#define EVENT__HAVE_UNSETENV 1
|
||||
|
||||
/* Define to 1 if you have the `usleep' function. */
|
||||
#define EVENT__HAVE_USLEEP 1
|
||||
|
||||
/* Define to 1 if you have the `vasprintf' function. */
|
||||
#define EVENT__HAVE_VASPRINTF 1
|
||||
|
||||
/* Define if waitpid() supports WNOWAIT */
|
||||
/* #undef EVENT__HAVE_WAITPID_WITH_WNOWAIT */
|
||||
|
||||
/* Define if kqueue works correctly with pipes */
|
||||
/* #undef EVENT__HAVE_WORKING_KQUEUE */
|
||||
|
||||
/* Define to 1 if you have the <zlib.h> header file. */
|
||||
#define EVENT__HAVE_ZLIB_H 1
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#define EVENT__LT_OBJDIR ".libs/"
|
||||
|
||||
/* Numeric representation of the version */
|
||||
#define EVENT__NUMERIC_VERSION 0x02010800
|
||||
|
||||
/* Name of package */
|
||||
#define EVENT__PACKAGE "libevent"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define EVENT__PACKAGE_BUGREPORT ""
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define EVENT__PACKAGE_NAME "libevent"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define EVENT__PACKAGE_STRING "libevent 2.1.8-stable"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define EVENT__PACKAGE_TARNAME "libevent"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define EVENT__PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define EVENT__PACKAGE_VERSION "2.1.8-stable"
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
/* #undef EVENT__PTHREAD_CREATE_JOINABLE */
|
||||
|
||||
/* The size of `int', as computed by sizeof. */
|
||||
#define EVENT__SIZEOF_INT 4
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define EVENT__SIZEOF_LONG 8
|
||||
|
||||
/* The size of `long long', as computed by sizeof. */
|
||||
#define EVENT__SIZEOF_LONG_LONG 8
|
||||
|
||||
/* The size of `off_t', as computed by sizeof. */
|
||||
#define EVENT__SIZEOF_OFF_T 8
|
||||
|
||||
/* The size of `pthread_t', as computed by sizeof. */
|
||||
#define EVENT__SIZEOF_PTHREAD_T 8
|
||||
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#define EVENT__SIZEOF_SHORT 2
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#define EVENT__SIZEOF_SIZE_T 8
|
||||
|
||||
/* The size of `void *', as computed by sizeof. */
|
||||
#define EVENT__SIZEOF_VOID_P 8
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define EVENT__STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define EVENT__TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef EVENT___ALL_SOURCE
|
||||
# define EVENT___ALL_SOURCE 1
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef EVENT___GNU_SOURCE
|
||||
# define EVENT___GNU_SOURCE 1
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef EVENT___POSIX_PTHREAD_SEMANTICS
|
||||
# define EVENT___POSIX_PTHREAD_SEMANTICS 1
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef EVENT___TANDEM_SOURCE
|
||||
# define EVENT___TANDEM_SOURCE 1
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef EVENT____EXTENSIONS__
|
||||
# define EVENT____EXTENSIONS__ 1
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number of package */
|
||||
#define EVENT__VERSION "2.1.8-stable"
|
||||
|
||||
/* Enable large inode numbers on Mac OS X 10.5. */
|
||||
#ifndef EVENT___DARWIN_USE_64_BIT_INODE
|
||||
# define EVENT___DARWIN_USE_64_BIT_INODE 1
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
/* #undef EVENT___FILE_OFFSET_BITS */
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
/* #undef EVENT___LARGE_FILES */
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
/* #undef EVENT___MINIX */
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
/* #undef EVENT___POSIX_1_SOURCE */
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
/* #undef EVENT___POSIX_SOURCE */
|
||||
|
||||
/* Define to appropriate substitue if compiler doesnt have __func__ */
|
||||
/* #undef EVENT____func__ */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef EVENT__const */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef EVENT____cplusplus
|
||||
/* #undef EVENT__inline */
|
||||
#endif
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef EVENT__pid_t */
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
/* #undef EVENT__size_t */
|
||||
|
||||
/* Define to unsigned int if you dont have it */
|
||||
/* #undef EVENT__socklen_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef EVENT__ssize_t */
|
||||
|
||||
#endif /* event2/event-config.h */
|
||||
1675
cache/include/libevent2/event2/event.h
vendored
1675
cache/include/libevent2/event2/event.h
vendored
File diff suppressed because it is too large
Load Diff
230
cache/include/libevent2/event2/event_compat.h
vendored
230
cache/include/libevent2/event2/event_compat.h
vendored
@@ -1,230 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_EVENT_COMPAT_H_INCLUDED_
|
||||
#define EVENT2_EVENT_COMPAT_H_INCLUDED_
|
||||
|
||||
/** @file event2/event_compat.h
|
||||
|
||||
Potentially non-threadsafe versions of the functions in event.h: provided
|
||||
only for backwards compatibility.
|
||||
|
||||
In the oldest versions of Libevent, event_base was not a first-class
|
||||
structure. Instead, there was a single event base that every function
|
||||
manipulated. Later, when separate event bases were added, the old functions
|
||||
that didn't take an event_base argument needed to work by manipulating the
|
||||
"current" event base. This could lead to thread-safety issues, and obscure,
|
||||
hard-to-diagnose bugs.
|
||||
|
||||
@deprecated All functions in this file are by definition deprecated.
|
||||
*/
|
||||
#include <event2/visibility.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event-config.h>
|
||||
#ifdef EVENT__HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* For int types. */
|
||||
#include <event2/util.h>
|
||||
|
||||
/**
|
||||
Initialize the event API.
|
||||
|
||||
The event API needs to be initialized with event_init() before it can be
|
||||
used. Sets the global current base that gets used for events that have no
|
||||
base associated with them.
|
||||
|
||||
@deprecated This function is deprecated because it replaces the "current"
|
||||
event_base, and is totally unsafe for multithreaded use. The replacement
|
||||
is event_base_new().
|
||||
|
||||
@see event_base_set(), event_base_new()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct event_base *event_init(void);
|
||||
|
||||
/**
|
||||
Loop to process events.
|
||||
|
||||
Like event_base_dispatch(), but uses the "current" base.
|
||||
|
||||
@deprecated This function is deprecated because it is easily confused by
|
||||
multiple calls to event_init(), and because it is not safe for
|
||||
multithreaded use. The replacement is event_base_dispatch().
|
||||
|
||||
@see event_base_dispatch(), event_init()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int event_dispatch(void);
|
||||
|
||||
/**
|
||||
Handle events.
|
||||
|
||||
This function behaves like event_base_loop(), but uses the "current" base
|
||||
|
||||
@deprecated This function is deprecated because it uses the event base from
|
||||
the last call to event_init, and is therefore not safe for multithreaded
|
||||
use. The replacement is event_base_loop().
|
||||
|
||||
@see event_base_loop(), event_init()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int event_loop(int);
|
||||
|
||||
|
||||
/**
|
||||
Exit the event loop after the specified time.
|
||||
|
||||
This function behaves like event_base_loopexit(), except that it uses the
|
||||
"current" base.
|
||||
|
||||
@deprecated This function is deprecated because it uses the event base from
|
||||
the last call to event_init, and is therefore not safe for multithreaded
|
||||
use. The replacement is event_base_loopexit().
|
||||
|
||||
@see event_init, event_base_loopexit()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int event_loopexit(const struct timeval *);
|
||||
|
||||
|
||||
/**
|
||||
Abort the active event_loop() immediately.
|
||||
|
||||
This function behaves like event_base_loopbreakt(), except that it uses the
|
||||
"current" base.
|
||||
|
||||
@deprecated This function is deprecated because it uses the event base from
|
||||
the last call to event_init, and is therefore not safe for multithreaded
|
||||
use. The replacement is event_base_loopbreak().
|
||||
|
||||
@see event_base_loopbreak(), event_init()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int event_loopbreak(void);
|
||||
|
||||
/**
|
||||
Schedule a one-time event to occur.
|
||||
|
||||
@deprecated This function is obsolete, and has been replaced by
|
||||
event_base_once(). Its use is deprecated because it relies on the
|
||||
"current" base configured by event_init().
|
||||
|
||||
@see event_base_once()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int event_once(evutil_socket_t , short,
|
||||
void (*)(evutil_socket_t, short, void *), void *, const struct timeval *);
|
||||
|
||||
|
||||
/**
|
||||
Get the kernel event notification mechanism used by Libevent.
|
||||
|
||||
@deprecated This function is obsolete, and has been replaced by
|
||||
event_base_get_method(). Its use is deprecated because it relies on the
|
||||
"current" base configured by event_init().
|
||||
|
||||
@see event_base_get_method()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
const char *event_get_method(void);
|
||||
|
||||
|
||||
/**
|
||||
Set the number of different event priorities.
|
||||
|
||||
@deprecated This function is deprecated because it is easily confused by
|
||||
multiple calls to event_init(), and because it is not safe for
|
||||
multithreaded use. The replacement is event_base_priority_init().
|
||||
|
||||
@see event_base_priority_init()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int event_priority_init(int);
|
||||
|
||||
/**
|
||||
Prepare an event structure to be added.
|
||||
|
||||
@deprecated event_set() is not recommended for new code, because it requires
|
||||
a subsequent call to event_base_set() to be safe under most circumstances.
|
||||
Use event_assign() or event_new() instead.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void event_set(struct event *, evutil_socket_t, short, void (*)(evutil_socket_t, short, void *), void *);
|
||||
|
||||
#define evtimer_set(ev, cb, arg) event_set((ev), -1, 0, (cb), (arg))
|
||||
#define evsignal_set(ev, x, cb, arg) \
|
||||
event_set((ev), (x), EV_SIGNAL|EV_PERSIST, (cb), (arg))
|
||||
|
||||
|
||||
/**
|
||||
@name timeout_* macros
|
||||
|
||||
@deprecated These macros are deprecated because their naming is inconsistent
|
||||
with the rest of Libevent. Use the evtimer_* macros instead.
|
||||
@{
|
||||
*/
|
||||
#define timeout_add(ev, tv) event_add((ev), (tv))
|
||||
#define timeout_set(ev, cb, arg) event_set((ev), -1, 0, (cb), (arg))
|
||||
#define timeout_del(ev) event_del(ev)
|
||||
#define timeout_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv))
|
||||
#define timeout_initialized(ev) event_initialized(ev)
|
||||
/**@}*/
|
||||
|
||||
/**
|
||||
@name signal_* macros
|
||||
|
||||
@deprecated These macros are deprecated because their naming is inconsistent
|
||||
with the rest of Libevent. Use the evsignal_* macros instead.
|
||||
@{
|
||||
*/
|
||||
#define signal_add(ev, tv) event_add((ev), (tv))
|
||||
#define signal_set(ev, x, cb, arg) \
|
||||
event_set((ev), (x), EV_SIGNAL|EV_PERSIST, (cb), (arg))
|
||||
#define signal_del(ev) event_del(ev)
|
||||
#define signal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv))
|
||||
#define signal_initialized(ev) event_initialized(ev)
|
||||
/**@}*/
|
||||
|
||||
#ifndef EVENT_FD
|
||||
/* These macros are obsolete; use event_get_fd and event_get_signal instead. */
|
||||
#define EVENT_FD(ev) ((int)event_get_fd(ev))
|
||||
#define EVENT_SIGNAL(ev) event_get_signal(ev)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */
|
||||
180
cache/include/libevent2/event2/event_struct.h
vendored
180
cache/include/libevent2/event2/event_struct.h
vendored
@@ -1,180 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_EVENT_STRUCT_H_INCLUDED_
|
||||
#define EVENT2_EVENT_STRUCT_H_INCLUDED_
|
||||
|
||||
/** @file event2/event_struct.h
|
||||
|
||||
Structures used by event.h. Using these structures directly WILL harm
|
||||
forward compatibility: be careful.
|
||||
|
||||
No field declared in this file should be used directly in user code. Except
|
||||
for historical reasons, these fields would not be exposed at all.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event-config.h>
|
||||
#ifdef EVENT__HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* For int types. */
|
||||
#include <event2/util.h>
|
||||
|
||||
/* For evkeyvalq */
|
||||
#include <event2/keyvalq_struct.h>
|
||||
|
||||
#define EVLIST_TIMEOUT 0x01
|
||||
#define EVLIST_INSERTED 0x02
|
||||
#define EVLIST_SIGNAL 0x04
|
||||
#define EVLIST_ACTIVE 0x08
|
||||
#define EVLIST_INTERNAL 0x10
|
||||
#define EVLIST_ACTIVE_LATER 0x20
|
||||
#define EVLIST_FINALIZING 0x40
|
||||
#define EVLIST_INIT 0x80
|
||||
|
||||
#define EVLIST_ALL 0xff
|
||||
|
||||
/* Fix so that people don't have to run with <sys/queue.h> */
|
||||
#ifndef TAILQ_ENTRY
|
||||
#define EVENT_DEFINED_TQENTRY_
|
||||
#define TAILQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *tqe_next; /* next element */ \
|
||||
struct type **tqe_prev; /* address of previous next element */ \
|
||||
}
|
||||
#endif /* !TAILQ_ENTRY */
|
||||
|
||||
#ifndef TAILQ_HEAD
|
||||
#define EVENT_DEFINED_TQHEAD_
|
||||
#define TAILQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *tqh_first; \
|
||||
struct type **tqh_last; \
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Fix so that people don't have to run with <sys/queue.h> */
|
||||
#ifndef LIST_ENTRY
|
||||
#define EVENT_DEFINED_LISTENTRY_
|
||||
#define LIST_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *le_next; /* next element */ \
|
||||
struct type **le_prev; /* address of previous next element */ \
|
||||
}
|
||||
#endif /* !LIST_ENTRY */
|
||||
|
||||
#ifndef LIST_HEAD
|
||||
#define EVENT_DEFINED_LISTHEAD_
|
||||
#define LIST_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *lh_first; /* first element */ \
|
||||
}
|
||||
#endif /* !LIST_HEAD */
|
||||
|
||||
struct event;
|
||||
|
||||
struct event_callback {
|
||||
TAILQ_ENTRY(event_callback) evcb_active_next;
|
||||
short evcb_flags;
|
||||
ev_uint8_t evcb_pri; /* smaller numbers are higher priority */
|
||||
ev_uint8_t evcb_closure;
|
||||
/* allows us to adopt for different types of events */
|
||||
union {
|
||||
void (*evcb_callback)(evutil_socket_t, short, void *);
|
||||
void (*evcb_selfcb)(struct event_callback *, void *);
|
||||
void (*evcb_evfinalize)(struct event *, void *);
|
||||
void (*evcb_cbfinalize)(struct event_callback *, void *);
|
||||
} evcb_cb_union;
|
||||
void *evcb_arg;
|
||||
};
|
||||
|
||||
struct event_base;
|
||||
struct event {
|
||||
struct event_callback ev_evcallback;
|
||||
|
||||
/* for managing timeouts */
|
||||
union {
|
||||
TAILQ_ENTRY(event) ev_next_with_common_timeout;
|
||||
int min_heap_idx;
|
||||
} ev_timeout_pos;
|
||||
evutil_socket_t ev_fd;
|
||||
|
||||
struct event_base *ev_base;
|
||||
|
||||
union {
|
||||
/* used for io events */
|
||||
struct {
|
||||
LIST_ENTRY (event) ev_io_next;
|
||||
struct timeval ev_timeout;
|
||||
} ev_io;
|
||||
|
||||
/* used by signal events */
|
||||
struct {
|
||||
LIST_ENTRY (event) ev_signal_next;
|
||||
short ev_ncalls;
|
||||
/* Allows deletes in callback */
|
||||
short *ev_pncalls;
|
||||
} ev_signal;
|
||||
} ev_;
|
||||
|
||||
short ev_events;
|
||||
short ev_res; /* result passed to event callback */
|
||||
struct timeval ev_timeout;
|
||||
};
|
||||
|
||||
TAILQ_HEAD (event_list, event);
|
||||
|
||||
#ifdef EVENT_DEFINED_TQENTRY_
|
||||
#undef TAILQ_ENTRY
|
||||
#endif
|
||||
|
||||
#ifdef EVENT_DEFINED_TQHEAD_
|
||||
#undef TAILQ_HEAD
|
||||
#endif
|
||||
|
||||
LIST_HEAD (event_dlist, event);
|
||||
|
||||
#ifdef EVENT_DEFINED_LISTENTRY_
|
||||
#undef LIST_ENTRY
|
||||
#endif
|
||||
|
||||
#ifdef EVENT_DEFINED_LISTHEAD_
|
||||
#undef LIST_HEAD
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_EVENT_STRUCT_H_INCLUDED_ */
|
||||
1189
cache/include/libevent2/event2/http.h
vendored
1189
cache/include/libevent2/event2/http.h
vendored
File diff suppressed because it is too large
Load Diff
90
cache/include/libevent2/event2/http_compat.h
vendored
90
cache/include/libevent2/event2/http_compat.h
vendored
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_HTTP_COMPAT_H_INCLUDED_
|
||||
#define EVENT2_HTTP_COMPAT_H_INCLUDED_
|
||||
|
||||
/** @file event2/http_compat.h
|
||||
|
||||
Potentially non-threadsafe versions of the functions in http.h: provided
|
||||
only for backwards compatibility.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event-config.h>
|
||||
#ifdef EVENT__HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* For int types. */
|
||||
#include <event2/util.h>
|
||||
|
||||
/**
|
||||
* Start an HTTP server on the specified address and port
|
||||
*
|
||||
* @deprecated It does not allow an event base to be specified
|
||||
*
|
||||
* @param address the address to which the HTTP server should be bound
|
||||
* @param port the port number on which the HTTP server should listen
|
||||
* @return an struct evhttp object
|
||||
*/
|
||||
struct evhttp *evhttp_start(const char *address, ev_uint16_t port);
|
||||
|
||||
/**
|
||||
* A connection object that can be used to for making HTTP requests. The
|
||||
* connection object tries to establish the connection when it is given an
|
||||
* http request object.
|
||||
*
|
||||
* @deprecated It does not allow an event base to be specified
|
||||
*/
|
||||
struct evhttp_connection *evhttp_connection_new(
|
||||
const char *address, ev_uint16_t port);
|
||||
|
||||
/**
|
||||
* Associates an event base with the connection - can only be called
|
||||
* on a freshly created connection object that has not been used yet.
|
||||
*
|
||||
* @deprecated XXXX Why?
|
||||
*/
|
||||
void evhttp_connection_set_base(struct evhttp_connection *evcon,
|
||||
struct event_base *base);
|
||||
|
||||
|
||||
/** Returns the request URI */
|
||||
#define evhttp_request_uri evhttp_request_get_uri
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */
|
||||
152
cache/include/libevent2/event2/http_struct.h
vendored
152
cache/include/libevent2/event2/http_struct.h
vendored
@@ -1,152 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_HTTP_STRUCT_H_INCLUDED_
|
||||
#define EVENT2_HTTP_STRUCT_H_INCLUDED_
|
||||
|
||||
/** @file event2/http_struct.h
|
||||
|
||||
Data structures for http. Using these structures may hurt forward
|
||||
compatibility with later versions of Libevent: be careful!
|
||||
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event-config.h>
|
||||
#ifdef EVENT__HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* For int types. */
|
||||
#include <event2/util.h>
|
||||
|
||||
/**
|
||||
* the request structure that a server receives.
|
||||
* WARNING: expect this structure to change. I will try to provide
|
||||
* reasonable accessors.
|
||||
*/
|
||||
struct evhttp_request {
|
||||
#if defined(TAILQ_ENTRY)
|
||||
TAILQ_ENTRY(evhttp_request) next;
|
||||
#else
|
||||
struct {
|
||||
struct evhttp_request *tqe_next;
|
||||
struct evhttp_request **tqe_prev;
|
||||
} next;
|
||||
#endif
|
||||
|
||||
/* the connection object that this request belongs to */
|
||||
struct evhttp_connection *evcon;
|
||||
int flags;
|
||||
/** The request obj owns the evhttp connection and needs to free it */
|
||||
#define EVHTTP_REQ_OWN_CONNECTION 0x0001
|
||||
/** Request was made via a proxy */
|
||||
#define EVHTTP_PROXY_REQUEST 0x0002
|
||||
/** The request object is owned by the user; the user must free it */
|
||||
#define EVHTTP_USER_OWNED 0x0004
|
||||
/** The request will be used again upstack; freeing must be deferred */
|
||||
#define EVHTTP_REQ_DEFER_FREE 0x0008
|
||||
/** The request should be freed upstack */
|
||||
#define EVHTTP_REQ_NEEDS_FREE 0x0010
|
||||
|
||||
struct evkeyvalq *input_headers;
|
||||
struct evkeyvalq *output_headers;
|
||||
|
||||
/* address of the remote host and the port connection came from */
|
||||
char *remote_host;
|
||||
ev_uint16_t remote_port;
|
||||
|
||||
/* cache of the hostname for evhttp_request_get_host */
|
||||
char *host_cache;
|
||||
|
||||
enum evhttp_request_kind kind;
|
||||
enum evhttp_cmd_type type;
|
||||
|
||||
size_t headers_size;
|
||||
size_t body_size;
|
||||
|
||||
char *uri; /* uri after HTTP request was parsed */
|
||||
struct evhttp_uri *uri_elems; /* uri elements */
|
||||
|
||||
char major; /* HTTP Major number */
|
||||
char minor; /* HTTP Minor number */
|
||||
|
||||
int response_code; /* HTTP Response code */
|
||||
char *response_code_line; /* Readable response */
|
||||
|
||||
struct evbuffer *input_buffer; /* read data */
|
||||
ev_int64_t ntoread;
|
||||
unsigned chunked:1, /* a chunked request */
|
||||
userdone:1; /* the user has sent all data */
|
||||
|
||||
struct evbuffer *output_buffer; /* outgoing post or data */
|
||||
|
||||
/* Callback */
|
||||
void (*cb)(struct evhttp_request *, void *);
|
||||
void *cb_arg;
|
||||
|
||||
/*
|
||||
* Chunked data callback - call for each completed chunk if
|
||||
* specified. If not specified, all the data is delivered via
|
||||
* the regular callback.
|
||||
*/
|
||||
void (*chunk_cb)(struct evhttp_request *, void *);
|
||||
|
||||
/*
|
||||
* Callback added for forked-daapd so they can collect ICY
|
||||
* (shoutcast) metadata from the http header. If return
|
||||
* int is negative the connection will be closed.
|
||||
*/
|
||||
int (*header_cb)(struct evhttp_request *, void *);
|
||||
|
||||
/*
|
||||
* Error callback - called when error is occured.
|
||||
* @see evhttp_request_error for error types.
|
||||
*
|
||||
* @see evhttp_request_set_error_cb()
|
||||
*/
|
||||
void (*error_cb)(enum evhttp_request_error, void *);
|
||||
|
||||
/*
|
||||
* Send complete callback - called when the request is actually
|
||||
* sent and completed.
|
||||
*/
|
||||
void (*on_complete_cb)(struct evhttp_request *, void *);
|
||||
void *on_complete_cb_arg;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_HTTP_STRUCT_H_INCLUDED_ */
|
||||
|
||||
80
cache/include/libevent2/event2/keyvalq_struct.h
vendored
80
cache/include/libevent2/event2/keyvalq_struct.h
vendored
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_KEYVALQ_STRUCT_H_INCLUDED_
|
||||
#define EVENT2_KEYVALQ_STRUCT_H_INCLUDED_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Fix so that people don't have to run with <sys/queue.h> */
|
||||
/* XXXX This code is duplicated with event_struct.h */
|
||||
#ifndef TAILQ_ENTRY
|
||||
#define EVENT_DEFINED_TQENTRY_
|
||||
#define TAILQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *tqe_next; /* next element */ \
|
||||
struct type **tqe_prev; /* address of previous next element */ \
|
||||
}
|
||||
#endif /* !TAILQ_ENTRY */
|
||||
|
||||
#ifndef TAILQ_HEAD
|
||||
#define EVENT_DEFINED_TQHEAD_
|
||||
#define TAILQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *tqh_first; \
|
||||
struct type **tqh_last; \
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Key-Value pairs. Can be used for HTTP headers but also for
|
||||
* query argument parsing.
|
||||
*/
|
||||
struct evkeyval {
|
||||
TAILQ_ENTRY(evkeyval) next;
|
||||
|
||||
char *key;
|
||||
char *value;
|
||||
};
|
||||
|
||||
TAILQ_HEAD (evkeyvalq, evkeyval);
|
||||
|
||||
/* XXXX This code is duplicated with event_struct.h */
|
||||
#ifdef EVENT_DEFINED_TQENTRY_
|
||||
#undef TAILQ_ENTRY
|
||||
#endif
|
||||
|
||||
#ifdef EVENT_DEFINED_TQHEAD_
|
||||
#undef TAILQ_HEAD
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
180
cache/include/libevent2/event2/listener.h
vendored
180
cache/include/libevent2/event2/listener.h
vendored
@@ -1,180 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_LISTENER_H_INCLUDED_
|
||||
#define EVENT2_LISTENER_H_INCLUDED_
|
||||
|
||||
#include <event2/visibility.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event.h>
|
||||
|
||||
struct sockaddr;
|
||||
struct evconnlistener;
|
||||
|
||||
/**
|
||||
A callback that we invoke when a listener has a new connection.
|
||||
|
||||
@param listener The evconnlistener
|
||||
@param fd The new file descriptor
|
||||
@param addr The source address of the connection
|
||||
@param socklen The length of addr
|
||||
@param user_arg the pointer passed to evconnlistener_new()
|
||||
*/
|
||||
typedef void (*evconnlistener_cb)(struct evconnlistener *, evutil_socket_t, struct sockaddr *, int socklen, void *);
|
||||
|
||||
/**
|
||||
A callback that we invoke when a listener encounters a non-retriable error.
|
||||
|
||||
@param listener The evconnlistener
|
||||
@param user_arg the pointer passed to evconnlistener_new()
|
||||
*/
|
||||
typedef void (*evconnlistener_errorcb)(struct evconnlistener *, void *);
|
||||
|
||||
/** Flag: Indicates that we should not make incoming sockets nonblocking
|
||||
* before passing them to the callback. */
|
||||
#define LEV_OPT_LEAVE_SOCKETS_BLOCKING (1u<<0)
|
||||
/** Flag: Indicates that freeing the listener should close the underlying
|
||||
* socket. */
|
||||
#define LEV_OPT_CLOSE_ON_FREE (1u<<1)
|
||||
/** Flag: Indicates that we should set the close-on-exec flag, if possible */
|
||||
#define LEV_OPT_CLOSE_ON_EXEC (1u<<2)
|
||||
/** Flag: Indicates that we should disable the timeout (if any) between when
|
||||
* this socket is closed and when we can listen again on the same port. */
|
||||
#define LEV_OPT_REUSEABLE (1u<<3)
|
||||
/** Flag: Indicates that the listener should be locked so it's safe to use
|
||||
* from multiple threadcs at once. */
|
||||
#define LEV_OPT_THREADSAFE (1u<<4)
|
||||
/** Flag: Indicates that the listener should be created in disabled
|
||||
* state. Use evconnlistener_enable() to enable it later. */
|
||||
#define LEV_OPT_DISABLED (1u<<5)
|
||||
/** Flag: Indicates that the listener should defer accept() until data is
|
||||
* available, if possible. Ignored on platforms that do not support this.
|
||||
*
|
||||
* This option can help performance for protocols where the client transmits
|
||||
* immediately after connecting. Do not use this option if your protocol
|
||||
* _doesn't_ start out with the client transmitting data, since in that case
|
||||
* this option will sometimes cause the kernel to never tell you about the
|
||||
* connection.
|
||||
*
|
||||
* This option is only supported by evconnlistener_new_bind(): it can't
|
||||
* work with evconnlistener_new_fd(), since the listener needs to be told
|
||||
* to use the option before it is actually bound.
|
||||
*/
|
||||
#define LEV_OPT_DEFERRED_ACCEPT (1u<<6)
|
||||
/** Flag: Indicates that we ask to allow multiple servers (processes or
|
||||
* threads) to bind to the same port if they each set the option.
|
||||
*
|
||||
* SO_REUSEPORT is what most people would expect SO_REUSEADDR to be, however
|
||||
* SO_REUSEPORT does not imply SO_REUSEADDR.
|
||||
*
|
||||
* This is only available on Linux and kernel 3.9+
|
||||
*/
|
||||
#define LEV_OPT_REUSEABLE_PORT (1u<<7)
|
||||
|
||||
/**
|
||||
Allocate a new evconnlistener object to listen for incoming TCP connections
|
||||
on a given file descriptor.
|
||||
|
||||
@param base The event base to associate the listener with.
|
||||
@param cb A callback to be invoked when a new connection arrives. If the
|
||||
callback is NULL, the listener will be treated as disabled until the
|
||||
callback is set.
|
||||
@param ptr A user-supplied pointer to give to the callback.
|
||||
@param flags Any number of LEV_OPT_* flags
|
||||
@param backlog Passed to the listen() call to determine the length of the
|
||||
acceptable connection backlog. Set to -1 for a reasonable default.
|
||||
Set to 0 if the socket is already listening.
|
||||
@param fd The file descriptor to listen on. It must be a nonblocking
|
||||
file descriptor, and it should already be bound to an appropriate
|
||||
port and address.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct evconnlistener *evconnlistener_new(struct event_base *base,
|
||||
evconnlistener_cb cb, void *ptr, unsigned flags, int backlog,
|
||||
evutil_socket_t fd);
|
||||
/**
|
||||
Allocate a new evconnlistener object to listen for incoming TCP connections
|
||||
on a given address.
|
||||
|
||||
@param base The event base to associate the listener with.
|
||||
@param cb A callback to be invoked when a new connection arrives. If the
|
||||
callback is NULL, the listener will be treated as disabled until the
|
||||
callback is set.
|
||||
@param ptr A user-supplied pointer to give to the callback.
|
||||
@param flags Any number of LEV_OPT_* flags
|
||||
@param backlog Passed to the listen() call to determine the length of the
|
||||
acceptable connection backlog. Set to -1 for a reasonable default.
|
||||
@param addr The address to listen for connections on.
|
||||
@param socklen The length of the address.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct evconnlistener *evconnlistener_new_bind(struct event_base *base,
|
||||
evconnlistener_cb cb, void *ptr, unsigned flags, int backlog,
|
||||
const struct sockaddr *sa, int socklen);
|
||||
/**
|
||||
Disable and deallocate an evconnlistener.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evconnlistener_free(struct evconnlistener *lev);
|
||||
/**
|
||||
Re-enable an evconnlistener that has been disabled.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evconnlistener_enable(struct evconnlistener *lev);
|
||||
/**
|
||||
Stop listening for connections on an evconnlistener.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evconnlistener_disable(struct evconnlistener *lev);
|
||||
|
||||
/** Return an evconnlistener's associated event_base. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct event_base *evconnlistener_get_base(struct evconnlistener *lev);
|
||||
|
||||
/** Return the socket that an evconnlistner is listening on. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
evutil_socket_t evconnlistener_get_fd(struct evconnlistener *lev);
|
||||
|
||||
/** Change the callback on the listener to cb and its user_data to arg.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evconnlistener_set_cb(struct evconnlistener *lev,
|
||||
evconnlistener_cb cb, void *arg);
|
||||
|
||||
/** Set an evconnlistener's error callback. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evconnlistener_set_error_cb(struct evconnlistener *lev,
|
||||
evconnlistener_errorcb errorcb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
596
cache/include/libevent2/event2/rpc.h
vendored
596
cache/include/libevent2/event2/rpc.h
vendored
@@ -1,596 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_RPC_H_INCLUDED_
|
||||
#define EVENT2_RPC_H_INCLUDED_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @file rpc.h
|
||||
*
|
||||
* This header files provides basic support for an RPC server and client.
|
||||
*
|
||||
* To support RPCs in a server, every supported RPC command needs to be
|
||||
* defined and registered.
|
||||
*
|
||||
* EVRPC_HEADER(SendCommand, Request, Reply);
|
||||
*
|
||||
* SendCommand is the name of the RPC command.
|
||||
* Request is the name of a structure generated by event_rpcgen.py.
|
||||
* It contains all parameters relating to the SendCommand RPC. The
|
||||
* server needs to fill in the Reply structure.
|
||||
* Reply is the name of a structure generated by event_rpcgen.py. It
|
||||
* contains the answer to the RPC.
|
||||
*
|
||||
* To register an RPC with an HTTP server, you need to first create an RPC
|
||||
* base with:
|
||||
*
|
||||
* struct evrpc_base *base = evrpc_init(http);
|
||||
*
|
||||
* A specific RPC can then be registered with
|
||||
*
|
||||
* EVRPC_REGISTER(base, SendCommand, Request, Reply, FunctionCB, arg);
|
||||
*
|
||||
* when the server receives an appropriately formatted RPC, the user callback
|
||||
* is invoked. The callback needs to fill in the reply structure.
|
||||
*
|
||||
* void FunctionCB(EVRPC_STRUCT(SendCommand)* rpc, void *arg);
|
||||
*
|
||||
* To send the reply, call EVRPC_REQUEST_DONE(rpc);
|
||||
*
|
||||
* See the regression test for an example.
|
||||
*/
|
||||
|
||||
/**
|
||||
Determines if the member has been set in the message
|
||||
|
||||
@param msg the message to inspect
|
||||
@param member the member variable to test for presences
|
||||
@return 1 if it's present or 0 otherwise.
|
||||
*/
|
||||
#define EVTAG_HAS(msg, member) \
|
||||
((msg)->member##_set == 1)
|
||||
|
||||
#ifndef EVENT2_RPC_COMPAT_H_INCLUDED_
|
||||
|
||||
/**
|
||||
Assigns a value to the member in the message.
|
||||
|
||||
@param msg the message to which to assign a value
|
||||
@param member the name of the member variable
|
||||
@param value the value to assign
|
||||
*/
|
||||
#define EVTAG_ASSIGN(msg, member, value) \
|
||||
(*(msg)->base->member##_assign)((msg), (value))
|
||||
/**
|
||||
Assigns a value to the member in the message.
|
||||
|
||||
@param msg the message to which to assign a value
|
||||
@param member the name of the member variable
|
||||
@param value the value to assign
|
||||
@param len the length of the value
|
||||
*/
|
||||
#define EVTAG_ASSIGN_WITH_LEN(msg, member, value, len) \
|
||||
(*(msg)->base->member##_assign)((msg), (value), (len))
|
||||
/**
|
||||
Returns the value for a member.
|
||||
|
||||
@param msg the message from which to get the value
|
||||
@param member the name of the member variable
|
||||
@param pvalue a pointer to the variable to hold the value
|
||||
@return 0 on success, -1 otherwise.
|
||||
*/
|
||||
#define EVTAG_GET(msg, member, pvalue) \
|
||||
(*(msg)->base->member##_get)((msg), (pvalue))
|
||||
/**
|
||||
Returns the value for a member.
|
||||
|
||||
@param msg the message from which to get the value
|
||||
@param member the name of the member variable
|
||||
@param pvalue a pointer to the variable to hold the value
|
||||
@param plen a pointer to the length of the value
|
||||
@return 0 on success, -1 otherwise.
|
||||
*/
|
||||
#define EVTAG_GET_WITH_LEN(msg, member, pvalue, plen) \
|
||||
(*(msg)->base->member##_get)((msg), (pvalue), (plen))
|
||||
|
||||
#endif /* EVENT2_RPC_COMPAT_H_INCLUDED_ */
|
||||
|
||||
/**
|
||||
Adds a value to an array.
|
||||
*/
|
||||
#define EVTAG_ARRAY_ADD_VALUE(msg, member, value) \
|
||||
(*(msg)->base->member##_add)((msg), (value))
|
||||
/**
|
||||
Allocates a new entry in the array and returns it.
|
||||
*/
|
||||
#define EVTAG_ARRAY_ADD(msg, member) \
|
||||
(*(msg)->base->member##_add)(msg)
|
||||
/**
|
||||
Gets a variable at the specified offset from the array.
|
||||
*/
|
||||
#define EVTAG_ARRAY_GET(msg, member, offset, pvalue) \
|
||||
(*(msg)->base->member##_get)((msg), (offset), (pvalue))
|
||||
/**
|
||||
Returns the number of entries in the array.
|
||||
*/
|
||||
#define EVTAG_ARRAY_LEN(msg, member) ((msg)->member##_length)
|
||||
|
||||
|
||||
struct evbuffer;
|
||||
struct event_base;
|
||||
struct evrpc_req_generic;
|
||||
struct evrpc_request_wrapper;
|
||||
struct evrpc;
|
||||
|
||||
/** The type of a specific RPC Message
|
||||
*
|
||||
* @param rpcname the name of the RPC message
|
||||
*/
|
||||
#define EVRPC_STRUCT(rpcname) struct evrpc_req__##rpcname
|
||||
|
||||
struct evhttp_request;
|
||||
struct evrpc_status;
|
||||
struct evrpc_hook_meta;
|
||||
|
||||
/** Creates the definitions and prototypes for an RPC
|
||||
*
|
||||
* You need to use EVRPC_HEADER to create structures and function prototypes
|
||||
* needed by the server and client implementation. The structures have to be
|
||||
* defined in an .rpc file and converted to source code via event_rpcgen.py
|
||||
*
|
||||
* @param rpcname the name of the RPC
|
||||
* @param reqstruct the name of the RPC request structure
|
||||
* @param replystruct the name of the RPC reply structure
|
||||
* @see EVRPC_GENERATE()
|
||||
*/
|
||||
#define EVRPC_HEADER(rpcname, reqstruct, rplystruct) \
|
||||
EVRPC_STRUCT(rpcname) { \
|
||||
struct evrpc_hook_meta *hook_meta; \
|
||||
struct reqstruct* request; \
|
||||
struct rplystruct* reply; \
|
||||
struct evrpc* rpc; \
|
||||
struct evhttp_request* http_req; \
|
||||
struct evbuffer* rpc_data; \
|
||||
}; \
|
||||
int evrpc_send_request_##rpcname(struct evrpc_pool *, \
|
||||
struct reqstruct *, struct rplystruct *, \
|
||||
void (*)(struct evrpc_status *, \
|
||||
struct reqstruct *, struct rplystruct *, void *cbarg), \
|
||||
void *);
|
||||
|
||||
struct evrpc_pool;
|
||||
|
||||
/** use EVRPC_GENERATE instead */
|
||||
struct evrpc_request_wrapper *evrpc_make_request_ctx(
|
||||
struct evrpc_pool *pool, void *request, void *reply,
|
||||
const char *rpcname,
|
||||
void (*req_marshal)(struct evbuffer*, void *),
|
||||
void (*rpl_clear)(void *),
|
||||
int (*rpl_unmarshal)(void *, struct evbuffer *),
|
||||
void (*cb)(struct evrpc_status *, void *, void *, void *),
|
||||
void *cbarg);
|
||||
|
||||
/** Creates a context structure that contains rpc specific information.
|
||||
*
|
||||
* EVRPC_MAKE_CTX is used to populate a RPC specific context that
|
||||
* contains information about marshaling the RPC data types.
|
||||
*
|
||||
* @param rpcname the name of the RPC
|
||||
* @param reqstruct the name of the RPC request structure
|
||||
* @param replystruct the name of the RPC reply structure
|
||||
* @param pool the evrpc_pool over which to make the request
|
||||
* @param request a pointer to the RPC request structure object
|
||||
* @param reply a pointer to the RPC reply structure object
|
||||
* @param cb the callback function to call when the RPC has completed
|
||||
* @param cbarg the argument to supply to the callback
|
||||
*/
|
||||
#define EVRPC_MAKE_CTX(rpcname, reqstruct, rplystruct, \
|
||||
pool, request, reply, cb, cbarg) \
|
||||
evrpc_make_request_ctx(pool, request, reply, \
|
||||
#rpcname, \
|
||||
(void (*)(struct evbuffer *, void *))reqstruct##_marshal, \
|
||||
(void (*)(void *))rplystruct##_clear, \
|
||||
(int (*)(void *, struct evbuffer *))rplystruct##_unmarshal, \
|
||||
(void (*)(struct evrpc_status *, void *, void *, void *))cb, \
|
||||
cbarg)
|
||||
|
||||
/** Generates the code for receiving and sending an RPC message
|
||||
*
|
||||
* EVRPC_GENERATE is used to create the code corresponding to sending
|
||||
* and receiving a particular RPC message
|
||||
*
|
||||
* @param rpcname the name of the RPC
|
||||
* @param reqstruct the name of the RPC request structure
|
||||
* @param replystruct the name of the RPC reply structure
|
||||
* @see EVRPC_HEADER()
|
||||
*/
|
||||
#define EVRPC_GENERATE(rpcname, reqstruct, rplystruct) \
|
||||
int evrpc_send_request_##rpcname(struct evrpc_pool *pool, \
|
||||
struct reqstruct *request, struct rplystruct *reply, \
|
||||
void (*cb)(struct evrpc_status *, \
|
||||
struct reqstruct *, struct rplystruct *, void *cbarg), \
|
||||
void *cbarg) { \
|
||||
return evrpc_send_request_generic(pool, request, reply, \
|
||||
(void (*)(struct evrpc_status *, void *, void *, void *))cb, \
|
||||
cbarg, \
|
||||
#rpcname, \
|
||||
(void (*)(struct evbuffer *, void *))reqstruct##_marshal, \
|
||||
(void (*)(void *))rplystruct##_clear, \
|
||||
(int (*)(void *, struct evbuffer *))rplystruct##_unmarshal); \
|
||||
}
|
||||
|
||||
/** Provides access to the HTTP request object underlying an RPC
|
||||
*
|
||||
* Access to the underlying http object; can be used to look at headers or
|
||||
* for getting the remote ip address
|
||||
*
|
||||
* @param rpc_req the rpc request structure provided to the server callback
|
||||
* @return an struct evhttp_request object that can be inspected for
|
||||
* HTTP headers or sender information.
|
||||
*/
|
||||
#define EVRPC_REQUEST_HTTP(rpc_req) (rpc_req)->http_req
|
||||
|
||||
/** completes the server response to an rpc request */
|
||||
void evrpc_request_done(struct evrpc_req_generic *req);
|
||||
|
||||
/** accessors for request and reply */
|
||||
void *evrpc_get_request(struct evrpc_req_generic *req);
|
||||
void *evrpc_get_reply(struct evrpc_req_generic *req);
|
||||
|
||||
/** Creates the reply to an RPC request
|
||||
*
|
||||
* EVRPC_REQUEST_DONE is used to answer a request; the reply is expected
|
||||
* to have been filled in. The request and reply pointers become invalid
|
||||
* after this call has finished.
|
||||
*
|
||||
* @param rpc_req the rpc request structure provided to the server callback
|
||||
*/
|
||||
#define EVRPC_REQUEST_DONE(rpc_req) do { \
|
||||
struct evrpc_req_generic *req_ = (struct evrpc_req_generic *)(rpc_req); \
|
||||
evrpc_request_done(req_); \
|
||||
} while (0)
|
||||
|
||||
|
||||
struct evrpc_base;
|
||||
struct evhttp;
|
||||
|
||||
/* functions to start up the rpc system */
|
||||
|
||||
/** Creates a new rpc base from which RPC requests can be received
|
||||
*
|
||||
* @param server a pointer to an existing HTTP server
|
||||
* @return a newly allocated evrpc_base struct
|
||||
* @see evrpc_free()
|
||||
*/
|
||||
struct evrpc_base *evrpc_init(struct evhttp *server);
|
||||
|
||||
/**
|
||||
* Frees the evrpc base
|
||||
*
|
||||
* For now, you are responsible for making sure that no rpcs are ongoing.
|
||||
*
|
||||
* @param base the evrpc_base object to be freed
|
||||
* @see evrpc_init
|
||||
*/
|
||||
void evrpc_free(struct evrpc_base *base);
|
||||
|
||||
/** register RPCs with the HTTP Server
|
||||
*
|
||||
* registers a new RPC with the HTTP server, each RPC needs to have
|
||||
* a unique name under which it can be identified.
|
||||
*
|
||||
* @param base the evrpc_base structure in which the RPC should be
|
||||
* registered.
|
||||
* @param name the name of the RPC
|
||||
* @param request the name of the RPC request structure
|
||||
* @param reply the name of the RPC reply structure
|
||||
* @param callback the callback that should be invoked when the RPC
|
||||
* is received. The callback has the following prototype
|
||||
* void (*callback)(EVRPC_STRUCT(Message)* rpc, void *arg)
|
||||
* @param cbarg an additional parameter that can be passed to the callback.
|
||||
* The parameter can be used to carry around state.
|
||||
*/
|
||||
#define EVRPC_REGISTER(base, name, request, reply, callback, cbarg) \
|
||||
evrpc_register_generic(base, #name, \
|
||||
(void (*)(struct evrpc_req_generic *, void *))callback, cbarg, \
|
||||
(void *(*)(void *))request##_new, NULL, \
|
||||
(void (*)(void *))request##_free, \
|
||||
(int (*)(void *, struct evbuffer *))request##_unmarshal, \
|
||||
(void *(*)(void *))reply##_new, NULL, \
|
||||
(void (*)(void *))reply##_free, \
|
||||
(int (*)(void *))reply##_complete, \
|
||||
(void (*)(struct evbuffer *, void *))reply##_marshal)
|
||||
|
||||
/**
|
||||
Low level function for registering an RPC with a server.
|
||||
|
||||
Use EVRPC_REGISTER() instead.
|
||||
|
||||
@see EVRPC_REGISTER()
|
||||
*/
|
||||
int evrpc_register_rpc(struct evrpc_base *, struct evrpc *,
|
||||
void (*)(struct evrpc_req_generic*, void *), void *);
|
||||
|
||||
/**
|
||||
* Unregisters an already registered RPC
|
||||
*
|
||||
* @param base the evrpc_base object from which to unregister an RPC
|
||||
* @param name the name of the rpc to unregister
|
||||
* @return -1 on error or 0 when successful.
|
||||
* @see EVRPC_REGISTER()
|
||||
*/
|
||||
#define EVRPC_UNREGISTER(base, name) evrpc_unregister_rpc((base), #name)
|
||||
|
||||
int evrpc_unregister_rpc(struct evrpc_base *base, const char *name);
|
||||
|
||||
/*
|
||||
* Client-side RPC support
|
||||
*/
|
||||
|
||||
struct evhttp_connection;
|
||||
struct evrpc_status;
|
||||
|
||||
/** launches an RPC and sends it to the server
|
||||
*
|
||||
* EVRPC_MAKE_REQUEST() is used by the client to send an RPC to the server.
|
||||
*
|
||||
* @param name the name of the RPC
|
||||
* @param pool the evrpc_pool that contains the connection objects over which
|
||||
* the request should be sent.
|
||||
* @param request a pointer to the RPC request structure - it contains the
|
||||
* data to be sent to the server.
|
||||
* @param reply a pointer to the RPC reply structure. It is going to be filled
|
||||
* if the request was answered successfully
|
||||
* @param cb the callback to invoke when the RPC request has been answered
|
||||
* @param cbarg an additional argument to be passed to the client
|
||||
* @return 0 on success, -1 on failure
|
||||
*/
|
||||
#define EVRPC_MAKE_REQUEST(name, pool, request, reply, cb, cbarg) \
|
||||
evrpc_send_request_##name((pool), (request), (reply), (cb), (cbarg))
|
||||
|
||||
/**
|
||||
Makes an RPC request based on the provided context.
|
||||
|
||||
This is a low-level function and should not be used directly
|
||||
unless a custom context object is provided. Use EVRPC_MAKE_REQUEST()
|
||||
instead.
|
||||
|
||||
@param ctx a context from EVRPC_MAKE_CTX()
|
||||
@returns 0 on success, -1 otherwise.
|
||||
@see EVRPC_MAKE_REQUEST(), EVRPC_MAKE_CTX()
|
||||
*/
|
||||
int evrpc_make_request(struct evrpc_request_wrapper *ctx);
|
||||
|
||||
/** creates an rpc connection pool
|
||||
*
|
||||
* a pool has a number of connections associated with it.
|
||||
* rpc requests are always made via a pool.
|
||||
*
|
||||
* @param base a pointer to an struct event_based object; can be left NULL
|
||||
* in singled-threaded applications
|
||||
* @return a newly allocated struct evrpc_pool object
|
||||
* @see evrpc_pool_free()
|
||||
*/
|
||||
struct evrpc_pool *evrpc_pool_new(struct event_base *base);
|
||||
/** frees an rpc connection pool
|
||||
*
|
||||
* @param pool a pointer to an evrpc_pool allocated via evrpc_pool_new()
|
||||
* @see evrpc_pool_new()
|
||||
*/
|
||||
void evrpc_pool_free(struct evrpc_pool *pool);
|
||||
|
||||
/**
|
||||
* Adds a connection over which rpc can be dispatched to the pool.
|
||||
*
|
||||
* The connection object must have been newly created.
|
||||
*
|
||||
* @param pool the pool to which to add the connection
|
||||
* @param evcon the connection to add to the pool.
|
||||
*/
|
||||
void evrpc_pool_add_connection(struct evrpc_pool *pool,
|
||||
struct evhttp_connection *evcon);
|
||||
|
||||
/**
|
||||
* Removes a connection from the pool.
|
||||
*
|
||||
* The connection object must have been newly created.
|
||||
*
|
||||
* @param pool the pool from which to remove the connection
|
||||
* @param evcon the connection to remove from the pool.
|
||||
*/
|
||||
void evrpc_pool_remove_connection(struct evrpc_pool *pool,
|
||||
struct evhttp_connection *evcon);
|
||||
|
||||
/**
|
||||
* Sets the timeout in secs after which a request has to complete. The
|
||||
* RPC is completely aborted if it does not complete by then. Setting
|
||||
* the timeout to 0 means that it never timeouts and can be used to
|
||||
* implement callback type RPCs.
|
||||
*
|
||||
* Any connection already in the pool will be updated with the new
|
||||
* timeout. Connections added to the pool after set_timeout has be
|
||||
* called receive the pool timeout only if no timeout has been set
|
||||
* for the connection itself.
|
||||
*
|
||||
* @param pool a pointer to a struct evrpc_pool object
|
||||
* @param timeout_in_secs the number of seconds after which a request should
|
||||
* timeout and a failure be returned to the callback.
|
||||
*/
|
||||
void evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs);
|
||||
|
||||
/**
|
||||
* Hooks for changing the input and output of RPCs; this can be used to
|
||||
* implement compression, authentication, encryption, ...
|
||||
*/
|
||||
|
||||
enum EVRPC_HOOK_TYPE {
|
||||
EVRPC_INPUT, /**< apply the function to an input hook */
|
||||
EVRPC_OUTPUT /**< apply the function to an output hook */
|
||||
};
|
||||
|
||||
#ifndef _WIN32
|
||||
/** Deprecated alias for EVRPC_INPUT. Not available on windows, where it
|
||||
* conflicts with platform headers. */
|
||||
#define INPUT EVRPC_INPUT
|
||||
/** Deprecated alias for EVRPC_OUTPUT. Not available on windows, where it
|
||||
* conflicts with platform headers. */
|
||||
#define OUTPUT EVRPC_OUTPUT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Return value from hook processing functions
|
||||
*/
|
||||
|
||||
enum EVRPC_HOOK_RESULT {
|
||||
EVRPC_TERMINATE = -1, /**< indicates the rpc should be terminated */
|
||||
EVRPC_CONTINUE = 0, /**< continue processing the rpc */
|
||||
EVRPC_PAUSE = 1 /**< pause processing request until resumed */
|
||||
};
|
||||
|
||||
/** adds a processing hook to either an rpc base or rpc pool
|
||||
*
|
||||
* If a hook returns TERMINATE, the processing is aborted. On CONTINUE,
|
||||
* the request is immediately processed after the hook returns. If the
|
||||
* hook returns PAUSE, request processing stops until evrpc_resume_request()
|
||||
* has been called.
|
||||
*
|
||||
* The add functions return handles that can be used for removing hooks.
|
||||
*
|
||||
* @param vbase a pointer to either struct evrpc_base or struct evrpc_pool
|
||||
* @param hook_type either INPUT or OUTPUT
|
||||
* @param cb the callback to call when the hook is activated
|
||||
* @param cb_arg an additional argument for the callback
|
||||
* @return a handle to the hook so it can be removed later
|
||||
* @see evrpc_remove_hook()
|
||||
*/
|
||||
void *evrpc_add_hook(void *vbase,
|
||||
enum EVRPC_HOOK_TYPE hook_type,
|
||||
int (*cb)(void *, struct evhttp_request *, struct evbuffer *, void *),
|
||||
void *cb_arg);
|
||||
|
||||
/** removes a previously added hook
|
||||
*
|
||||
* @param vbase a pointer to either struct evrpc_base or struct evrpc_pool
|
||||
* @param hook_type either INPUT or OUTPUT
|
||||
* @param handle a handle returned by evrpc_add_hook()
|
||||
* @return 1 on success or 0 on failure
|
||||
* @see evrpc_add_hook()
|
||||
*/
|
||||
int evrpc_remove_hook(void *vbase,
|
||||
enum EVRPC_HOOK_TYPE hook_type,
|
||||
void *handle);
|
||||
|
||||
/** resume a paused request
|
||||
*
|
||||
* @param vbase a pointer to either struct evrpc_base or struct evrpc_pool
|
||||
* @param ctx the context pointer provided to the original hook call
|
||||
*/
|
||||
int
|
||||
evrpc_resume_request(void *vbase, void *ctx, enum EVRPC_HOOK_RESULT res);
|
||||
|
||||
/** adds meta data to request
|
||||
*
|
||||
* evrpc_hook_add_meta() allows hooks to add meta data to a request. for
|
||||
* a client request, the meta data can be inserted by an outgoing request hook
|
||||
* and retrieved by the incoming request hook.
|
||||
*
|
||||
* @param ctx the context provided to the hook call
|
||||
* @param key a NUL-terminated c-string
|
||||
* @param data the data to be associated with the key
|
||||
* @param data_size the size of the data
|
||||
*/
|
||||
void evrpc_hook_add_meta(void *ctx, const char *key,
|
||||
const void *data, size_t data_size);
|
||||
|
||||
/** retrieves meta data previously associated
|
||||
*
|
||||
* evrpc_hook_find_meta() can be used to retrieve meta data associated to a
|
||||
* request by a previous hook.
|
||||
* @param ctx the context provided to the hook call
|
||||
* @param key a NUL-terminated c-string
|
||||
* @param data pointer to a data pointer that will contain the retrieved data
|
||||
* @param data_size pointer to the size of the data
|
||||
* @return 0 on success or -1 on failure
|
||||
*/
|
||||
int evrpc_hook_find_meta(void *ctx, const char *key,
|
||||
void **data, size_t *data_size);
|
||||
|
||||
/**
|
||||
* returns the connection object associated with the request
|
||||
*
|
||||
* @param ctx the context provided to the hook call
|
||||
* @return a pointer to the evhttp_connection object
|
||||
*/
|
||||
struct evhttp_connection *evrpc_hook_get_connection(void *ctx);
|
||||
|
||||
/**
|
||||
Function for sending a generic RPC request.
|
||||
|
||||
Do not call this function directly, use EVRPC_MAKE_REQUEST() instead.
|
||||
|
||||
@see EVRPC_MAKE_REQUEST()
|
||||
*/
|
||||
int evrpc_send_request_generic(struct evrpc_pool *pool,
|
||||
void *request, void *reply,
|
||||
void (*cb)(struct evrpc_status *, void *, void *, void *),
|
||||
void *cb_arg,
|
||||
const char *rpcname,
|
||||
void (*req_marshal)(struct evbuffer *, void *),
|
||||
void (*rpl_clear)(void *),
|
||||
int (*rpl_unmarshal)(void *, struct evbuffer *));
|
||||
|
||||
/**
|
||||
Function for registering a generic RPC with the RPC base.
|
||||
|
||||
Do not call this function directly, use EVRPC_REGISTER() instead.
|
||||
|
||||
@see EVRPC_REGISTER()
|
||||
*/
|
||||
int
|
||||
evrpc_register_generic(struct evrpc_base *base, const char *name,
|
||||
void (*callback)(struct evrpc_req_generic *, void *), void *cbarg,
|
||||
void *(*req_new)(void *), void *req_new_arg, void (*req_free)(void *),
|
||||
int (*req_unmarshal)(void *, struct evbuffer *),
|
||||
void *(*rpl_new)(void *), void *rpl_new_arg, void (*rpl_free)(void *),
|
||||
int (*rpl_complete)(void *),
|
||||
void (*rpl_marshal)(struct evbuffer *, void *));
|
||||
|
||||
/** accessors for obscure and undocumented functionality */
|
||||
struct evrpc_pool* evrpc_request_get_pool(struct evrpc_request_wrapper *ctx);
|
||||
void evrpc_request_set_pool(struct evrpc_request_wrapper *ctx,
|
||||
struct evrpc_pool *pool);
|
||||
void evrpc_request_set_cb(struct evrpc_request_wrapper *ctx,
|
||||
void (*cb)(struct evrpc_status*, void *request, void *reply, void *arg),
|
||||
void *cb_arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_RPC_H_INCLUDED_ */
|
||||
61
cache/include/libevent2/event2/rpc_compat.h
vendored
61
cache/include/libevent2/event2/rpc_compat.h
vendored
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_RPC_COMPAT_H_INCLUDED_
|
||||
#define EVENT2_RPC_COMPAT_H_INCLUDED_
|
||||
|
||||
/** @file event2/rpc_compat.h
|
||||
|
||||
Deprecated versions of the functions in rpc.h: provided only for
|
||||
backwards compatibility.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** backwards compatible accessors that work only with gcc */
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
|
||||
#undef EVTAG_ASSIGN
|
||||
#undef EVTAG_GET
|
||||
#undef EVTAG_ADD
|
||||
|
||||
#define EVTAG_ASSIGN(msg, member, args...) \
|
||||
(*(msg)->base->member##_assign)(msg, ## args)
|
||||
#define EVTAG_GET(msg, member, args...) \
|
||||
(*(msg)->base->member##_get)(msg, ## args)
|
||||
#define EVTAG_ADD(msg, member, args...) \
|
||||
(*(msg)->base->member##_add)(msg, ## args)
|
||||
#endif
|
||||
#define EVTAG_LEN(msg, member) ((msg)->member##_length)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_EVENT_COMPAT_H_INCLUDED_ */
|
||||
100
cache/include/libevent2/event2/rpc_struct.h
vendored
100
cache/include/libevent2/event2/rpc_struct.h
vendored
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_RPC_STRUCT_H_INCLUDED_
|
||||
#define EVENT2_RPC_STRUCT_H_INCLUDED_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @file event2/rpc_struct.h
|
||||
|
||||
Structures used by rpc.h. Using these structures directly may harm
|
||||
forward compatibility: be careful!
|
||||
|
||||
*/
|
||||
|
||||
/**
|
||||
* provides information about the completed RPC request.
|
||||
*/
|
||||
struct evrpc_status {
|
||||
#define EVRPC_STATUS_ERR_NONE 0
|
||||
#define EVRPC_STATUS_ERR_TIMEOUT 1
|
||||
#define EVRPC_STATUS_ERR_BADPAYLOAD 2
|
||||
#define EVRPC_STATUS_ERR_UNSTARTED 3
|
||||
#define EVRPC_STATUS_ERR_HOOKABORTED 4
|
||||
int error;
|
||||
|
||||
/* for looking at headers or other information */
|
||||
struct evhttp_request *http_req;
|
||||
};
|
||||
|
||||
/* the structure below needs to be synchronized with evrpc_req_generic */
|
||||
|
||||
/* Encapsulates a request */
|
||||
struct evrpc {
|
||||
TAILQ_ENTRY(evrpc) next;
|
||||
|
||||
/* the URI at which the request handler lives */
|
||||
const char* uri;
|
||||
|
||||
/* creates a new request structure */
|
||||
void *(*request_new)(void *);
|
||||
void *request_new_arg;
|
||||
|
||||
/* frees the request structure */
|
||||
void (*request_free)(void *);
|
||||
|
||||
/* unmarshals the buffer into the proper request structure */
|
||||
int (*request_unmarshal)(void *, struct evbuffer *);
|
||||
|
||||
/* creates a new reply structure */
|
||||
void *(*reply_new)(void *);
|
||||
void *reply_new_arg;
|
||||
|
||||
/* frees the reply structure */
|
||||
void (*reply_free)(void *);
|
||||
|
||||
/* verifies that the reply is valid */
|
||||
int (*reply_complete)(void *);
|
||||
|
||||
/* marshals the reply into a buffer */
|
||||
void (*reply_marshal)(struct evbuffer*, void *);
|
||||
|
||||
/* the callback invoked for each received rpc */
|
||||
void (*cb)(struct evrpc_req_generic *, void *);
|
||||
void *cb_arg;
|
||||
|
||||
/* reference for further configuration */
|
||||
struct evrpc_base *base;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_RPC_STRUCT_H_INCLUDED_ */
|
||||
146
cache/include/libevent2/event2/tag.h
vendored
146
cache/include/libevent2/event2/tag.h
vendored
@@ -1,146 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_TAG_H_INCLUDED_
|
||||
#define EVENT2_TAG_H_INCLUDED_
|
||||
|
||||
/** @file event2/tag.h
|
||||
|
||||
Helper functions for reading and writing tagged data onto buffers.
|
||||
|
||||
*/
|
||||
|
||||
#include <event2/visibility.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event-config.h>
|
||||
#ifdef EVENT__HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
/* For int types. */
|
||||
#include <event2/util.h>
|
||||
|
||||
struct evbuffer;
|
||||
|
||||
/*
|
||||
* Marshaling tagged data - We assume that all tags are inserted in their
|
||||
* numeric order - so that unknown tags will always be higher than the
|
||||
* known ones - and we can just ignore the end of an event buffer.
|
||||
*/
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evtag_init(void);
|
||||
|
||||
/**
|
||||
Unmarshals the header and returns the length of the payload
|
||||
|
||||
@param evbuf the buffer from which to unmarshal data
|
||||
@param ptag a pointer in which the tag id is being stored
|
||||
@returns -1 on failure or the number of bytes in the remaining payload.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evtag_unmarshal_header(struct evbuffer *evbuf, ev_uint32_t *ptag);
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evtag_marshal(struct evbuffer *evbuf, ev_uint32_t tag, const void *data,
|
||||
ev_uint32_t len);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evtag_marshal_buffer(struct evbuffer *evbuf, ev_uint32_t tag,
|
||||
struct evbuffer *data);
|
||||
|
||||
/**
|
||||
Encode an integer and store it in an evbuffer.
|
||||
|
||||
We encode integers by nybbles; the first nibble contains the number
|
||||
of significant nibbles - 1; this allows us to encode up to 64-bit
|
||||
integers. This function is byte-order independent.
|
||||
|
||||
@param evbuf evbuffer to store the encoded number
|
||||
@param number a 32-bit integer
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evtag_encode_int(struct evbuffer *evbuf, ev_uint32_t number);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evtag_encode_int64(struct evbuffer *evbuf, ev_uint64_t number);
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evtag_marshal_int(struct evbuffer *evbuf, ev_uint32_t tag,
|
||||
ev_uint32_t integer);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evtag_marshal_int64(struct evbuffer *evbuf, ev_uint32_t tag,
|
||||
ev_uint64_t integer);
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evtag_marshal_string(struct evbuffer *buf, ev_uint32_t tag,
|
||||
const char *string);
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evtag_marshal_timeval(struct evbuffer *evbuf, ev_uint32_t tag,
|
||||
struct timeval *tv);
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evtag_unmarshal(struct evbuffer *src, ev_uint32_t *ptag,
|
||||
struct evbuffer *dst);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evtag_peek(struct evbuffer *evbuf, ev_uint32_t *ptag);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evtag_peek_length(struct evbuffer *evbuf, ev_uint32_t *plength);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evtag_payload_length(struct evbuffer *evbuf, ev_uint32_t *plength);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evtag_consume(struct evbuffer *evbuf);
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evtag_unmarshal_int(struct evbuffer *evbuf, ev_uint32_t need_tag,
|
||||
ev_uint32_t *pinteger);
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evtag_unmarshal_int64(struct evbuffer *evbuf, ev_uint32_t need_tag,
|
||||
ev_uint64_t *pinteger);
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evtag_unmarshal_fixed(struct evbuffer *src, ev_uint32_t need_tag,
|
||||
void *data, size_t len);
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evtag_unmarshal_string(struct evbuffer *evbuf, ev_uint32_t need_tag,
|
||||
char **pstring);
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evtag_unmarshal_timeval(struct evbuffer *evbuf, ev_uint32_t need_tag,
|
||||
struct timeval *ptv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_TAG_H_INCLUDED_ */
|
||||
49
cache/include/libevent2/event2/tag_compat.h
vendored
49
cache/include/libevent2/event2/tag_compat.h
vendored
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_TAG_COMPAT_H_INCLUDED_
|
||||
#define EVENT2_TAG_COMPAT_H_INCLUDED_
|
||||
|
||||
/** @file event2/tag_compat.h
|
||||
|
||||
Obsolete/deprecated functions from tag.h; provided only for backwards
|
||||
compatibility.
|
||||
*/
|
||||
|
||||
/**
|
||||
@name Misnamed functions
|
||||
|
||||
@deprecated These macros are deprecated because their names don't follow
|
||||
Libevent's naming conventions. Use evtag_encode_int and
|
||||
evtag_encode_int64 instead.
|
||||
|
||||
@{
|
||||
*/
|
||||
#define encode_int(evbuf, number) evtag_encode_int((evbuf), (number))
|
||||
#define encode_int64(evbuf, number) evtag_encode_int64((evbuf), (number))
|
||||
/**@}*/
|
||||
|
||||
#endif /* EVENT2_TAG_H_INCLUDED_ */
|
||||
253
cache/include/libevent2/event2/thread.h
vendored
253
cache/include/libevent2/event2/thread.h
vendored
@@ -1,253 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_THREAD_H_INCLUDED_
|
||||
#define EVENT2_THREAD_H_INCLUDED_
|
||||
|
||||
/** @file event2/thread.h
|
||||
|
||||
Functions for multi-threaded applications using Libevent.
|
||||
|
||||
When using a multi-threaded application in which multiple threads
|
||||
add and delete events from a single event base, Libevent needs to
|
||||
lock its data structures.
|
||||
|
||||
Like the memory-management function hooks, all of the threading functions
|
||||
_must_ be set up before an event_base is created if you want the base to
|
||||
use them.
|
||||
|
||||
Most programs will either be using Windows threads or Posix threads. You
|
||||
can configure Libevent to use one of these event_use_windows_threads() or
|
||||
event_use_pthreads() respectively. If you're using another threading
|
||||
library, you'll need to configure threading functions manually using
|
||||
evthread_set_lock_callbacks() and evthread_set_condition_callbacks().
|
||||
|
||||
*/
|
||||
|
||||
#include <event2/visibility.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event-config.h>
|
||||
|
||||
/**
|
||||
@name Flags passed to lock functions
|
||||
|
||||
@{
|
||||
*/
|
||||
/** A flag passed to a locking callback when the lock was allocated as a
|
||||
* read-write lock, and we want to acquire or release the lock for writing. */
|
||||
#define EVTHREAD_WRITE 0x04
|
||||
/** A flag passed to a locking callback when the lock was allocated as a
|
||||
* read-write lock, and we want to acquire or release the lock for reading. */
|
||||
#define EVTHREAD_READ 0x08
|
||||
/** A flag passed to a locking callback when we don't want to block waiting
|
||||
* for the lock; if we can't get the lock immediately, we will instead
|
||||
* return nonzero from the locking callback. */
|
||||
#define EVTHREAD_TRY 0x10
|
||||
/**@}*/
|
||||
|
||||
#if !defined(EVENT__DISABLE_THREAD_SUPPORT) || defined(EVENT_IN_DOXYGEN_)
|
||||
|
||||
#define EVTHREAD_LOCK_API_VERSION 1
|
||||
|
||||
/**
|
||||
@name Types of locks
|
||||
|
||||
@{*/
|
||||
/** A recursive lock is one that can be acquired multiple times at once by the
|
||||
* same thread. No other process can allocate the lock until the thread that
|
||||
* has been holding it has unlocked it as many times as it locked it. */
|
||||
#define EVTHREAD_LOCKTYPE_RECURSIVE 1
|
||||
/* A read-write lock is one that allows multiple simultaneous readers, but
|
||||
* where any one writer excludes all other writers and readers. */
|
||||
#define EVTHREAD_LOCKTYPE_READWRITE 2
|
||||
/**@}*/
|
||||
|
||||
/** This structure describes the interface a threading library uses for
|
||||
* locking. It's used to tell evthread_set_lock_callbacks() how to use
|
||||
* locking on this platform.
|
||||
*/
|
||||
struct evthread_lock_callbacks {
|
||||
/** The current version of the locking API. Set this to
|
||||
* EVTHREAD_LOCK_API_VERSION */
|
||||
int lock_api_version;
|
||||
/** Which kinds of locks does this version of the locking API
|
||||
* support? A bitfield of EVTHREAD_LOCKTYPE_RECURSIVE and
|
||||
* EVTHREAD_LOCKTYPE_READWRITE.
|
||||
*
|
||||
* (Note that RECURSIVE locks are currently mandatory, and
|
||||
* READWRITE locks are not currently used.)
|
||||
**/
|
||||
unsigned supported_locktypes;
|
||||
/** Function to allocate and initialize new lock of type 'locktype'.
|
||||
* Returns NULL on failure. */
|
||||
void *(*alloc)(unsigned locktype);
|
||||
/** Funtion to release all storage held in 'lock', which was created
|
||||
* with type 'locktype'. */
|
||||
void (*free)(void *lock, unsigned locktype);
|
||||
/** Acquire an already-allocated lock at 'lock' with mode 'mode'.
|
||||
* Returns 0 on success, and nonzero on failure. */
|
||||
int (*lock)(unsigned mode, void *lock);
|
||||
/** Release a lock at 'lock' using mode 'mode'. Returns 0 on success,
|
||||
* and nonzero on failure. */
|
||||
int (*unlock)(unsigned mode, void *lock);
|
||||
};
|
||||
|
||||
/** Sets a group of functions that Libevent should use for locking.
|
||||
* For full information on the required callback API, see the
|
||||
* documentation for the individual members of evthread_lock_callbacks.
|
||||
*
|
||||
* Note that if you're using Windows or the Pthreads threading library, you
|
||||
* probably shouldn't call this function; instead, use
|
||||
* evthread_use_windows_threads() or evthread_use_posix_threads() if you can.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evthread_set_lock_callbacks(const struct evthread_lock_callbacks *);
|
||||
|
||||
#define EVTHREAD_CONDITION_API_VERSION 1
|
||||
|
||||
struct timeval;
|
||||
|
||||
/** This structure describes the interface a threading library uses for
|
||||
* condition variables. It's used to tell evthread_set_condition_callbacks
|
||||
* how to use locking on this platform.
|
||||
*/
|
||||
struct evthread_condition_callbacks {
|
||||
/** The current version of the conditions API. Set this to
|
||||
* EVTHREAD_CONDITION_API_VERSION */
|
||||
int condition_api_version;
|
||||
/** Function to allocate and initialize a new condition variable.
|
||||
* Returns the condition variable on success, and NULL on failure.
|
||||
* The 'condtype' argument will be 0 with this API version.
|
||||
*/
|
||||
void *(*alloc_condition)(unsigned condtype);
|
||||
/** Function to free a condition variable. */
|
||||
void (*free_condition)(void *cond);
|
||||
/** Function to signal a condition variable. If 'broadcast' is 1, all
|
||||
* threads waiting on 'cond' should be woken; otherwise, only on one
|
||||
* thread is worken. Should return 0 on success, -1 on failure.
|
||||
* This function will only be called while holding the associated
|
||||
* lock for the condition.
|
||||
*/
|
||||
int (*signal_condition)(void *cond, int broadcast);
|
||||
/** Function to wait for a condition variable. The lock 'lock'
|
||||
* will be held when this function is called; should be released
|
||||
* while waiting for the condition to be come signalled, and
|
||||
* should be held again when this function returns.
|
||||
* If timeout is provided, it is interval of seconds to wait for
|
||||
* the event to become signalled; if it is NULL, the function
|
||||
* should wait indefinitely.
|
||||
*
|
||||
* The function should return -1 on error; 0 if the condition
|
||||
* was signalled, or 1 on a timeout. */
|
||||
int (*wait_condition)(void *cond, void *lock,
|
||||
const struct timeval *timeout);
|
||||
};
|
||||
|
||||
/** Sets a group of functions that Libevent should use for condition variables.
|
||||
* For full information on the required callback API, see the
|
||||
* documentation for the individual members of evthread_condition_callbacks.
|
||||
*
|
||||
* Note that if you're using Windows or the Pthreads threading library, you
|
||||
* probably shouldn't call this function; instead, use
|
||||
* evthread_use_windows_threads() or evthread_use_pthreads() if you can.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evthread_set_condition_callbacks(
|
||||
const struct evthread_condition_callbacks *);
|
||||
|
||||
/**
|
||||
Sets the function for determining the thread id.
|
||||
|
||||
@param base the event base for which to set the id function
|
||||
@param id_fn the identify function Libevent should invoke to
|
||||
determine the identity of a thread.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evthread_set_id_callback(
|
||||
unsigned long (*id_fn)(void));
|
||||
|
||||
#if (defined(_WIN32) && !defined(EVENT__DISABLE_THREAD_SUPPORT)) || defined(EVENT_IN_DOXYGEN_)
|
||||
/** Sets up Libevent for use with Windows builtin locking and thread ID
|
||||
functions. Unavailable if Libevent is not built for Windows.
|
||||
|
||||
@return 0 on success, -1 on failure. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evthread_use_windows_threads(void);
|
||||
/**
|
||||
Defined if Libevent was built with support for evthread_use_windows_threads()
|
||||
*/
|
||||
#define EVTHREAD_USE_WINDOWS_THREADS_IMPLEMENTED 1
|
||||
#endif
|
||||
|
||||
#if defined(EVENT__HAVE_PTHREADS) || defined(EVENT_IN_DOXYGEN_)
|
||||
/** Sets up Libevent for use with Pthreads locking and thread ID functions.
|
||||
Unavailable if Libevent is not build for use with pthreads. Requires
|
||||
libraries to link against Libevent_pthreads as well as Libevent.
|
||||
|
||||
@return 0 on success, -1 on failure. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evthread_use_pthreads(void);
|
||||
/** Defined if Libevent was built with support for evthread_use_pthreads() */
|
||||
#define EVTHREAD_USE_PTHREADS_IMPLEMENTED 1
|
||||
|
||||
#endif
|
||||
|
||||
/** Enable debugging wrappers around the current lock callbacks. If Libevent
|
||||
* makes one of several common locking errors, exit with an assertion failure.
|
||||
*
|
||||
* If you're going to call this function, you must do so before any locks are
|
||||
* allocated.
|
||||
**/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evthread_enable_lock_debugging(void);
|
||||
|
||||
/* Old (misspelled) version: This is deprecated; use
|
||||
* evthread_enable_log_debugging instead. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evthread_enable_lock_debuging(void);
|
||||
|
||||
#endif /* EVENT__DISABLE_THREAD_SUPPORT */
|
||||
|
||||
struct event_base;
|
||||
/** Make sure it's safe to tell an event base to wake up from another thread
|
||||
or a signal handler.
|
||||
|
||||
You shouldn't need to call this by hand; configuring the base with thread
|
||||
support should be necessary and sufficient.
|
||||
|
||||
@return 0 on success, -1 on failure.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evthread_make_base_notifiable(struct event_base *base);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_THREAD_H_INCLUDED_ */
|
||||
866
cache/include/libevent2/event2/util.h
vendored
866
cache/include/libevent2/event2/util.h
vendored
@@ -1,866 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_UTIL_H_INCLUDED_
|
||||
#define EVENT2_UTIL_H_INCLUDED_
|
||||
|
||||
/** @file event2/util.h
|
||||
|
||||
Common convenience functions for cross-platform portability and
|
||||
related socket manipulations.
|
||||
|
||||
*/
|
||||
#include <event2/visibility.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <event2/event-config.h>
|
||||
#ifdef EVENT__HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#elif defined(EVENT__HAVE_INTTYPES_H)
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef EVENT__HAVE_STDDEF_H
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#include <BaseTsd.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
#ifdef EVENT__HAVE_NETDB_H
|
||||
#if !defined(_GNU_SOURCE)
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#ifdef EVENT__HAVE_GETADDRINFO
|
||||
/* for EAI_* definitions. */
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
#else
|
||||
#ifdef EVENT__HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
/* Some openbsd autoconf versions get the name of this macro wrong. */
|
||||
#if defined(EVENT__SIZEOF_VOID__) && !defined(EVENT__SIZEOF_VOID_P)
|
||||
#define EVENT__SIZEOF_VOID_P EVENT__SIZEOF_VOID__
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Standard integer types.
|
||||
*
|
||||
* Integer type definitions for types that are supposed to be defined in the
|
||||
* C99-specified stdint.h. Shamefully, some platforms do not include
|
||||
* stdint.h, so we need to replace it. (If you are on a platform like this,
|
||||
* your C headers are now over 10 years out of date. You should bug them to
|
||||
* do something about this.)
|
||||
*
|
||||
* We define:
|
||||
*
|
||||
* <dl>
|
||||
* <dt>ev_uint64_t, ev_uint32_t, ev_uint16_t, ev_uint8_t</dt>
|
||||
* <dd>unsigned integer types of exactly 64, 32, 16, and 8 bits
|
||||
* respectively.</dd>
|
||||
* <dt>ev_int64_t, ev_int32_t, ev_int16_t, ev_int8_t</dt>
|
||||
* <dd>signed integer types of exactly 64, 32, 16, and 8 bits
|
||||
* respectively.</dd>
|
||||
* <dt>ev_uintptr_t, ev_intptr_t</dt>
|
||||
* <dd>unsigned/signed integers large enough
|
||||
* to hold a pointer without loss of bits.</dd>
|
||||
* <dt>ev_ssize_t</dt>
|
||||
* <dd>A signed type of the same size as size_t</dd>
|
||||
* <dt>ev_off_t</dt>
|
||||
* <dd>A signed type typically used to represent offsets within a
|
||||
* (potentially large) file</dd>
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
#ifdef EVENT__HAVE_UINT64_T
|
||||
#define ev_uint64_t uint64_t
|
||||
#define ev_int64_t int64_t
|
||||
#elif defined(_WIN32)
|
||||
#define ev_uint64_t unsigned __int64
|
||||
#define ev_int64_t signed __int64
|
||||
#elif EVENT__SIZEOF_LONG_LONG == 8
|
||||
#define ev_uint64_t unsigned long long
|
||||
#define ev_int64_t long long
|
||||
#elif EVENT__SIZEOF_LONG == 8
|
||||
#define ev_uint64_t unsigned long
|
||||
#define ev_int64_t long
|
||||
#elif defined(EVENT_IN_DOXYGEN_)
|
||||
#define ev_uint64_t ...
|
||||
#define ev_int64_t ...
|
||||
#else
|
||||
#error "No way to define ev_uint64_t"
|
||||
#endif
|
||||
|
||||
#ifdef EVENT__HAVE_UINT32_T
|
||||
#define ev_uint32_t uint32_t
|
||||
#define ev_int32_t int32_t
|
||||
#elif defined(_WIN32)
|
||||
#define ev_uint32_t unsigned int
|
||||
#define ev_int32_t signed int
|
||||
#elif EVENT__SIZEOF_LONG == 4
|
||||
#define ev_uint32_t unsigned long
|
||||
#define ev_int32_t signed long
|
||||
#elif EVENT__SIZEOF_INT == 4
|
||||
#define ev_uint32_t unsigned int
|
||||
#define ev_int32_t signed int
|
||||
#elif defined(EVENT_IN_DOXYGEN_)
|
||||
#define ev_uint32_t ...
|
||||
#define ev_int32_t ...
|
||||
#else
|
||||
#error "No way to define ev_uint32_t"
|
||||
#endif
|
||||
|
||||
#ifdef EVENT__HAVE_UINT16_T
|
||||
#define ev_uint16_t uint16_t
|
||||
#define ev_int16_t int16_t
|
||||
#elif defined(_WIN32)
|
||||
#define ev_uint16_t unsigned short
|
||||
#define ev_int16_t signed short
|
||||
#elif EVENT__SIZEOF_INT == 2
|
||||
#define ev_uint16_t unsigned int
|
||||
#define ev_int16_t signed int
|
||||
#elif EVENT__SIZEOF_SHORT == 2
|
||||
#define ev_uint16_t unsigned short
|
||||
#define ev_int16_t signed short
|
||||
#elif defined(EVENT_IN_DOXYGEN_)
|
||||
#define ev_uint16_t ...
|
||||
#define ev_int16_t ...
|
||||
#else
|
||||
#error "No way to define ev_uint16_t"
|
||||
#endif
|
||||
|
||||
#ifdef EVENT__HAVE_UINT8_T
|
||||
#define ev_uint8_t uint8_t
|
||||
#define ev_int8_t int8_t
|
||||
#elif defined(EVENT_IN_DOXYGEN_)
|
||||
#define ev_uint8_t ...
|
||||
#define ev_int8_t ...
|
||||
#else
|
||||
#define ev_uint8_t unsigned char
|
||||
#define ev_int8_t signed char
|
||||
#endif
|
||||
|
||||
#ifdef EVENT__HAVE_UINTPTR_T
|
||||
#define ev_uintptr_t uintptr_t
|
||||
#define ev_intptr_t intptr_t
|
||||
#elif EVENT__SIZEOF_VOID_P <= 4
|
||||
#define ev_uintptr_t ev_uint32_t
|
||||
#define ev_intptr_t ev_int32_t
|
||||
#elif EVENT__SIZEOF_VOID_P <= 8
|
||||
#define ev_uintptr_t ev_uint64_t
|
||||
#define ev_intptr_t ev_int64_t
|
||||
#elif defined(EVENT_IN_DOXYGEN_)
|
||||
#define ev_uintptr_t ...
|
||||
#define ev_intptr_t ...
|
||||
#else
|
||||
#error "No way to define ev_uintptr_t"
|
||||
#endif
|
||||
|
||||
#ifdef EVENT__ssize_t
|
||||
#define ev_ssize_t EVENT__ssize_t
|
||||
#else
|
||||
#define ev_ssize_t ssize_t
|
||||
#endif
|
||||
|
||||
/* Note that we define ev_off_t based on the compile-time size of off_t that
|
||||
* we used to build Libevent, and not based on the current size of off_t.
|
||||
* (For example, we don't define ev_off_t to off_t.). We do this because
|
||||
* some systems let you build your software with different off_t sizes
|
||||
* at runtime, and so putting in any dependency on off_t would risk API
|
||||
* mismatch.
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#define ev_off_t ev_int64_t
|
||||
#elif EVENT__SIZEOF_OFF_T == 8
|
||||
#define ev_off_t ev_int64_t
|
||||
#elif EVENT__SIZEOF_OFF_T == 4
|
||||
#define ev_off_t ev_int32_t
|
||||
#elif defined(EVENT_IN_DOXYGEN_)
|
||||
#define ev_off_t ...
|
||||
#else
|
||||
#define ev_off_t off_t
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
/* Limits for integer types.
|
||||
|
||||
We're making two assumptions here:
|
||||
- The compiler does constant folding properly.
|
||||
- The platform does signed arithmetic in two's complement.
|
||||
*/
|
||||
|
||||
/**
|
||||
@name Limits for integer types
|
||||
|
||||
These macros hold the largest or smallest values possible for the
|
||||
ev_[u]int*_t types.
|
||||
|
||||
@{
|
||||
*/
|
||||
#ifndef EVENT__HAVE_STDINT_H
|
||||
#define EV_UINT64_MAX ((((ev_uint64_t)0xffffffffUL) << 32) | 0xffffffffUL)
|
||||
#define EV_INT64_MAX ((((ev_int64_t) 0x7fffffffL) << 32) | 0xffffffffL)
|
||||
#define EV_INT64_MIN ((-EV_INT64_MAX) - 1)
|
||||
#define EV_UINT32_MAX ((ev_uint32_t)0xffffffffUL)
|
||||
#define EV_INT32_MAX ((ev_int32_t) 0x7fffffffL)
|
||||
#define EV_INT32_MIN ((-EV_INT32_MAX) - 1)
|
||||
#define EV_UINT16_MAX ((ev_uint16_t)0xffffUL)
|
||||
#define EV_INT16_MAX ((ev_int16_t) 0x7fffL)
|
||||
#define EV_INT16_MIN ((-EV_INT16_MAX) - 1)
|
||||
#define EV_UINT8_MAX 255
|
||||
#define EV_INT8_MAX 127
|
||||
#define EV_INT8_MIN ((-EV_INT8_MAX) - 1)
|
||||
#else
|
||||
#define EV_UINT64_MAX UINT64_MAX
|
||||
#define EV_INT64_MAX INT64_MAX
|
||||
#define EV_INT64_MIN INT64_MIN
|
||||
#define EV_UINT32_MAX UINT32_MAX
|
||||
#define EV_INT32_MAX INT32_MAX
|
||||
#define EV_INT32_MIN INT32_MIN
|
||||
#define EV_UINT16_MAX UINT16_MAX
|
||||
#define EV_INT16_MAX INT16_MAX
|
||||
#define EV_UINT8_MAX UINT8_MAX
|
||||
#define EV_INT8_MAX INT8_MAX
|
||||
#define EV_INT8_MIN INT8_MIN
|
||||
/** @} */
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
@name Limits for SIZE_T and SSIZE_T
|
||||
|
||||
@{
|
||||
*/
|
||||
#if EVENT__SIZEOF_SIZE_T == 8
|
||||
#define EV_SIZE_MAX EV_UINT64_MAX
|
||||
#define EV_SSIZE_MAX EV_INT64_MAX
|
||||
#elif EVENT__SIZEOF_SIZE_T == 4
|
||||
#define EV_SIZE_MAX EV_UINT32_MAX
|
||||
#define EV_SSIZE_MAX EV_INT32_MAX
|
||||
#elif defined(EVENT_IN_DOXYGEN_)
|
||||
#define EV_SIZE_MAX ...
|
||||
#define EV_SSIZE_MAX ...
|
||||
#else
|
||||
#error "No way to define SIZE_MAX"
|
||||
#endif
|
||||
|
||||
#define EV_SSIZE_MIN ((-EV_SSIZE_MAX) - 1)
|
||||
/**@}*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#define ev_socklen_t int
|
||||
#elif defined(EVENT__socklen_t)
|
||||
#define ev_socklen_t EVENT__socklen_t
|
||||
#else
|
||||
#define ev_socklen_t socklen_t
|
||||
#endif
|
||||
|
||||
#ifdef EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY
|
||||
#if !defined(EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY) \
|
||||
&& !defined(ss_family)
|
||||
#define ss_family __ss_family
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* A type wide enough to hold the output of "socket()" or "accept()". On
|
||||
* Windows, this is an intptr_t; elsewhere, it is an int. */
|
||||
#ifdef _WIN32
|
||||
#define evutil_socket_t intptr_t
|
||||
#else
|
||||
#define evutil_socket_t int
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Structure to hold information about a monotonic timer
|
||||
*
|
||||
* Use this with evutil_configure_monotonic_time() and
|
||||
* evutil_gettime_monotonic().
|
||||
*
|
||||
* This is an opaque structure; you can allocate one using
|
||||
* evutil_monotonic_timer_new().
|
||||
*
|
||||
* @see evutil_monotonic_timer_new(), evutil_monotonic_timer_free(),
|
||||
* evutil_configure_monotonic_time(), evutil_gettime_monotonic()
|
||||
*/
|
||||
struct evutil_monotonic_timer
|
||||
#ifdef EVENT_IN_DOXYGEN_
|
||||
{/*Empty body so that doxygen will generate documentation here.*/}
|
||||
#endif
|
||||
;
|
||||
|
||||
#define EV_MONOT_PRECISE 1
|
||||
#define EV_MONOT_FALLBACK 2
|
||||
|
||||
/** Format a date string using RFC 1123 format (used in HTTP).
|
||||
* If `tm` is NULL, current system's time will be used.
|
||||
* The number of characters written will be returned.
|
||||
* One should check if the return value is smaller than `datelen` to check if
|
||||
* the result is truncated or not.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL int
|
||||
evutil_date_rfc1123(char *date, const size_t datelen, const struct tm *tm);
|
||||
|
||||
/** Allocate a new struct evutil_monotonic_timer for use with the
|
||||
* evutil_configure_monotonic_time() and evutil_gettime_monotonic()
|
||||
* functions. You must configure the timer with
|
||||
* evutil_configure_monotonic_time() before using it.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
struct evutil_monotonic_timer * evutil_monotonic_timer_new(void);
|
||||
|
||||
/** Free a struct evutil_monotonic_timer that was allocated using
|
||||
* evutil_monotonic_timer_new().
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evutil_monotonic_timer_free(struct evutil_monotonic_timer *timer);
|
||||
|
||||
/** Set up a struct evutil_monotonic_timer; flags can include
|
||||
* EV_MONOT_PRECISE and EV_MONOT_FALLBACK.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_configure_monotonic_time(struct evutil_monotonic_timer *timer,
|
||||
int flags);
|
||||
|
||||
/** Query the current monotonic time from a struct evutil_monotonic_timer
|
||||
* previously configured with evutil_configure_monotonic_time(). Monotonic
|
||||
* time is guaranteed never to run in reverse, but is not necessarily epoch-
|
||||
* based, or relative to any other definite point. Use it to make reliable
|
||||
* measurements of elapsed time between events even when the system time
|
||||
* may be changed.
|
||||
*
|
||||
* It is not safe to use this funtion on the same timer from multiple
|
||||
* threads.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_gettime_monotonic(struct evutil_monotonic_timer *timer,
|
||||
struct timeval *tp);
|
||||
|
||||
/** Create two new sockets that are connected to each other.
|
||||
|
||||
On Unix, this simply calls socketpair(). On Windows, it uses the
|
||||
loopback network interface on 127.0.0.1, and only
|
||||
AF_INET,SOCK_STREAM are supported.
|
||||
|
||||
(This may fail on some Windows hosts where firewall software has cleverly
|
||||
decided to keep 127.0.0.1 from talking to itself.)
|
||||
|
||||
Parameters and return values are as for socketpair()
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_socketpair(int d, int type, int protocol, evutil_socket_t sv[2]);
|
||||
/** Do platform-specific operations as needed to make a socket nonblocking.
|
||||
|
||||
@param sock The socket to make nonblocking
|
||||
@return 0 on success, -1 on failure
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_make_socket_nonblocking(evutil_socket_t sock);
|
||||
|
||||
/** Do platform-specific operations to make a listener socket reusable.
|
||||
|
||||
Specifically, we want to make sure that another program will be able
|
||||
to bind this address right after we've closed the listener.
|
||||
|
||||
This differs from Windows's interpretation of "reusable", which
|
||||
allows multiple listeners to bind the same address at the same time.
|
||||
|
||||
@param sock The socket to make reusable
|
||||
@return 0 on success, -1 on failure
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_make_listen_socket_reuseable(evutil_socket_t sock);
|
||||
|
||||
/** Do platform-specific operations to make a listener port reusable.
|
||||
|
||||
Specifically, we want to make sure that multiple programs which also
|
||||
set the same socket option will be able to bind, listen at the same time.
|
||||
|
||||
This is a feature available only to Linux 3.9+
|
||||
|
||||
@param sock The socket to make reusable
|
||||
@return 0 on success, -1 on failure
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_make_listen_socket_reuseable_port(evutil_socket_t sock);
|
||||
|
||||
/** Do platform-specific operations as needed to close a socket upon a
|
||||
successful execution of one of the exec*() functions.
|
||||
|
||||
@param sock The socket to be closed
|
||||
@return 0 on success, -1 on failure
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_make_socket_closeonexec(evutil_socket_t sock);
|
||||
|
||||
/** Do the platform-specific call needed to close a socket returned from
|
||||
socket() or accept().
|
||||
|
||||
@param sock The socket to be closed
|
||||
@return 0 on success, -1 on failure
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_closesocket(evutil_socket_t sock);
|
||||
#define EVUTIL_CLOSESOCKET(s) evutil_closesocket(s)
|
||||
|
||||
/** Do platform-specific operations, if possible, to make a tcp listener
|
||||
* socket defer accept()s until there is data to read.
|
||||
*
|
||||
* Not all platforms support this. You don't want to do this for every
|
||||
* listener socket: only the ones that implement a protocol where the
|
||||
* client transmits before the server needs to respond.
|
||||
*
|
||||
* @param sock The listening socket to to make deferred
|
||||
* @return 0 on success (whether the operation is supported or not),
|
||||
* -1 on failure
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_make_tcp_listen_socket_deferred(evutil_socket_t sock);
|
||||
|
||||
#ifdef _WIN32
|
||||
/** Return the most recent socket error. Not idempotent on all platforms. */
|
||||
#define EVUTIL_SOCKET_ERROR() WSAGetLastError()
|
||||
/** Replace the most recent socket error with errcode */
|
||||
#define EVUTIL_SET_SOCKET_ERROR(errcode) \
|
||||
do { WSASetLastError(errcode); } while (0)
|
||||
/** Return the most recent socket error to occur on sock. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_socket_geterror(evutil_socket_t sock);
|
||||
/** Convert a socket error to a string. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
const char *evutil_socket_error_to_string(int errcode);
|
||||
#elif defined(EVENT_IN_DOXYGEN_)
|
||||
/**
|
||||
@name Socket error functions
|
||||
|
||||
These functions are needed for making programs compatible between
|
||||
Windows and Unix-like platforms.
|
||||
|
||||
You see, Winsock handles socket errors differently from the rest of
|
||||
the world. Elsewhere, a socket error is like any other error and is
|
||||
stored in errno. But winsock functions require you to retrieve the
|
||||
error with a special function, and don't let you use strerror for
|
||||
the error codes. And handling EWOULDBLOCK is ... different.
|
||||
|
||||
@{
|
||||
*/
|
||||
/** Return the most recent socket error. Not idempotent on all platforms. */
|
||||
#define EVUTIL_SOCKET_ERROR() ...
|
||||
/** Replace the most recent socket error with errcode */
|
||||
#define EVUTIL_SET_SOCKET_ERROR(errcode) ...
|
||||
/** Return the most recent socket error to occur on sock. */
|
||||
#define evutil_socket_geterror(sock) ...
|
||||
/** Convert a socket error to a string. */
|
||||
#define evutil_socket_error_to_string(errcode) ...
|
||||
/**@}*/
|
||||
#else
|
||||
#define EVUTIL_SOCKET_ERROR() (errno)
|
||||
#define EVUTIL_SET_SOCKET_ERROR(errcode) \
|
||||
do { errno = (errcode); } while (0)
|
||||
#define evutil_socket_geterror(sock) (errno)
|
||||
#define evutil_socket_error_to_string(errcode) (strerror(errcode))
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @name Manipulation macros for struct timeval.
|
||||
*
|
||||
* We define replacements
|
||||
* for timeradd, timersub, timerclear, timercmp, and timerisset.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
#ifdef EVENT__HAVE_TIMERADD
|
||||
#define evutil_timeradd(tvp, uvp, vvp) timeradd((tvp), (uvp), (vvp))
|
||||
#define evutil_timersub(tvp, uvp, vvp) timersub((tvp), (uvp), (vvp))
|
||||
#else
|
||||
#define evutil_timeradd(tvp, uvp, vvp) \
|
||||
do { \
|
||||
(vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
|
||||
(vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
|
||||
if ((vvp)->tv_usec >= 1000000) { \
|
||||
(vvp)->tv_sec++; \
|
||||
(vvp)->tv_usec -= 1000000; \
|
||||
} \
|
||||
} while (0)
|
||||
#define evutil_timersub(tvp, uvp, vvp) \
|
||||
do { \
|
||||
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
|
||||
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
|
||||
if ((vvp)->tv_usec < 0) { \
|
||||
(vvp)->tv_sec--; \
|
||||
(vvp)->tv_usec += 1000000; \
|
||||
} \
|
||||
} while (0)
|
||||
#endif /* !EVENT__HAVE_TIMERADD */
|
||||
|
||||
#ifdef EVENT__HAVE_TIMERCLEAR
|
||||
#define evutil_timerclear(tvp) timerclear(tvp)
|
||||
#else
|
||||
#define evutil_timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
/** Return true iff the tvp is related to uvp according to the relational
|
||||
* operator cmp. Recognized values for cmp are ==, <=, <, >=, and >. */
|
||||
#define evutil_timercmp(tvp, uvp, cmp) \
|
||||
(((tvp)->tv_sec == (uvp)->tv_sec) ? \
|
||||
((tvp)->tv_usec cmp (uvp)->tv_usec) : \
|
||||
((tvp)->tv_sec cmp (uvp)->tv_sec))
|
||||
|
||||
#ifdef EVENT__HAVE_TIMERISSET
|
||||
#define evutil_timerisset(tvp) timerisset(tvp)
|
||||
#else
|
||||
#define evutil_timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
|
||||
#endif
|
||||
|
||||
/** Replacement for offsetof on platforms that don't define it. */
|
||||
#ifdef offsetof
|
||||
#define evutil_offsetof(type, field) offsetof(type, field)
|
||||
#else
|
||||
#define evutil_offsetof(type, field) ((off_t)(&((type *)0)->field))
|
||||
#endif
|
||||
|
||||
/* big-int related functions */
|
||||
/** Parse a 64-bit value from a string. Arguments are as for strtol. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
ev_int64_t evutil_strtoll(const char *s, char **endptr, int base);
|
||||
|
||||
/** Replacement for gettimeofday on platforms that lack it. */
|
||||
#ifdef EVENT__HAVE_GETTIMEOFDAY
|
||||
#define evutil_gettimeofday(tv, tz) gettimeofday((tv), (tz))
|
||||
#else
|
||||
struct timezone;
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_gettimeofday(struct timeval *tv, struct timezone *tz);
|
||||
#endif
|
||||
|
||||
/** Replacement for snprintf to get consistent behavior on platforms for
|
||||
which the return value of snprintf does not conform to C99.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_snprintf(char *buf, size_t buflen, const char *format, ...)
|
||||
#ifdef __GNUC__
|
||||
__attribute__((format(printf, 3, 4)))
|
||||
#endif
|
||||
;
|
||||
/** Replacement for vsnprintf to get consistent behavior on platforms for
|
||||
which the return value of snprintf does not conform to C99.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap)
|
||||
#ifdef __GNUC__
|
||||
__attribute__((format(printf, 3, 0)))
|
||||
#endif
|
||||
;
|
||||
|
||||
/** Replacement for inet_ntop for platforms which lack it. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
const char *evutil_inet_ntop(int af, const void *src, char *dst, size_t len);
|
||||
/** Replacement for inet_pton for platforms which lack it. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_inet_pton(int af, const char *src, void *dst);
|
||||
struct sockaddr;
|
||||
|
||||
/** Parse an IPv4 or IPv6 address, with optional port, from a string.
|
||||
|
||||
Recognized formats are:
|
||||
- [IPv6Address]:port
|
||||
- [IPv6Address]
|
||||
- IPv6Address
|
||||
- IPv4Address:port
|
||||
- IPv4Address
|
||||
|
||||
If no port is specified, the port in the output is set to 0.
|
||||
|
||||
@param str The string to parse.
|
||||
@param out A struct sockaddr to hold the result. This should probably be
|
||||
a struct sockaddr_storage.
|
||||
@param outlen A pointer to the number of bytes that that 'out' can safely
|
||||
hold. Set to the number of bytes used in 'out' on success.
|
||||
@return -1 if the address is not well-formed, if the port is out of range,
|
||||
or if out is not large enough to hold the result. Otherwise returns
|
||||
0 on success.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_parse_sockaddr_port(const char *str, struct sockaddr *out, int *outlen);
|
||||
|
||||
/** Compare two sockaddrs; return 0 if they are equal, or less than 0 if sa1
|
||||
* preceeds sa2, or greater than 0 if sa1 follows sa2. If include_port is
|
||||
* true, consider the port as well as the address. Only implemented for
|
||||
* AF_INET and AF_INET6 addresses. The ordering is not guaranteed to remain
|
||||
* the same between Libevent versions. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_sockaddr_cmp(const struct sockaddr *sa1, const struct sockaddr *sa2,
|
||||
int include_port);
|
||||
|
||||
/** As strcasecmp, but always compares the characters in locale-independent
|
||||
ASCII. That's useful if you're handling data in ASCII-based protocols.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_ascii_strcasecmp(const char *str1, const char *str2);
|
||||
/** As strncasecmp, but always compares the characters in locale-independent
|
||||
ASCII. That's useful if you're handling data in ASCII-based protocols.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_ascii_strncasecmp(const char *str1, const char *str2, size_t n);
|
||||
|
||||
/* Here we define evutil_addrinfo to the native addrinfo type, or redefine it
|
||||
* if this system has no getaddrinfo(). */
|
||||
#ifdef EVENT__HAVE_STRUCT_ADDRINFO
|
||||
#define evutil_addrinfo addrinfo
|
||||
#else
|
||||
/** A definition of struct addrinfo for systems that lack it.
|
||||
|
||||
(This is just an alias for struct addrinfo if the system defines
|
||||
struct addrinfo.)
|
||||
*/
|
||||
struct evutil_addrinfo {
|
||||
int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
|
||||
int ai_family; /* PF_xxx */
|
||||
int ai_socktype; /* SOCK_xxx */
|
||||
int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
|
||||
size_t ai_addrlen; /* length of ai_addr */
|
||||
char *ai_canonname; /* canonical name for nodename */
|
||||
struct sockaddr *ai_addr; /* binary address */
|
||||
struct evutil_addrinfo *ai_next; /* next structure in linked list */
|
||||
};
|
||||
#endif
|
||||
/** @name evutil_getaddrinfo() error codes
|
||||
|
||||
These values are possible error codes for evutil_getaddrinfo() and
|
||||
related functions.
|
||||
|
||||
@{
|
||||
*/
|
||||
#if defined(EAI_ADDRFAMILY) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_EAI_ADDRFAMILY EAI_ADDRFAMILY
|
||||
#else
|
||||
#define EVUTIL_EAI_ADDRFAMILY -901
|
||||
#endif
|
||||
#if defined(EAI_AGAIN) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_EAI_AGAIN EAI_AGAIN
|
||||
#else
|
||||
#define EVUTIL_EAI_AGAIN -902
|
||||
#endif
|
||||
#if defined(EAI_BADFLAGS) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_EAI_BADFLAGS EAI_BADFLAGS
|
||||
#else
|
||||
#define EVUTIL_EAI_BADFLAGS -903
|
||||
#endif
|
||||
#if defined(EAI_FAIL) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_EAI_FAIL EAI_FAIL
|
||||
#else
|
||||
#define EVUTIL_EAI_FAIL -904
|
||||
#endif
|
||||
#if defined(EAI_FAMILY) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_EAI_FAMILY EAI_FAMILY
|
||||
#else
|
||||
#define EVUTIL_EAI_FAMILY -905
|
||||
#endif
|
||||
#if defined(EAI_MEMORY) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_EAI_MEMORY EAI_MEMORY
|
||||
#else
|
||||
#define EVUTIL_EAI_MEMORY -906
|
||||
#endif
|
||||
/* This test is a bit complicated, since some MS SDKs decide to
|
||||
* remove NODATA or redefine it to be the same as NONAME, in a
|
||||
* fun interpretation of RFC 2553 and RFC 3493. */
|
||||
#if defined(EAI_NODATA) && defined(EVENT__HAVE_GETADDRINFO) && (!defined(EAI_NONAME) || EAI_NODATA != EAI_NONAME)
|
||||
#define EVUTIL_EAI_NODATA EAI_NODATA
|
||||
#else
|
||||
#define EVUTIL_EAI_NODATA -907
|
||||
#endif
|
||||
#if defined(EAI_NONAME) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_EAI_NONAME EAI_NONAME
|
||||
#else
|
||||
#define EVUTIL_EAI_NONAME -908
|
||||
#endif
|
||||
#if defined(EAI_SERVICE) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_EAI_SERVICE EAI_SERVICE
|
||||
#else
|
||||
#define EVUTIL_EAI_SERVICE -909
|
||||
#endif
|
||||
#if defined(EAI_SOCKTYPE) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_EAI_SOCKTYPE EAI_SOCKTYPE
|
||||
#else
|
||||
#define EVUTIL_EAI_SOCKTYPE -910
|
||||
#endif
|
||||
#if defined(EAI_SYSTEM) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_EAI_SYSTEM EAI_SYSTEM
|
||||
#else
|
||||
#define EVUTIL_EAI_SYSTEM -911
|
||||
#endif
|
||||
|
||||
#define EVUTIL_EAI_CANCEL -90001
|
||||
|
||||
#if defined(AI_PASSIVE) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_AI_PASSIVE AI_PASSIVE
|
||||
#else
|
||||
#define EVUTIL_AI_PASSIVE 0x1000
|
||||
#endif
|
||||
#if defined(AI_CANONNAME) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_AI_CANONNAME AI_CANONNAME
|
||||
#else
|
||||
#define EVUTIL_AI_CANONNAME 0x2000
|
||||
#endif
|
||||
#if defined(AI_NUMERICHOST) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_AI_NUMERICHOST AI_NUMERICHOST
|
||||
#else
|
||||
#define EVUTIL_AI_NUMERICHOST 0x4000
|
||||
#endif
|
||||
#if defined(AI_NUMERICSERV) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_AI_NUMERICSERV AI_NUMERICSERV
|
||||
#else
|
||||
#define EVUTIL_AI_NUMERICSERV 0x8000
|
||||
#endif
|
||||
#if defined(AI_V4MAPPED) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_AI_V4MAPPED AI_V4MAPPED
|
||||
#else
|
||||
#define EVUTIL_AI_V4MAPPED 0x10000
|
||||
#endif
|
||||
#if defined(AI_ALL) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_AI_ALL AI_ALL
|
||||
#else
|
||||
#define EVUTIL_AI_ALL 0x20000
|
||||
#endif
|
||||
#if defined(AI_ADDRCONFIG) && defined(EVENT__HAVE_GETADDRINFO)
|
||||
#define EVUTIL_AI_ADDRCONFIG AI_ADDRCONFIG
|
||||
#else
|
||||
#define EVUTIL_AI_ADDRCONFIG 0x40000
|
||||
#endif
|
||||
/**@}*/
|
||||
|
||||
struct evutil_addrinfo;
|
||||
/**
|
||||
* This function clones getaddrinfo for systems that don't have it. For full
|
||||
* details, see RFC 3493, section 6.1.
|
||||
*
|
||||
* Limitations:
|
||||
* - When the system has no getaddrinfo, we fall back to gethostbyname_r or
|
||||
* gethostbyname, with their attendant issues.
|
||||
* - The AI_V4MAPPED and AI_ALL flags are not currently implemented.
|
||||
*
|
||||
* For a nonblocking variant, see evdns_getaddrinfo.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_getaddrinfo(const char *nodename, const char *servname,
|
||||
const struct evutil_addrinfo *hints_in, struct evutil_addrinfo **res);
|
||||
|
||||
/** Release storage allocated by evutil_getaddrinfo or evdns_getaddrinfo. */
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evutil_freeaddrinfo(struct evutil_addrinfo *ai);
|
||||
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
const char *evutil_gai_strerror(int err);
|
||||
|
||||
/** Generate n bytes of secure pseudorandom data, and store them in buf.
|
||||
*
|
||||
* Current versions of Libevent use an ARC4-based random number generator,
|
||||
* seeded using the platform's entropy source (/dev/urandom on Unix-like
|
||||
* systems; CryptGenRandom on Windows). This is not actually as secure as it
|
||||
* should be: ARC4 is a pretty lousy cipher, and the current implementation
|
||||
* provides only rudimentary prediction- and backtracking-resistance. Don't
|
||||
* use this for serious cryptographic applications.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evutil_secure_rng_get_bytes(void *buf, size_t n);
|
||||
|
||||
/**
|
||||
* Seed the secure random number generator if needed, and return 0 on
|
||||
* success or -1 on failure.
|
||||
*
|
||||
* It is okay to call this function more than once; it will still return
|
||||
* 0 if the RNG has been successfully seeded and -1 if it can't be
|
||||
* seeded.
|
||||
*
|
||||
* Ordinarily you don't need to call this function from your own code;
|
||||
* Libevent will seed the RNG itself the first time it needs good random
|
||||
* numbers. You only need to call it if (a) you want to double-check
|
||||
* that one of the seeding methods did succeed, or (b) you plan to drop
|
||||
* the capability to seed (by chrooting, or dropping capabilities, or
|
||||
* whatever), and you want to make sure that seeding happens before your
|
||||
* program loses the ability to do it.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_secure_rng_init(void);
|
||||
|
||||
/**
|
||||
* Set a filename to use in place of /dev/urandom for seeding the secure
|
||||
* PRNG. Return 0 on success, -1 on failure.
|
||||
*
|
||||
* Call this function BEFORE calling any other initialization or RNG
|
||||
* functions.
|
||||
*
|
||||
* (This string will _NOT_ be copied internally. Do not free it while any
|
||||
* user of the secure RNG might be running. Don't pass anything other than a
|
||||
* real /dev/...random device file here, or you might lose security.)
|
||||
*
|
||||
* This API is unstable, and might change in a future libevent version.
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
int evutil_secure_rng_set_urandom_device_file(char *fname);
|
||||
|
||||
/** Seed the random number generator with extra random bytes.
|
||||
|
||||
You should almost never need to call this function; it should be
|
||||
sufficient to invoke evutil_secure_rng_init(), or let Libevent take
|
||||
care of calling evutil_secure_rng_init() on its own.
|
||||
|
||||
If you call this function as a _replacement_ for the regular
|
||||
entropy sources, then you need to be sure that your input
|
||||
contains a fairly large amount of strong entropy. Doing so is
|
||||
notoriously hard: most people who try get it wrong. Watch out!
|
||||
|
||||
@param dat a buffer full of a strong source of random numbers
|
||||
@param datlen the number of bytes to read from datlen
|
||||
*/
|
||||
EVENT2_EXPORT_SYMBOL
|
||||
void evutil_secure_rng_add_bytes(const char *dat, size_t datlen);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* EVENT1_EVUTIL_H_INCLUDED_ */
|
||||
50
cache/include/libevent2/event2/visibility.h
vendored
50
cache/include/libevent2/event2/visibility.h
vendored
@@ -1,50 +0,0 @@
|
||||
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT2_VISIBILITY_H_INCLUDED_
|
||||
#define EVENT2_VISIBILITY_H_INCLUDED_
|
||||
|
||||
#include <event2/event-config.h>
|
||||
|
||||
#if defined(event_EXPORTS) || defined(event_extra_EXPORTS) || defined(event_core_EXPORTS)
|
||||
# if defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
||||
# define EVENT2_EXPORT_SYMBOL __global
|
||||
# elif defined __GNUC__
|
||||
# define EVENT2_EXPORT_SYMBOL __attribute__ ((visibility("default")))
|
||||
# elif defined(_MSC_VER)
|
||||
# define EVENT2_EXPORT_SYMBOL extern __declspec(dllexport)
|
||||
# else
|
||||
# define EVENT2_EXPORT_SYMBOL /* unknown compiler */
|
||||
# endif
|
||||
#else
|
||||
# if defined(EVENT__NEED_DLLIMPORT) && defined(_MSC_VER) && !defined(EVENT_BUILDING_REGRESS_TEST)
|
||||
# define EVENT2_EXPORT_SYMBOL extern __declspec(dllimport)
|
||||
# else
|
||||
# define EVENT2_EXPORT_SYMBOL
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* EVENT2_VISIBILITY_H_INCLUDED_ */
|
||||
45
cache/include/libevent2/evhttp.h
vendored
45
cache/include/libevent2/evhttp.h
vendored
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT1_EVHTTP_H_INCLUDED_
|
||||
#define EVENT1_EVHTTP_H_INCLUDED_
|
||||
|
||||
/** @file evhttp.h
|
||||
|
||||
An http implementation subsystem for Libevent.
|
||||
|
||||
The <evhttp.h> header is deprecated in Libevent 2.0 and later; please
|
||||
use <event2/http.h> instead. Depending on what functionality you
|
||||
need, you may also want to include more of the other <event2/...>
|
||||
headers.
|
||||
*/
|
||||
|
||||
#include <event.h>
|
||||
#include <event2/http.h>
|
||||
#include <event2/http_struct.h>
|
||||
#include <event2/http_compat.h>
|
||||
|
||||
#endif /* EVENT1_EVHTTP_H_INCLUDED_ */
|
||||
45
cache/include/libevent2/evrpc.h
vendored
45
cache/include/libevent2/evrpc.h
vendored
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT1_EVRPC_H_INCLUDED_
|
||||
#define EVENT1_EVRPC_H_INCLUDED_
|
||||
|
||||
/** @file evrpc.h
|
||||
|
||||
An RPC system for Libevent.
|
||||
|
||||
The <evrpc.h> header is deprecated in Libevent 2.0 and later; please
|
||||
use <event2/rpc.h> instead. Depending on what functionality you
|
||||
need, you may also want to include more of the other <event2/...>
|
||||
headers.
|
||||
*/
|
||||
|
||||
#include <event.h>
|
||||
#include <event2/rpc.h>
|
||||
#include <event2/rpc_struct.h>
|
||||
#include <event2/rpc_compat.h>
|
||||
|
||||
#endif /* EVENT1_EVRPC_H_INCLUDED_ */
|
||||
39
cache/include/libevent2/evutil.h
vendored
39
cache/include/libevent2/evutil.h
vendored
@@ -1,39 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#ifndef EVENT1_EVUTIL_H_INCLUDED_
|
||||
#define EVENT1_EVUTIL_H_INCLUDED_
|
||||
|
||||
/** @file evutil.h
|
||||
|
||||
Utility and compatibility functions for Libevent.
|
||||
|
||||
The <evutil.h> header is deprecated in Libevent 2.0 and later; please
|
||||
use <event2/util.h> instead.
|
||||
*/
|
||||
|
||||
#include <event2/util.h>
|
||||
|
||||
#endif /* EVENT1_EVUTIL_H_INCLUDED_ */
|
||||
96
cache/include/libxml/DOCBparser.h
vendored
96
cache/include/libxml/DOCBparser.h
vendored
@@ -1,96 +0,0 @@
|
||||
/*
|
||||
* Summary: old DocBook SGML parser
|
||||
* Description: interface for a DocBook SGML non-verifying parser
|
||||
* This code is DEPRECATED, and should not be used anymore.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __DOCB_PARSER_H__
|
||||
#define __DOCB_PARSER_H__
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/parserInternals.h>
|
||||
|
||||
#ifndef IN_LIBXML
|
||||
#ifdef __GNUC__
|
||||
#warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Most of the back-end structures from XML and SGML are shared.
|
||||
*/
|
||||
typedef xmlParserCtxt docbParserCtxt;
|
||||
typedef xmlParserCtxtPtr docbParserCtxtPtr;
|
||||
typedef xmlSAXHandler docbSAXHandler;
|
||||
typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
|
||||
typedef xmlParserInput docbParserInput;
|
||||
typedef xmlParserInputPtr docbParserInputPtr;
|
||||
typedef xmlDocPtr docbDocPtr;
|
||||
|
||||
/*
|
||||
* There is only few public functions.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
docbEncodeEntities(unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen, int quoteChar);
|
||||
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbSAXParseDoc (xmlChar *cur,
|
||||
const char *encoding,
|
||||
docbSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbParseDoc (xmlChar *cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbSAXParseFile (const char *filename,
|
||||
const char *encoding,
|
||||
docbSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN docbDocPtr XMLCALL
|
||||
docbParseFile (const char *filename,
|
||||
const char *encoding);
|
||||
|
||||
/**
|
||||
* Interfaces for the Push mode.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
docbFreeParserCtxt (docbParserCtxtPtr ctxt);
|
||||
XMLPUBFUN docbParserCtxtPtr XMLCALL
|
||||
docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *chunk,
|
||||
int size,
|
||||
const char *filename,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
docbParseChunk (docbParserCtxtPtr ctxt,
|
||||
const char *chunk,
|
||||
int size,
|
||||
int terminate);
|
||||
XMLPUBFUN docbParserCtxtPtr XMLCALL
|
||||
docbCreateFileParserCtxt(const char *filename,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
docbParseDocument (docbParserCtxtPtr ctxt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_DOCB_ENABLED */
|
||||
|
||||
#endif /* __DOCB_PARSER_H__ */
|
||||
306
cache/include/libxml/HTMLparser.h
vendored
306
cache/include/libxml/HTMLparser.h
vendored
@@ -1,306 +0,0 @@
|
||||
/*
|
||||
* Summary: interface for an HTML 4.0 non-verifying parser
|
||||
* Description: this module implements an HTML 4.0 non-verifying parser
|
||||
* with API compatible with the XML parser ones. It should
|
||||
* be able to parse "real world" HTML, even if severely
|
||||
* broken from a specification point of view.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __HTML_PARSER_H__
|
||||
#define __HTML_PARSER_H__
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Most of the back-end structures from XML and HTML are shared.
|
||||
*/
|
||||
typedef xmlParserCtxt htmlParserCtxt;
|
||||
typedef xmlParserCtxtPtr htmlParserCtxtPtr;
|
||||
typedef xmlParserNodeInfo htmlParserNodeInfo;
|
||||
typedef xmlSAXHandler htmlSAXHandler;
|
||||
typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
|
||||
typedef xmlParserInput htmlParserInput;
|
||||
typedef xmlParserInputPtr htmlParserInputPtr;
|
||||
typedef xmlDocPtr htmlDocPtr;
|
||||
typedef xmlNodePtr htmlNodePtr;
|
||||
|
||||
/*
|
||||
* Internal description of an HTML element, representing HTML 4.01
|
||||
* and XHTML 1.0 (which share the same structure).
|
||||
*/
|
||||
typedef struct _htmlElemDesc htmlElemDesc;
|
||||
typedef htmlElemDesc *htmlElemDescPtr;
|
||||
struct _htmlElemDesc {
|
||||
const char *name; /* The tag name */
|
||||
char startTag; /* Whether the start tag can be implied */
|
||||
char endTag; /* Whether the end tag can be implied */
|
||||
char saveEndTag; /* Whether the end tag should be saved */
|
||||
char empty; /* Is this an empty element ? */
|
||||
char depr; /* Is this a deprecated element ? */
|
||||
char dtd; /* 1: only in Loose DTD, 2: only Frameset one */
|
||||
char isinline; /* is this a block 0 or inline 1 element */
|
||||
const char *desc; /* the description */
|
||||
|
||||
/* NRK Jan.2003
|
||||
* New fields encapsulating HTML structure
|
||||
*
|
||||
* Bugs:
|
||||
* This is a very limited representation. It fails to tell us when
|
||||
* an element *requires* subelements (we only have whether they're
|
||||
* allowed or not), and it doesn't tell us where CDATA and PCDATA
|
||||
* are allowed. Some element relationships are not fully represented:
|
||||
* these are flagged with the word MODIFIER
|
||||
*/
|
||||
const char** subelts; /* allowed sub-elements of this element */
|
||||
const char* defaultsubelt; /* subelement for suggested auto-repair
|
||||
if necessary or NULL */
|
||||
const char** attrs_opt; /* Optional Attributes */
|
||||
const char** attrs_depr; /* Additional deprecated attributes */
|
||||
const char** attrs_req; /* Required attributes */
|
||||
};
|
||||
|
||||
/*
|
||||
* Internal description of an HTML entity.
|
||||
*/
|
||||
typedef struct _htmlEntityDesc htmlEntityDesc;
|
||||
typedef htmlEntityDesc *htmlEntityDescPtr;
|
||||
struct _htmlEntityDesc {
|
||||
unsigned int value; /* the UNICODE value for the character */
|
||||
const char *name; /* The entity name */
|
||||
const char *desc; /* the description */
|
||||
};
|
||||
|
||||
/*
|
||||
* There is only few public functions.
|
||||
*/
|
||||
XMLPUBFUN const htmlElemDesc * XMLCALL
|
||||
htmlTagLookup (const xmlChar *tag);
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
htmlEntityLookup(const xmlChar *name);
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
htmlEntityValueLookup(unsigned int value);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlIsAutoClosed(htmlDocPtr doc,
|
||||
htmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlAutoCloseTag(htmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
htmlNodePtr elem);
|
||||
XMLPUBFUN const htmlEntityDesc * XMLCALL
|
||||
htmlParseEntityRef(htmlParserCtxtPtr ctxt,
|
||||
const xmlChar **str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlParseCharRef(htmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlParseElement(htmlParserCtxtPtr ctxt);
|
||||
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
htmlNewParserCtxt(void);
|
||||
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
htmlCreateMemoryParserCtxt(const char *buffer,
|
||||
int size);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlParseDocument(htmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlSAXParseDoc (xmlChar *cur,
|
||||
const char *encoding,
|
||||
htmlSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlParseDoc (xmlChar *cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlSAXParseFile(const char *filename,
|
||||
const char *encoding,
|
||||
htmlSAXHandlerPtr sax,
|
||||
void *userData);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlParseFile (const char *filename,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
UTF8ToHtml (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlEncodeEntities(unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen, int quoteChar);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlIsScriptAttribute(const xmlChar *name);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlHandleOmittedElem(int val);
|
||||
|
||||
#ifdef LIBXML_PUSH_ENABLED
|
||||
/**
|
||||
* Interfaces for the Push mode.
|
||||
*/
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL
|
||||
htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
|
||||
void *user_data,
|
||||
const char *chunk,
|
||||
int size,
|
||||
const char *filename,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlParseChunk (htmlParserCtxtPtr ctxt,
|
||||
const char *chunk,
|
||||
int size,
|
||||
int terminate);
|
||||
#endif /* LIBXML_PUSH_ENABLED */
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
|
||||
|
||||
/*
|
||||
* New set of simpler/more flexible APIs
|
||||
*/
|
||||
/**
|
||||
* xmlParserOption:
|
||||
*
|
||||
* This is the set of XML parser options that can be passed down
|
||||
* to the xmlReadDoc() and similar calls.
|
||||
*/
|
||||
typedef enum {
|
||||
HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
|
||||
HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
|
||||
HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
|
||||
HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
|
||||
HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
|
||||
HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
|
||||
HTML_PARSE_NONET = 1<<11,/* Forbid network access */
|
||||
HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
|
||||
HTML_PARSE_COMPACT = 1<<16,/* compact small text nodes */
|
||||
HTML_PARSE_IGNORE_ENC=1<<21 /* ignore internal document encoding hint */
|
||||
} htmlParserOption;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlCtxtReset (htmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlReadDoc (const xmlChar *cur,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlReadFile (const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlReadMemory (const char *buffer,
|
||||
int size,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlReadFd (int fd,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlReadIO (xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *cur,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
|
||||
const char *filename,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
|
||||
const char *buffer,
|
||||
int size,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
|
||||
int fd,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
|
||||
xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
|
||||
/* NRK/Jan2003: further knowledge of HTML structure
|
||||
*/
|
||||
typedef enum {
|
||||
HTML_NA = 0 , /* something we don't check at all */
|
||||
HTML_INVALID = 0x1 ,
|
||||
HTML_DEPRECATED = 0x2 ,
|
||||
HTML_VALID = 0x4 ,
|
||||
HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
|
||||
} htmlStatus ;
|
||||
|
||||
/* Using htmlElemDesc rather than name here, to emphasise the fact
|
||||
that otherwise there's a lookup overhead
|
||||
*/
|
||||
XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
|
||||
XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
|
||||
XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
|
||||
XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ;
|
||||
/**
|
||||
* htmlDefaultSubelement:
|
||||
* @elt: HTML element
|
||||
*
|
||||
* Returns the default subelement for this element
|
||||
*/
|
||||
#define htmlDefaultSubelement(elt) elt->defaultsubelt
|
||||
/**
|
||||
* htmlElementAllowedHereDesc:
|
||||
* @parent: HTML parent element
|
||||
* @elt: HTML element
|
||||
*
|
||||
* Checks whether an HTML element description may be a
|
||||
* direct child of the specified element.
|
||||
*
|
||||
* Returns 1 if allowed; 0 otherwise.
|
||||
*/
|
||||
#define htmlElementAllowedHereDesc(parent,elt) \
|
||||
htmlElementAllowedHere((parent), (elt)->name)
|
||||
/**
|
||||
* htmlRequiredAttrs:
|
||||
* @elt: HTML element
|
||||
*
|
||||
* Returns the attributes required for the specified element.
|
||||
*/
|
||||
#define htmlRequiredAttrs(elt) (elt)->attrs_req
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_HTML_ENABLED */
|
||||
#endif /* __HTML_PARSER_H__ */
|
||||
147
cache/include/libxml/HTMLtree.h
vendored
147
cache/include/libxml/HTMLtree.h
vendored
@@ -1,147 +0,0 @@
|
||||
/*
|
||||
* Summary: specific APIs to process HTML tree, especially serialization
|
||||
* Description: this module implements a few function needed to process
|
||||
* tree in an HTML specific way.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __HTML_TREE_H__
|
||||
#define __HTML_TREE_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/HTMLparser.h>
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* HTML_TEXT_NODE:
|
||||
*
|
||||
* Macro. A text node in a HTML document is really implemented
|
||||
* the same way as a text node in an XML document.
|
||||
*/
|
||||
#define HTML_TEXT_NODE XML_TEXT_NODE
|
||||
/**
|
||||
* HTML_ENTITY_REF_NODE:
|
||||
*
|
||||
* Macro. An entity reference in a HTML document is really implemented
|
||||
* the same way as an entity reference in an XML document.
|
||||
*/
|
||||
#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
|
||||
/**
|
||||
* HTML_COMMENT_NODE:
|
||||
*
|
||||
* Macro. A comment in a HTML document is really implemented
|
||||
* the same way as a comment in an XML document.
|
||||
*/
|
||||
#define HTML_COMMENT_NODE XML_COMMENT_NODE
|
||||
/**
|
||||
* HTML_PRESERVE_NODE:
|
||||
*
|
||||
* Macro. A preserved node in a HTML document is really implemented
|
||||
* the same way as a CDATA section in an XML document.
|
||||
*/
|
||||
#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
|
||||
/**
|
||||
* HTML_PI_NODE:
|
||||
*
|
||||
* Macro. A processing instruction in a HTML document is really implemented
|
||||
* the same way as a processing instruction in an XML document.
|
||||
*/
|
||||
#define HTML_PI_NODE XML_PI_NODE
|
||||
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlNewDoc (const xmlChar *URI,
|
||||
const xmlChar *ExternalID);
|
||||
XMLPUBFUN htmlDocPtr XMLCALL
|
||||
htmlNewDocNoDtD (const xmlChar *URI,
|
||||
const xmlChar *ExternalID);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
htmlGetMetaEncoding (htmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlSetMetaEncoding (htmlDocPtr doc,
|
||||
const xmlChar *encoding);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlDocDumpMemory (xmlDocPtr cur,
|
||||
xmlChar **mem,
|
||||
int *size);
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlDocDumpMemoryFormat (xmlDocPtr cur,
|
||||
xmlChar **mem,
|
||||
int *size,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlDocDump (FILE *f,
|
||||
xmlDocPtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlSaveFile (const char *filename,
|
||||
xmlDocPtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlNodeDump (xmlBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlNodeDumpFile (FILE *out,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlNodeDumpFileFormat (FILE *out,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlSaveFileEnc (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlSaveFileFormat (const char *filename,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlNodeDumpOutput (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
const char *encoding);
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
htmlIsBooleanAttr (const xmlChar *name);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_HTML_ENABLED */
|
||||
|
||||
#endif /* __HTML_TREE_H__ */
|
||||
|
||||
173
cache/include/libxml/SAX.h
vendored
173
cache/include/libxml/SAX.h
vendored
@@ -1,173 +0,0 @@
|
||||
/*
|
||||
* Summary: Old SAX version 1 handler, deprecated
|
||||
* Description: DEPRECATED set of SAX version 1 interfaces used to
|
||||
* build the DOM tree.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XML_SAX_H__
|
||||
#define __XML_SAX_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/xlink.h>
|
||||
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
getPublicId (void *ctx);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
getSystemId (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
setDocumentLocator (void *ctx,
|
||||
xmlSAXLocatorPtr loc);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
getLineNumber (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
getColumnNumber (void *ctx);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
isStandalone (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
hasInternalSubset (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
hasExternalSubset (void *ctx);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
internalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN void XMLCALL
|
||||
externalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
getEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
getParameterEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
resolveEntity (void *ctx,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
entityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
xmlChar *content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
attributeDecl (void *ctx,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *fullname,
|
||||
int type,
|
||||
int def,
|
||||
const xmlChar *defaultValue,
|
||||
xmlEnumerationPtr tree);
|
||||
XMLPUBFUN void XMLCALL
|
||||
elementDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
xmlElementContentPtr content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
notationDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
XMLPUBFUN void XMLCALL
|
||||
unparsedEntityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
const xmlChar *notationName);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
startDocument (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
endDocument (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
attribute (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN void XMLCALL
|
||||
startElement (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
const xmlChar **atts);
|
||||
XMLPUBFUN void XMLCALL
|
||||
endElement (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
reference (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
characters (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
ignorableWhitespace (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
processingInstruction (void *ctx,
|
||||
const xmlChar *target,
|
||||
const xmlChar *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
globalNamespace (void *ctx,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void XMLCALL
|
||||
setNamespace (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlNsPtr XMLCALL
|
||||
getNamespace (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
checkNamespace (void *ctx,
|
||||
xmlChar *nameSpace);
|
||||
XMLPUBFUN void XMLCALL
|
||||
namespaceDecl (void *ctx,
|
||||
const xmlChar *href,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void XMLCALL
|
||||
comment (void *ctx,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN void XMLCALL
|
||||
cdataBlock (void *ctx,
|
||||
const xmlChar *value,
|
||||
int len);
|
||||
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
|
||||
int warning);
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
|
||||
#endif
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
|
||||
#endif
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
#endif /* __XML_SAX_H__ */
|
||||
178
cache/include/libxml/SAX2.h
vendored
178
cache/include/libxml/SAX2.h
vendored
@@ -1,178 +0,0 @@
|
||||
/*
|
||||
* Summary: SAX2 parser interface used to build the DOM tree
|
||||
* Description: those are the default SAX2 interfaces used by
|
||||
* the library when building DOM tree.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XML_SAX2_H__
|
||||
#define __XML_SAX2_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/xlink.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlSAX2GetPublicId (void *ctx);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlSAX2GetSystemId (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2SetDocumentLocator (void *ctx,
|
||||
xmlSAXLocatorPtr loc);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAX2GetLineNumber (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAX2GetColumnNumber (void *ctx);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAX2IsStandalone (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAX2HasInternalSubset (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAX2HasExternalSubset (void *ctx);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2InternalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2ExternalSubset (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlSAX2GetEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlSAX2GetParameterEntity (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlSAX2ResolveEntity (void *ctx,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2EntityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
xmlChar *content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2AttributeDecl (void *ctx,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *fullname,
|
||||
int type,
|
||||
int def,
|
||||
const xmlChar *defaultValue,
|
||||
xmlEnumerationPtr tree);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2ElementDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
xmlElementContentPtr content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2NotationDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2UnparsedEntityDecl (void *ctx,
|
||||
const xmlChar *name,
|
||||
const xmlChar *publicId,
|
||||
const xmlChar *systemId,
|
||||
const xmlChar *notationName);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2StartDocument (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2EndDocument (void *ctx);
|
||||
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
|
||||
defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED) || \
|
||||
defined(LIBXML_LEGACY_ENABLED)
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2StartElement (void *ctx,
|
||||
const xmlChar *fullname,
|
||||
const xmlChar **atts);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2EndElement (void *ctx,
|
||||
const xmlChar *name);
|
||||
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED or LIBXML_LEGACY_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2StartElementNs (void *ctx,
|
||||
const xmlChar *localname,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *URI,
|
||||
int nb_namespaces,
|
||||
const xmlChar **namespaces,
|
||||
int nb_attributes,
|
||||
int nb_defaulted,
|
||||
const xmlChar **attributes);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2EndElementNs (void *ctx,
|
||||
const xmlChar *localname,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *URI);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2Reference (void *ctx,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2Characters (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2IgnorableWhitespace (void *ctx,
|
||||
const xmlChar *ch,
|
||||
int len);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2ProcessingInstruction (void *ctx,
|
||||
const xmlChar *target,
|
||||
const xmlChar *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2Comment (void *ctx,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2CDataBlock (void *ctx,
|
||||
const xmlChar *value,
|
||||
int len);
|
||||
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAXDefaultVersion (int version);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSAXVersion (xmlSAXHandler *hdlr,
|
||||
int version);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
|
||||
int warning);
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
htmlDefaultSAXHandlerInit (void);
|
||||
#endif
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
docbDefaultSAXHandlerInit (void);
|
||||
#endif
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDefaultSAXHandlerInit (void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_SAX2_H__ */
|
||||
126
cache/include/libxml/c14n.h
vendored
126
cache/include/libxml/c14n.h
vendored
@@ -1,126 +0,0 @@
|
||||
/*
|
||||
* Summary: Provide Canonical XML and Exclusive XML Canonicalization
|
||||
* Description: the c14n modules provides a
|
||||
*
|
||||
* "Canonical XML" implementation
|
||||
* http://www.w3.org/TR/xml-c14n
|
||||
*
|
||||
* and an
|
||||
*
|
||||
* "Exclusive XML Canonicalization" implementation
|
||||
* http://www.w3.org/TR/xml-exc-c14n
|
||||
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Aleksey Sanin <aleksey@aleksey.com>
|
||||
*/
|
||||
#ifndef __XML_C14N_H__
|
||||
#define __XML_C14N_H__
|
||||
#ifdef LIBXML_C14N_ENABLED
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xpath.h>
|
||||
|
||||
/*
|
||||
* XML Canonicazation
|
||||
* http://www.w3.org/TR/xml-c14n
|
||||
*
|
||||
* Exclusive XML Canonicazation
|
||||
* http://www.w3.org/TR/xml-exc-c14n
|
||||
*
|
||||
* Canonical form of an XML document could be created if and only if
|
||||
* a) default attributes (if any) are added to all nodes
|
||||
* b) all character and parsed entity references are resolved
|
||||
* In order to achive this in libxml2 the document MUST be loaded with
|
||||
* following global setings:
|
||||
*
|
||||
* xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
|
||||
* xmlSubstituteEntitiesDefault(1);
|
||||
*
|
||||
* or corresponding parser context setting:
|
||||
* xmlParserCtxtPtr ctxt;
|
||||
*
|
||||
* ...
|
||||
* ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
|
||||
* ctxt->replaceEntities = 1;
|
||||
* ...
|
||||
*/
|
||||
|
||||
/*
|
||||
* xmlC14NMode:
|
||||
*
|
||||
* Predefined values for C14N modes
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
XML_C14N_1_0 = 0, /* Origianal C14N 1.0 spec */
|
||||
XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
|
||||
XML_C14N_1_1 = 2 /* C14N 1.1 spec */
|
||||
} xmlC14NMode;
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlC14NDocSaveTo (xmlDocPtr doc,
|
||||
xmlNodeSetPtr nodes,
|
||||
int mode, /* a xmlC14NMode */
|
||||
xmlChar **inclusive_ns_prefixes,
|
||||
int with_comments,
|
||||
xmlOutputBufferPtr buf);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlC14NDocDumpMemory (xmlDocPtr doc,
|
||||
xmlNodeSetPtr nodes,
|
||||
int mode, /* a xmlC14NMode */
|
||||
xmlChar **inclusive_ns_prefixes,
|
||||
int with_comments,
|
||||
xmlChar **doc_txt_ptr);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlC14NDocSave (xmlDocPtr doc,
|
||||
xmlNodeSetPtr nodes,
|
||||
int mode, /* a xmlC14NMode */
|
||||
xmlChar **inclusive_ns_prefixes,
|
||||
int with_comments,
|
||||
const char* filename,
|
||||
int compression);
|
||||
|
||||
|
||||
/**
|
||||
* This is the core C14N function
|
||||
*/
|
||||
/**
|
||||
* xmlC14NIsVisibleCallback:
|
||||
* @user_data: user data
|
||||
* @node: the curent node
|
||||
* @parent: the parent node
|
||||
*
|
||||
* Signature for a C14N callback on visible nodes
|
||||
*
|
||||
* Returns 1 if the node should be included
|
||||
*/
|
||||
typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr parent);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlC14NExecute (xmlDocPtr doc,
|
||||
xmlC14NIsVisibleCallback is_visible_callback,
|
||||
void* user_data,
|
||||
int mode, /* a xmlC14NMode */
|
||||
xmlChar **inclusive_ns_prefixes,
|
||||
int with_comments,
|
||||
xmlOutputBufferPtr buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#endif /* LIBXML_C14N_ENABLED */
|
||||
#endif /* __XML_C14N_H__ */
|
||||
|
||||
182
cache/include/libxml/catalog.h
vendored
182
cache/include/libxml/catalog.h
vendored
@@ -1,182 +0,0 @@
|
||||
/**
|
||||
* Summary: interfaces to the Catalog handling system
|
||||
* Description: the catalog module implements the support for
|
||||
* XML Catalogs and SGML catalogs
|
||||
*
|
||||
* SGML Open Technical Resolution TR9401:1997.
|
||||
* http://www.jclark.com/sp/catalog.htm
|
||||
*
|
||||
* XML Catalogs Working Draft 06 August 2001
|
||||
* http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_CATALOG_H__
|
||||
#define __XML_CATALOG_H__
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef LIBXML_CATALOG_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* XML_CATALOGS_NAMESPACE:
|
||||
*
|
||||
* The namespace for the XML Catalogs elements.
|
||||
*/
|
||||
#define XML_CATALOGS_NAMESPACE \
|
||||
(const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
|
||||
/**
|
||||
* XML_CATALOG_PI:
|
||||
*
|
||||
* The specific XML Catalog Processing Instuction name.
|
||||
*/
|
||||
#define XML_CATALOG_PI \
|
||||
(const xmlChar *) "oasis-xml-catalog"
|
||||
|
||||
/*
|
||||
* The API is voluntarily limited to general cataloging.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_CATA_PREFER_NONE = 0,
|
||||
XML_CATA_PREFER_PUBLIC = 1,
|
||||
XML_CATA_PREFER_SYSTEM
|
||||
} xmlCatalogPrefer;
|
||||
|
||||
typedef enum {
|
||||
XML_CATA_ALLOW_NONE = 0,
|
||||
XML_CATA_ALLOW_GLOBAL = 1,
|
||||
XML_CATA_ALLOW_DOCUMENT = 2,
|
||||
XML_CATA_ALLOW_ALL = 3
|
||||
} xmlCatalogAllow;
|
||||
|
||||
typedef struct _xmlCatalog xmlCatalog;
|
||||
typedef xmlCatalog *xmlCatalogPtr;
|
||||
|
||||
/*
|
||||
* Operations on a given catalog.
|
||||
*/
|
||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
||||
xmlNewCatalog (int sgml);
|
||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
||||
xmlLoadACatalog (const char *filename);
|
||||
XMLPUBFUN xmlCatalogPtr XMLCALL
|
||||
xmlLoadSGMLSuperCatalog (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlConvertSGMLCatalog (xmlCatalogPtr catal);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlACatalogAdd (xmlCatalogPtr catal,
|
||||
const xmlChar *type,
|
||||
const xmlChar *orig,
|
||||
const xmlChar *replace);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlACatalogRemove (xmlCatalogPtr catal,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlACatalogResolve (xmlCatalogPtr catal,
|
||||
const xmlChar *pubID,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlACatalogResolveSystem(xmlCatalogPtr catal,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlACatalogResolvePublic(xmlCatalogPtr catal,
|
||||
const xmlChar *pubID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlACatalogResolveURI (xmlCatalogPtr catal,
|
||||
const xmlChar *URI);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlACatalogDump (xmlCatalogPtr catal,
|
||||
FILE *out);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeCatalog (xmlCatalogPtr catal);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCatalogIsEmpty (xmlCatalogPtr catal);
|
||||
|
||||
/*
|
||||
* Global operations.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlInitializeCatalog (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlLoadCatalog (const char *filename);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlLoadCatalogs (const char *paths);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCatalogCleanup (void);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCatalogDump (FILE *out);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogResolve (const xmlChar *pubID,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogResolveSystem (const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogResolvePublic (const xmlChar *pubID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogResolveURI (const xmlChar *URI);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCatalogAdd (const xmlChar *type,
|
||||
const xmlChar *orig,
|
||||
const xmlChar *replace);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCatalogRemove (const xmlChar *value);
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlParseCatalogFile (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCatalogConvert (void);
|
||||
|
||||
/*
|
||||
* Strictly minimal interfaces for per-document catalogs used
|
||||
* by the parser.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCatalogFreeLocal (void *catalogs);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlCatalogAddLocal (void *catalogs,
|
||||
const xmlChar *URL);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogLocalResolve (void *catalogs,
|
||||
const xmlChar *pubID,
|
||||
const xmlChar *sysID);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCatalogLocalResolveURI(void *catalogs,
|
||||
const xmlChar *URI);
|
||||
/*
|
||||
* Preference settings.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCatalogSetDebug (int level);
|
||||
XMLPUBFUN xmlCatalogPrefer XMLCALL
|
||||
xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCatalogSetDefaults (xmlCatalogAllow allow);
|
||||
XMLPUBFUN xmlCatalogAllow XMLCALL
|
||||
xmlCatalogGetDefaults (void);
|
||||
|
||||
|
||||
/* DEPRECATED interfaces */
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlCatalogGetSystem (const xmlChar *sysID);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlCatalogGetPublic (const xmlChar *pubID);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* LIBXML_CATALOG_ENABLED */
|
||||
#endif /* __XML_CATALOG_H__ */
|
||||
230
cache/include/libxml/chvalid.h
vendored
230
cache/include/libxml/chvalid.h
vendored
@@ -1,230 +0,0 @@
|
||||
/*
|
||||
* Summary: Unicode character range checking
|
||||
* Description: this module exports interfaces for the character
|
||||
* range validation APIs
|
||||
*
|
||||
* This file is automatically generated from the cvs source
|
||||
* definition files using the genChRanges.py Python script
|
||||
*
|
||||
* Generation date: Mon Mar 27 11:09:48 2006
|
||||
* Sources: chvalid.def
|
||||
* Author: William Brack <wbrack@mmm.com.hk>
|
||||
*/
|
||||
|
||||
#ifndef __XML_CHVALID_H__
|
||||
#define __XML_CHVALID_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define our typedefs and structures
|
||||
*
|
||||
*/
|
||||
typedef struct _xmlChSRange xmlChSRange;
|
||||
typedef xmlChSRange *xmlChSRangePtr;
|
||||
struct _xmlChSRange {
|
||||
unsigned short low;
|
||||
unsigned short high;
|
||||
};
|
||||
|
||||
typedef struct _xmlChLRange xmlChLRange;
|
||||
typedef xmlChLRange *xmlChLRangePtr;
|
||||
struct _xmlChLRange {
|
||||
unsigned int low;
|
||||
unsigned int high;
|
||||
};
|
||||
|
||||
typedef struct _xmlChRangeGroup xmlChRangeGroup;
|
||||
typedef xmlChRangeGroup *xmlChRangeGroupPtr;
|
||||
struct _xmlChRangeGroup {
|
||||
int nbShortRange;
|
||||
int nbLongRange;
|
||||
const xmlChSRange *shortRange; /* points to an array of ranges */
|
||||
const xmlChLRange *longRange;
|
||||
};
|
||||
|
||||
/**
|
||||
* Range checking routine
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
|
||||
|
||||
|
||||
/**
|
||||
* xmlIsBaseChar_ch:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
|
||||
((0x61 <= (c)) && ((c) <= 0x7a)) || \
|
||||
((0xc0 <= (c)) && ((c) <= 0xd6)) || \
|
||||
((0xd8 <= (c)) && ((c) <= 0xf6)) || \
|
||||
(0xf8 <= (c)))
|
||||
|
||||
/**
|
||||
* xmlIsBaseCharQ:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \
|
||||
xmlIsBaseChar_ch((c)) : \
|
||||
xmlCharInRange((c), &xmlIsBaseCharGroup))
|
||||
|
||||
XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
|
||||
|
||||
/**
|
||||
* xmlIsBlank_ch:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsBlank_ch(c) (((c) == 0x20) || \
|
||||
((0x9 <= (c)) && ((c) <= 0xa)) || \
|
||||
((c) == 0xd))
|
||||
|
||||
/**
|
||||
* xmlIsBlankQ:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsBlankQ(c) (((c) < 0x100) ? \
|
||||
xmlIsBlank_ch((c)) : 0)
|
||||
|
||||
|
||||
/**
|
||||
* xmlIsChar_ch:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \
|
||||
((c) == 0xd) || \
|
||||
(0x20 <= (c)))
|
||||
|
||||
/**
|
||||
* xmlIsCharQ:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsCharQ(c) (((c) < 0x100) ? \
|
||||
xmlIsChar_ch((c)) :\
|
||||
(((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
|
||||
((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
|
||||
((0x10000 <= (c)) && ((c) <= 0x10ffff))))
|
||||
|
||||
XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
|
||||
|
||||
/**
|
||||
* xmlIsCombiningQ:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsCombiningQ(c) (((c) < 0x100) ? \
|
||||
0 : \
|
||||
xmlCharInRange((c), &xmlIsCombiningGroup))
|
||||
|
||||
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
|
||||
|
||||
/**
|
||||
* xmlIsDigit_ch:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39)))
|
||||
|
||||
/**
|
||||
* xmlIsDigitQ:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsDigitQ(c) (((c) < 0x100) ? \
|
||||
xmlIsDigit_ch((c)) : \
|
||||
xmlCharInRange((c), &xmlIsDigitGroup))
|
||||
|
||||
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
|
||||
|
||||
/**
|
||||
* xmlIsExtender_ch:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsExtender_ch(c) (((c) == 0xb7))
|
||||
|
||||
/**
|
||||
* xmlIsExtenderQ:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsExtenderQ(c) (((c) < 0x100) ? \
|
||||
xmlIsExtender_ch((c)) : \
|
||||
xmlCharInRange((c), &xmlIsExtenderGroup))
|
||||
|
||||
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
|
||||
|
||||
/**
|
||||
* xmlIsIdeographicQ:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \
|
||||
0 :\
|
||||
(((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
|
||||
((c) == 0x3007) || \
|
||||
((0x3021 <= (c)) && ((c) <= 0x3029))))
|
||||
|
||||
XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
|
||||
XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
|
||||
|
||||
/**
|
||||
* xmlIsPubidChar_ch:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
|
||||
|
||||
/**
|
||||
* xmlIsPubidCharQ:
|
||||
* @c: char to validate
|
||||
*
|
||||
* Automatically generated by genChRanges.py
|
||||
*/
|
||||
#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
|
||||
xmlIsPubidChar_ch((c)) : 0)
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsBaseChar(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsBlank(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsChar(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsCombining(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsDigit(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsExtender(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsIdeographic(unsigned int ch);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsPubidChar(unsigned int ch);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_CHVALID_H__ */
|
||||
217
cache/include/libxml/debugXML.h
vendored
217
cache/include/libxml/debugXML.h
vendored
@@ -1,217 +0,0 @@
|
||||
/*
|
||||
* Summary: Tree debugging APIs
|
||||
* Description: Interfaces to a set of routines used for debugging the tree
|
||||
* produced by the XML parser.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __DEBUG_XML__
|
||||
#define __DEBUG_XML__
|
||||
#include <stdio.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef LIBXML_DEBUG_ENABLED
|
||||
|
||||
#include <libxml/xpath.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The standard Dump routines.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpString (FILE *output,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpAttr (FILE *output,
|
||||
xmlAttrPtr attr,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpAttrList (FILE *output,
|
||||
xmlAttrPtr attr,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpOneNode (FILE *output,
|
||||
xmlNodePtr node,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpNode (FILE *output,
|
||||
xmlNodePtr node,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpNodeList (FILE *output,
|
||||
xmlNodePtr node,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpDocumentHead(FILE *output,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpDocument (FILE *output,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpDTD (FILE *output,
|
||||
xmlDtdPtr dtd);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDebugDumpEntities (FILE *output,
|
||||
xmlDocPtr doc);
|
||||
|
||||
/****************************************************************
|
||||
* *
|
||||
* Checking routines *
|
||||
* *
|
||||
****************************************************************/
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDebugCheckDocument (FILE * output,
|
||||
xmlDocPtr doc);
|
||||
|
||||
/****************************************************************
|
||||
* *
|
||||
* XML shell helpers *
|
||||
* *
|
||||
****************************************************************/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlLsOneNode (FILE *output, xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlLsCountNode (xmlNodePtr node);
|
||||
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlBoolToText (int boolval);
|
||||
|
||||
/****************************************************************
|
||||
* *
|
||||
* The XML shell related structures and functions *
|
||||
* *
|
||||
****************************************************************/
|
||||
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
/**
|
||||
* xmlShellReadlineFunc:
|
||||
* @prompt: a string prompt
|
||||
*
|
||||
* This is a generic signature for the XML shell input function.
|
||||
*
|
||||
* Returns a string which will be freed by the Shell.
|
||||
*/
|
||||
typedef char * (* xmlShellReadlineFunc)(char *prompt);
|
||||
|
||||
/**
|
||||
* xmlShellCtxt:
|
||||
*
|
||||
* A debugging shell context.
|
||||
* TODO: add the defined function tables.
|
||||
*/
|
||||
typedef struct _xmlShellCtxt xmlShellCtxt;
|
||||
typedef xmlShellCtxt *xmlShellCtxtPtr;
|
||||
struct _xmlShellCtxt {
|
||||
char *filename;
|
||||
xmlDocPtr doc;
|
||||
xmlNodePtr node;
|
||||
xmlXPathContextPtr pctxt;
|
||||
int loaded;
|
||||
FILE *output;
|
||||
xmlShellReadlineFunc input;
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlShellCmd:
|
||||
* @ctxt: a shell context
|
||||
* @arg: a string argument
|
||||
* @node: a first node
|
||||
* @node2: a second node
|
||||
*
|
||||
* This is a generic signature for the XML shell functions.
|
||||
*
|
||||
* Returns an int, negative returns indicating errors.
|
||||
*/
|
||||
typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlShellPrintXPathError (int errorType,
|
||||
const char *arg);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlShellPrintXPathResult(xmlXPathObjectPtr list);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellList (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellBase (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellDir (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellLoad (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlShellPrintNode (xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellCat (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellWrite (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellSave (xmlShellCtxtPtr ctxt,
|
||||
char *filename,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellValidate (xmlShellCtxtPtr ctxt,
|
||||
char *dtd,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellDu (xmlShellCtxtPtr ctxt,
|
||||
char *arg,
|
||||
xmlNodePtr tree,
|
||||
xmlNodePtr node2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlShellPwd (xmlShellCtxtPtr ctxt,
|
||||
char *buffer,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr node2);
|
||||
|
||||
/*
|
||||
* The Shell interface.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlShell (xmlDocPtr doc,
|
||||
char *filename,
|
||||
xmlShellReadlineFunc input,
|
||||
FILE *output);
|
||||
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_DEBUG_ENABLED */
|
||||
#endif /* __DEBUG_XML__ */
|
||||
80
cache/include/libxml/dict.h
vendored
80
cache/include/libxml/dict.h
vendored
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Summary: string dictionnary
|
||||
* Description: dictionary of reusable strings, just used to avoid allocation
|
||||
* and freeing operations.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_DICT_H__
|
||||
#define __XML_DICT_H__
|
||||
|
||||
#include <limits.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The dictionnary.
|
||||
*/
|
||||
typedef struct _xmlDict xmlDict;
|
||||
typedef xmlDict *xmlDictPtr;
|
||||
|
||||
/*
|
||||
* Initializer
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlInitializeDict(void);
|
||||
|
||||
/*
|
||||
* Constructor and destructor.
|
||||
*/
|
||||
XMLPUBFUN xmlDictPtr XMLCALL
|
||||
xmlDictCreate (void);
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
xmlDictSetLimit (xmlDictPtr dict,
|
||||
size_t limit);
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
xmlDictGetUsage (xmlDictPtr dict);
|
||||
XMLPUBFUN xmlDictPtr XMLCALL
|
||||
xmlDictCreateSub(xmlDictPtr sub);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDictReference(xmlDictPtr dict);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDictFree (xmlDictPtr dict);
|
||||
|
||||
/*
|
||||
* Lookup of entry in the dictionnary.
|
||||
*/
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlDictLookup (xmlDictPtr dict,
|
||||
const xmlChar *name,
|
||||
int len);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlDictExists (xmlDictPtr dict,
|
||||
const xmlChar *name,
|
||||
int len);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlDictQLookup (xmlDictPtr dict,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDictOwns (xmlDictPtr dict,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDictSize (xmlDictPtr dict);
|
||||
|
||||
/*
|
||||
* Cleanup function
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDictCleanup (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* ! __XML_DICT_H__ */
|
||||
240
cache/include/libxml/encoding.h
vendored
240
cache/include/libxml/encoding.h
vendored
@@ -1,240 +0,0 @@
|
||||
/*
|
||||
* Summary: interface for the encoding conversion functions
|
||||
* Description: interface for the encoding conversion functions needed for
|
||||
* XML basic encoding and iconv() support.
|
||||
*
|
||||
* Related specs are
|
||||
* rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
|
||||
* [ISO-10646] UTF-8 and UTF-16 in Annexes
|
||||
* [ISO-8859-1] ISO Latin-1 characters codes.
|
||||
* [UNICODE] The Unicode Consortium, "The Unicode Standard --
|
||||
* Worldwide Character Encoding -- Version 1.0", Addison-
|
||||
* Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
|
||||
* described in Unicode Technical Report #4.
|
||||
* [US-ASCII] Coded Character Set--7-bit American Standard Code for
|
||||
* Information Interchange, ANSI X3.4-1986.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_CHAR_ENCODING_H__
|
||||
#define __XML_CHAR_ENCODING_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_ICONV_ENABLED
|
||||
#include <iconv.h>
|
||||
#endif
|
||||
#ifdef LIBXML_ICU_ENABLED
|
||||
#include <unicode/ucnv.h>
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* xmlCharEncoding:
|
||||
*
|
||||
* Predefined values for some standard encodings.
|
||||
* Libxml does not do beforehand translation on UTF8 and ISOLatinX.
|
||||
* It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
|
||||
*
|
||||
* Anything else would have to be translated to UTF8 before being
|
||||
* given to the parser itself. The BOM for UTF16 and the encoding
|
||||
* declaration are looked at and a converter is looked for at that
|
||||
* point. If not found the parser stops here as asked by the XML REC. A
|
||||
* converter can be registered by the user using xmlRegisterCharEncodingHandler
|
||||
* but the current form doesn't allow stateful transcoding (a serious
|
||||
* problem agreed !). If iconv has been found it will be used
|
||||
* automatically and allow stateful transcoding, the simplest is then
|
||||
* to be sure to enable iconv and to provide iconv libs for the encoding
|
||||
* support needed.
|
||||
*
|
||||
* Note that the generic "UTF-16" is not a predefined value. Instead, only
|
||||
* the specific UTF-16LE and UTF-16BE are present.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
|
||||
XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
|
||||
XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
|
||||
XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
|
||||
XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
|
||||
XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
|
||||
XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
|
||||
XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
|
||||
XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
|
||||
XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
|
||||
XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
|
||||
XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
|
||||
XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
|
||||
XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
|
||||
XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
|
||||
XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
|
||||
XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
|
||||
XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
|
||||
XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
|
||||
XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
|
||||
XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
|
||||
XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
|
||||
XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
|
||||
XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
|
||||
} xmlCharEncoding;
|
||||
|
||||
/**
|
||||
* xmlCharEncodingInputFunc:
|
||||
* @out: a pointer to an array of bytes to store the UTF-8 result
|
||||
* @outlen: the length of @out
|
||||
* @in: a pointer to an array of chars in the original encoding
|
||||
* @inlen: the length of @in
|
||||
*
|
||||
* Take a block of chars in the original encoding and try to convert
|
||||
* it to an UTF-8 block of chars out.
|
||||
*
|
||||
* Returns the number of bytes written, -1 if lack of space, or -2
|
||||
* if the transcoding failed.
|
||||
* The value of @inlen after return is the number of octets consumed
|
||||
* if the return value is positive, else unpredictiable.
|
||||
* The value of @outlen after return is the number of octets consumed.
|
||||
*/
|
||||
typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
|
||||
const unsigned char *in, int *inlen);
|
||||
|
||||
|
||||
/**
|
||||
* xmlCharEncodingOutputFunc:
|
||||
* @out: a pointer to an array of bytes to store the result
|
||||
* @outlen: the length of @out
|
||||
* @in: a pointer to an array of UTF-8 chars
|
||||
* @inlen: the length of @in
|
||||
*
|
||||
* Take a block of UTF-8 chars in and try to convert it to another
|
||||
* encoding.
|
||||
* Note: a first call designed to produce heading info is called with
|
||||
* in = NULL. If stateful this should also initialize the encoder state.
|
||||
*
|
||||
* Returns the number of bytes written, -1 if lack of space, or -2
|
||||
* if the transcoding failed.
|
||||
* The value of @inlen after return is the number of octets consumed
|
||||
* if the return value is positive, else unpredictiable.
|
||||
* The value of @outlen after return is the number of octets produced.
|
||||
*/
|
||||
typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
|
||||
const unsigned char *in, int *inlen);
|
||||
|
||||
|
||||
/*
|
||||
* Block defining the handlers for non UTF-8 encodings.
|
||||
* If iconv is supported, there are two extra fields.
|
||||
*/
|
||||
#ifdef LIBXML_ICU_ENABLED
|
||||
struct _uconv_t {
|
||||
UConverter *uconv; /* for conversion between an encoding and UTF-16 */
|
||||
UConverter *utf8; /* for conversion between UTF-8 and UTF-16 */
|
||||
};
|
||||
typedef struct _uconv_t uconv_t;
|
||||
#endif
|
||||
|
||||
typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
|
||||
typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
|
||||
struct _xmlCharEncodingHandler {
|
||||
char *name;
|
||||
xmlCharEncodingInputFunc input;
|
||||
xmlCharEncodingOutputFunc output;
|
||||
#ifdef LIBXML_ICONV_ENABLED
|
||||
iconv_t iconv_in;
|
||||
iconv_t iconv_out;
|
||||
#endif /* LIBXML_ICONV_ENABLED */
|
||||
#ifdef LIBXML_ICU_ENABLED
|
||||
uconv_t *uconv_in;
|
||||
uconv_t *uconv_out;
|
||||
#endif /* LIBXML_ICU_ENABLED */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include <libxml/tree.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Interfaces for encoding handlers.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlInitCharEncodingHandlers (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupCharEncodingHandlers (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
|
||||
xmlGetCharEncodingHandler (xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
|
||||
xmlFindCharEncodingHandler (const char *name);
|
||||
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
|
||||
xmlNewCharEncodingHandler (const char *name,
|
||||
xmlCharEncodingInputFunc input,
|
||||
xmlCharEncodingOutputFunc output);
|
||||
|
||||
/*
|
||||
* Interfaces for encoding names and aliases.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlAddEncodingAlias (const char *name,
|
||||
const char *alias);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlDelEncodingAlias (const char *alias);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlGetEncodingAlias (const char *alias);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupEncodingAliases (void);
|
||||
XMLPUBFUN xmlCharEncoding XMLCALL
|
||||
xmlParseCharEncoding (const char *name);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlGetCharEncodingName (xmlCharEncoding enc);
|
||||
|
||||
/*
|
||||
* Interfaces directly used by the parsers.
|
||||
*/
|
||||
XMLPUBFUN xmlCharEncoding XMLCALL
|
||||
xmlDetectCharEncoding (const unsigned char *in,
|
||||
int len);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
|
||||
xmlBufferPtr out,
|
||||
xmlBufferPtr in);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCharEncInFunc (xmlCharEncodingHandler *handler,
|
||||
xmlBufferPtr out,
|
||||
xmlBufferPtr in);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
|
||||
xmlBufferPtr out,
|
||||
xmlBufferPtr in);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
|
||||
|
||||
/*
|
||||
* Export a few useful functions
|
||||
*/
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
UTF8Toisolat1 (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
isolat1ToUTF8 (unsigned char *out,
|
||||
int *outlen,
|
||||
const unsigned char *in,
|
||||
int *inlen);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XML_CHAR_ENCODING_H__ */
|
||||
151
cache/include/libxml/entities.h
vendored
151
cache/include/libxml/entities.h
vendored
@@ -1,151 +0,0 @@
|
||||
/*
|
||||
* Summary: interface for the XML entities handling
|
||||
* Description: this module provides some of the entity API needed
|
||||
* for the parser and applications.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_ENTITIES_H__
|
||||
#define __XML_ENTITIES_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The different valid entity types.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_INTERNAL_GENERAL_ENTITY = 1,
|
||||
XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
|
||||
XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
|
||||
XML_INTERNAL_PARAMETER_ENTITY = 4,
|
||||
XML_EXTERNAL_PARAMETER_ENTITY = 5,
|
||||
XML_INTERNAL_PREDEFINED_ENTITY = 6
|
||||
} xmlEntityType;
|
||||
|
||||
/*
|
||||
* An unit of storage for an entity, contains the string, the value
|
||||
* and the linkind data needed for the linking in the hash table.
|
||||
*/
|
||||
|
||||
struct _xmlEntity {
|
||||
void *_private; /* application data */
|
||||
xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
|
||||
const xmlChar *name; /* Entity name */
|
||||
struct _xmlNode *children; /* First child link */
|
||||
struct _xmlNode *last; /* Last child link */
|
||||
struct _xmlDtd *parent; /* -> DTD */
|
||||
struct _xmlNode *next; /* next sibling link */
|
||||
struct _xmlNode *prev; /* previous sibling link */
|
||||
struct _xmlDoc *doc; /* the containing document */
|
||||
|
||||
xmlChar *orig; /* content without ref substitution */
|
||||
xmlChar *content; /* content or ndata if unparsed */
|
||||
int length; /* the content length */
|
||||
xmlEntityType etype; /* The entity type */
|
||||
const xmlChar *ExternalID; /* External identifier for PUBLIC */
|
||||
const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
|
||||
|
||||
struct _xmlEntity *nexte; /* unused */
|
||||
const xmlChar *URI; /* the full URI as computed */
|
||||
int owner; /* does the entity own the childrens */
|
||||
int checked; /* was the entity content checked */
|
||||
/* this is also used to count entities
|
||||
* references done from that entity
|
||||
* and if it contains '<' */
|
||||
};
|
||||
|
||||
/*
|
||||
* All entities are stored in an hash table.
|
||||
* There is 2 separate hash tables for global and parameter entities.
|
||||
*/
|
||||
|
||||
typedef struct _xmlHashTable xmlEntitiesTable;
|
||||
typedef xmlEntitiesTable *xmlEntitiesTablePtr;
|
||||
|
||||
/*
|
||||
* External functions:
|
||||
*/
|
||||
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlInitializePredefinedEntities (void);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlNewEntity (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlAddDocEntity (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlAddDtdEntity (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
int type,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID,
|
||||
const xmlChar *content);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlGetPredefinedEntity (const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlGetDocEntity (const xmlDoc *doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlGetDtdEntity (xmlDocPtr doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlGetParameterEntity (xmlDocPtr doc,
|
||||
const xmlChar *name);
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlEncodeEntities (xmlDocPtr doc,
|
||||
const xmlChar *input);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlEncodeEntitiesReentrant(xmlDocPtr doc,
|
||||
const xmlChar *input);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlEncodeSpecialChars (const xmlDoc *doc,
|
||||
const xmlChar *input);
|
||||
XMLPUBFUN xmlEntitiesTablePtr XMLCALL
|
||||
xmlCreateEntitiesTable (void);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlEntitiesTablePtr XMLCALL
|
||||
xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpEntitiesTable (xmlBufferPtr buf,
|
||||
xmlEntitiesTablePtr table);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpEntityDecl (xmlBufferPtr buf,
|
||||
xmlEntityPtr ent);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupPredefinedEntities(void);
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
# endif /* __XML_ENTITIES_H__ */
|
||||
509
cache/include/libxml/globals.h
vendored
509
cache/include/libxml/globals.h
vendored
@@ -1,509 +0,0 @@
|
||||
/*
|
||||
* Summary: interface for all global variables of the library
|
||||
* Description: all the global variables and thread handling for
|
||||
* those variables is handled by this module.
|
||||
*
|
||||
* The bottom of this file is automatically generated by build_glob.py
|
||||
* based on the description file global.data
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Gary Pennington <Gary.Pennington@uk.sun.com>, Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_GLOBALS_H
|
||||
#define __XML_GLOBALS_H
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/SAX.h>
|
||||
#include <libxml/SAX2.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
XMLPUBFUN void XMLCALL xmlInitGlobals(void);
|
||||
XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
|
||||
|
||||
/**
|
||||
* xmlParserInputBufferCreateFilenameFunc:
|
||||
* @URI: the URI to read from
|
||||
* @enc: the requested source encoding
|
||||
*
|
||||
* Signature for the function doing the lookup for a suitable input method
|
||||
* corresponding to an URI.
|
||||
*
|
||||
* Returns the new xmlParserInputBufferPtr in case of success or NULL if no
|
||||
* method was found.
|
||||
*/
|
||||
typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI,
|
||||
xmlCharEncoding enc);
|
||||
|
||||
|
||||
/**
|
||||
* xmlOutputBufferCreateFilenameFunc:
|
||||
* @URI: the URI to write to
|
||||
* @enc: the requested target encoding
|
||||
*
|
||||
* Signature for the function doing the lookup for a suitable output method
|
||||
* corresponding to an URI.
|
||||
*
|
||||
* Returns the new xmlOutputBufferPtr in case of success or NULL if no
|
||||
* method was found.
|
||||
*/
|
||||
typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI,
|
||||
xmlCharEncodingHandlerPtr encoder,
|
||||
int compression);
|
||||
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
|
||||
XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
|
||||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
|
||||
XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
|
||||
|
||||
/*
|
||||
* Externally global symbols which need to be protected for backwards
|
||||
* compatibility support.
|
||||
*/
|
||||
|
||||
#undef docbDefaultSAXHandler
|
||||
#undef htmlDefaultSAXHandler
|
||||
#undef oldXMLWDcompatibility
|
||||
#undef xmlBufferAllocScheme
|
||||
#undef xmlDefaultBufferSize
|
||||
#undef xmlDefaultSAXHandler
|
||||
#undef xmlDefaultSAXLocator
|
||||
#undef xmlDoValidityCheckingDefaultValue
|
||||
#undef xmlFree
|
||||
#undef xmlGenericError
|
||||
#undef xmlStructuredError
|
||||
#undef xmlGenericErrorContext
|
||||
#undef xmlStructuredErrorContext
|
||||
#undef xmlGetWarningsDefaultValue
|
||||
#undef xmlIndentTreeOutput
|
||||
#undef xmlTreeIndentString
|
||||
#undef xmlKeepBlanksDefaultValue
|
||||
#undef xmlLineNumbersDefaultValue
|
||||
#undef xmlLoadExtDtdDefaultValue
|
||||
#undef xmlMalloc
|
||||
#undef xmlMallocAtomic
|
||||
#undef xmlMemStrdup
|
||||
#undef xmlParserDebugEntities
|
||||
#undef xmlParserVersion
|
||||
#undef xmlPedanticParserDefaultValue
|
||||
#undef xmlRealloc
|
||||
#undef xmlSaveNoEmptyTags
|
||||
#undef xmlSubstituteEntitiesDefaultValue
|
||||
#undef xmlRegisterNodeDefaultValue
|
||||
#undef xmlDeregisterNodeDefaultValue
|
||||
#undef xmlLastError
|
||||
#undef xmlParserInputBufferCreateFilenameValue
|
||||
#undef xmlOutputBufferCreateFilenameValue
|
||||
|
||||
/**
|
||||
* xmlRegisterNodeFunc:
|
||||
* @node: the current node
|
||||
*
|
||||
* Signature for the registration callback of a created node
|
||||
*/
|
||||
typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
|
||||
/**
|
||||
* xmlDeregisterNodeFunc:
|
||||
* @node: the current node
|
||||
*
|
||||
* Signature for the deregistration callback of a discarded node
|
||||
*/
|
||||
typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
|
||||
|
||||
typedef struct _xmlGlobalState xmlGlobalState;
|
||||
typedef xmlGlobalState *xmlGlobalStatePtr;
|
||||
struct _xmlGlobalState
|
||||
{
|
||||
const char *xmlParserVersion;
|
||||
|
||||
xmlSAXLocator xmlDefaultSAXLocator;
|
||||
xmlSAXHandlerV1 xmlDefaultSAXHandler;
|
||||
xmlSAXHandlerV1 docbDefaultSAXHandler;
|
||||
xmlSAXHandlerV1 htmlDefaultSAXHandler;
|
||||
|
||||
xmlFreeFunc xmlFree;
|
||||
xmlMallocFunc xmlMalloc;
|
||||
xmlStrdupFunc xmlMemStrdup;
|
||||
xmlReallocFunc xmlRealloc;
|
||||
|
||||
xmlGenericErrorFunc xmlGenericError;
|
||||
xmlStructuredErrorFunc xmlStructuredError;
|
||||
void *xmlGenericErrorContext;
|
||||
|
||||
int oldXMLWDcompatibility;
|
||||
|
||||
xmlBufferAllocationScheme xmlBufferAllocScheme;
|
||||
int xmlDefaultBufferSize;
|
||||
|
||||
int xmlSubstituteEntitiesDefaultValue;
|
||||
int xmlDoValidityCheckingDefaultValue;
|
||||
int xmlGetWarningsDefaultValue;
|
||||
int xmlKeepBlanksDefaultValue;
|
||||
int xmlLineNumbersDefaultValue;
|
||||
int xmlLoadExtDtdDefaultValue;
|
||||
int xmlParserDebugEntities;
|
||||
int xmlPedanticParserDefaultValue;
|
||||
|
||||
int xmlSaveNoEmptyTags;
|
||||
int xmlIndentTreeOutput;
|
||||
const char *xmlTreeIndentString;
|
||||
|
||||
xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
|
||||
xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
|
||||
|
||||
xmlMallocFunc xmlMallocAtomic;
|
||||
xmlError xmlLastError;
|
||||
|
||||
xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
|
||||
xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
|
||||
|
||||
void *xmlStructuredErrorContext;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include <libxml/threads.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs);
|
||||
|
||||
XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
|
||||
|
||||
XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);
|
||||
|
||||
XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
|
||||
XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
|
||||
XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
|
||||
XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
|
||||
xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
|
||||
xmlThrDefParserInputBufferCreateFilenameDefault(
|
||||
xmlParserInputBufferCreateFilenameFunc func);
|
||||
|
||||
/** DOC_DISABLE */
|
||||
/*
|
||||
* In general the memory allocation entry points are not kept
|
||||
* thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
|
||||
* - xmlMalloc
|
||||
* - xmlMallocAtomic
|
||||
* - xmlRealloc
|
||||
* - xmlMemStrdup
|
||||
* - xmlFree
|
||||
*/
|
||||
|
||||
#ifdef LIBXML_THREAD_ALLOC_ENABLED
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void);
|
||||
#define xmlMalloc \
|
||||
(*(__xmlMalloc()))
|
||||
#else
|
||||
XMLPUBVAR xmlMallocFunc xmlMalloc;
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void);
|
||||
#define xmlMallocAtomic \
|
||||
(*(__xmlMallocAtomic()))
|
||||
#else
|
||||
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void);
|
||||
#define xmlRealloc \
|
||||
(*(__xmlRealloc()))
|
||||
#else
|
||||
XMLPUBVAR xmlReallocFunc xmlRealloc;
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void);
|
||||
#define xmlFree \
|
||||
(*(__xmlFree()))
|
||||
#else
|
||||
XMLPUBVAR xmlFreeFunc xmlFree;
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void);
|
||||
#define xmlMemStrdup \
|
||||
(*(__xmlMemStrdup()))
|
||||
#else
|
||||
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
|
||||
#endif
|
||||
|
||||
#else /* !LIBXML_THREAD_ALLOC_ENABLED */
|
||||
XMLPUBVAR xmlMallocFunc xmlMalloc;
|
||||
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
|
||||
XMLPUBVAR xmlReallocFunc xmlRealloc;
|
||||
XMLPUBVAR xmlFreeFunc xmlFree;
|
||||
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
|
||||
#endif /* LIBXML_THREAD_ALLOC_ENABLED */
|
||||
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define docbDefaultSAXHandler \
|
||||
(*(__docbDefaultSAXHandler()))
|
||||
#else
|
||||
XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define htmlDefaultSAXHandler \
|
||||
(*(__htmlDefaultSAXHandler()))
|
||||
#else
|
||||
XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlError * XMLCALL __xmlLastError(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlLastError \
|
||||
(*(__xmlLastError()))
|
||||
#else
|
||||
XMLPUBVAR xmlError xmlLastError;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Everything starting from the line below is
|
||||
* Automatically generated by build_glob.py.
|
||||
* Do not modify the previous line.
|
||||
*/
|
||||
|
||||
|
||||
XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define oldXMLWDcompatibility \
|
||||
(*(__oldXMLWDcompatibility()))
|
||||
#else
|
||||
XMLPUBVAR int oldXMLWDcompatibility;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlBufferAllocScheme \
|
||||
(*(__xmlBufferAllocScheme()))
|
||||
#else
|
||||
XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
|
||||
#endif
|
||||
XMLPUBFUN xmlBufferAllocationScheme XMLCALL
|
||||
xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlDefaultBufferSize \
|
||||
(*(__xmlDefaultBufferSize()))
|
||||
#else
|
||||
XMLPUBVAR int xmlDefaultBufferSize;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v);
|
||||
|
||||
XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlDefaultSAXHandler \
|
||||
(*(__xmlDefaultSAXHandler()))
|
||||
#else
|
||||
XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlDefaultSAXLocator \
|
||||
(*(__xmlDefaultSAXLocator()))
|
||||
#else
|
||||
XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlDoValidityCheckingDefaultValue \
|
||||
(*(__xmlDoValidityCheckingDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlDoValidityCheckingDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlGenericError \
|
||||
(*(__xmlGenericError()))
|
||||
#else
|
||||
XMLPUBVAR xmlGenericErrorFunc xmlGenericError;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlStructuredError \
|
||||
(*(__xmlStructuredError()))
|
||||
#else
|
||||
XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlGenericErrorContext \
|
||||
(*(__xmlGenericErrorContext()))
|
||||
#else
|
||||
XMLPUBVAR void * xmlGenericErrorContext;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlStructuredErrorContext \
|
||||
(*(__xmlStructuredErrorContext()))
|
||||
#else
|
||||
XMLPUBVAR void * xmlStructuredErrorContext;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlGetWarningsDefaultValue \
|
||||
(*(__xmlGetWarningsDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlGetWarningsDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlIndentTreeOutput \
|
||||
(*(__xmlIndentTreeOutput()))
|
||||
#else
|
||||
XMLPUBVAR int xmlIndentTreeOutput;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v);
|
||||
|
||||
XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlTreeIndentString \
|
||||
(*(__xmlTreeIndentString()))
|
||||
#else
|
||||
XMLPUBVAR const char * xmlTreeIndentString;
|
||||
#endif
|
||||
XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlKeepBlanksDefaultValue \
|
||||
(*(__xmlKeepBlanksDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlKeepBlanksDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlLineNumbersDefaultValue \
|
||||
(*(__xmlLineNumbersDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlLineNumbersDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlLoadExtDtdDefaultValue \
|
||||
(*(__xmlLoadExtDtdDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlLoadExtDtdDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlParserDebugEntities \
|
||||
(*(__xmlParserDebugEntities()))
|
||||
#else
|
||||
XMLPUBVAR int xmlParserDebugEntities;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v);
|
||||
|
||||
XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlParserVersion \
|
||||
(*(__xmlParserVersion()))
|
||||
#else
|
||||
XMLPUBVAR const char * xmlParserVersion;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlPedanticParserDefaultValue \
|
||||
(*(__xmlPedanticParserDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlPedanticParserDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlSaveNoEmptyTags \
|
||||
(*(__xmlSaveNoEmptyTags()))
|
||||
#else
|
||||
XMLPUBVAR int xmlSaveNoEmptyTags;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v);
|
||||
|
||||
XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlSubstituteEntitiesDefaultValue \
|
||||
(*(__xmlSubstituteEntitiesDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR int xmlSubstituteEntitiesDefaultValue;
|
||||
#endif
|
||||
XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v);
|
||||
|
||||
XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlRegisterNodeDefaultValue \
|
||||
(*(__xmlRegisterNodeDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlDeregisterNodeDefaultValue \
|
||||
(*(__xmlDeregisterNodeDefaultValue()))
|
||||
#else
|
||||
XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL \
|
||||
__xmlParserInputBufferCreateFilenameValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlParserInputBufferCreateFilenameValue \
|
||||
(*(__xmlParserInputBufferCreateFilenameValue()))
|
||||
#else
|
||||
XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlOutputBufferCreateFilenameValue \
|
||||
(*(__xmlOutputBufferCreateFilenameValue()))
|
||||
#else
|
||||
XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XML_GLOBALS_H */
|
||||
233
cache/include/libxml/hash.h
vendored
233
cache/include/libxml/hash.h
vendored
@@ -1,233 +0,0 @@
|
||||
/*
|
||||
* Summary: Chained hash tables
|
||||
* Description: This module implements the hash table support used in
|
||||
* various places in the library.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Bjorn Reese <bjorn.reese@systematic.dk>
|
||||
*/
|
||||
|
||||
#ifndef __XML_HASH_H__
|
||||
#define __XML_HASH_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The hash table.
|
||||
*/
|
||||
typedef struct _xmlHashTable xmlHashTable;
|
||||
typedef xmlHashTable *xmlHashTablePtr;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/dict.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Recent version of gcc produce a warning when a function pointer is assigned
|
||||
* to an object pointer, or vice versa. The following macro is a dirty hack
|
||||
* to allow suppression of the warning. If your architecture has function
|
||||
* pointers which are a different size than a void pointer, there may be some
|
||||
* serious trouble within the library.
|
||||
*/
|
||||
/**
|
||||
* XML_CAST_FPTR:
|
||||
* @fptr: pointer to a function
|
||||
*
|
||||
* Macro to do a casting from an object pointer to a
|
||||
* function pointer without encountering a warning from
|
||||
* gcc
|
||||
*
|
||||
* #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
|
||||
* This macro violated ISO C aliasing rules (gcc4 on s390 broke)
|
||||
* so it is disabled now
|
||||
*/
|
||||
|
||||
#define XML_CAST_FPTR(fptr) fptr
|
||||
|
||||
|
||||
/*
|
||||
* function types:
|
||||
*/
|
||||
/**
|
||||
* xmlHashDeallocator:
|
||||
* @payload: the data in the hash
|
||||
* @name: the name associated
|
||||
*
|
||||
* Callback to free data from a hash.
|
||||
*/
|
||||
typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name);
|
||||
/**
|
||||
* xmlHashCopier:
|
||||
* @payload: the data in the hash
|
||||
* @name: the name associated
|
||||
*
|
||||
* Callback to copy data from a hash.
|
||||
*
|
||||
* Returns a copy of the data or NULL in case of error.
|
||||
*/
|
||||
typedef void *(*xmlHashCopier)(void *payload, xmlChar *name);
|
||||
/**
|
||||
* xmlHashScanner:
|
||||
* @payload: the data in the hash
|
||||
* @data: extra scannner data
|
||||
* @name: the name associated
|
||||
*
|
||||
* Callback when scanning data in a hash with the simple scanner.
|
||||
*/
|
||||
typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name);
|
||||
/**
|
||||
* xmlHashScannerFull:
|
||||
* @payload: the data in the hash
|
||||
* @data: extra scannner data
|
||||
* @name: the name associated
|
||||
* @name2: the second name associated
|
||||
* @name3: the third name associated
|
||||
*
|
||||
* Callback when scanning data in a hash with the full scanner.
|
||||
*/
|
||||
typedef void (*xmlHashScannerFull)(void *payload, void *data,
|
||||
const xmlChar *name, const xmlChar *name2,
|
||||
const xmlChar *name3);
|
||||
|
||||
/*
|
||||
* Constructor and destructor.
|
||||
*/
|
||||
XMLPUBFUN xmlHashTablePtr XMLCALL
|
||||
xmlHashCreate (int size);
|
||||
XMLPUBFUN xmlHashTablePtr XMLCALL
|
||||
xmlHashCreateDict(int size,
|
||||
xmlDictPtr dict);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashFree (xmlHashTablePtr table,
|
||||
xmlHashDeallocator f);
|
||||
|
||||
/*
|
||||
* Add a new entry to the hash table.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashAddEntry (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
void *userdata);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashUpdateEntry(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
void *userdata,
|
||||
xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashAddEntry2(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
void *userdata);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashUpdateEntry2(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
void *userdata,
|
||||
xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashAddEntry3(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
void *userdata);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashUpdateEntry3(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
void *userdata,
|
||||
xmlHashDeallocator f);
|
||||
|
||||
/*
|
||||
* Remove an entry from the hash table.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
|
||||
xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
|
||||
const xmlChar *name2, xmlHashDeallocator f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
|
||||
const xmlChar *name2, const xmlChar *name3,
|
||||
xmlHashDeallocator f);
|
||||
|
||||
/*
|
||||
* Retrieve the userdata.
|
||||
*/
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashLookup (xmlHashTablePtr table,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashLookup2 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashLookup3 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashQLookup (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashQLookup2 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *prefix2);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlHashQLookup3 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *prefix2,
|
||||
const xmlChar *name3,
|
||||
const xmlChar *prefix3);
|
||||
|
||||
/*
|
||||
* Helpers.
|
||||
*/
|
||||
XMLPUBFUN xmlHashTablePtr XMLCALL
|
||||
xmlHashCopy (xmlHashTablePtr table,
|
||||
xmlHashCopier f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlHashSize (xmlHashTablePtr table);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScan (xmlHashTablePtr table,
|
||||
xmlHashScanner f,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScan3 (xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
xmlHashScanner f,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScanFull (xmlHashTablePtr table,
|
||||
xmlHashScannerFull f,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHashScanFull3(xmlHashTablePtr table,
|
||||
const xmlChar *name,
|
||||
const xmlChar *name2,
|
||||
const xmlChar *name3,
|
||||
xmlHashScannerFull f,
|
||||
void *data);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* ! __XML_HASH_H__ */
|
||||
137
cache/include/libxml/list.h
vendored
137
cache/include/libxml/list.h
vendored
@@ -1,137 +0,0 @@
|
||||
/*
|
||||
* Summary: lists interfaces
|
||||
* Description: this module implement the list support used in
|
||||
* various place in the library.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Gary Pennington <Gary.Pennington@uk.sun.com>
|
||||
*/
|
||||
|
||||
#ifndef __XML_LINK_INCLUDE__
|
||||
#define __XML_LINK_INCLUDE__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _xmlLink xmlLink;
|
||||
typedef xmlLink *xmlLinkPtr;
|
||||
|
||||
typedef struct _xmlList xmlList;
|
||||
typedef xmlList *xmlListPtr;
|
||||
|
||||
/**
|
||||
* xmlListDeallocator:
|
||||
* @lk: the data to deallocate
|
||||
*
|
||||
* Callback function used to free data from a list.
|
||||
*/
|
||||
typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
|
||||
/**
|
||||
* xmlListDataCompare:
|
||||
* @data0: the first data
|
||||
* @data1: the second data
|
||||
*
|
||||
* Callback function used to compare 2 data.
|
||||
*
|
||||
* Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
|
||||
*/
|
||||
typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
|
||||
/**
|
||||
* xmlListWalker:
|
||||
* @data: the data found in the list
|
||||
* @user: extra user provided data to the walker
|
||||
*
|
||||
* Callback function used when walking a list with xmlListWalk().
|
||||
*
|
||||
* Returns 0 to stop walking the list, 1 otherwise.
|
||||
*/
|
||||
typedef int (*xmlListWalker) (const void *data, const void *user);
|
||||
|
||||
/* Creation/Deletion */
|
||||
XMLPUBFUN xmlListPtr XMLCALL
|
||||
xmlListCreate (xmlListDeallocator deallocator,
|
||||
xmlListDataCompare compare);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListDelete (xmlListPtr l);
|
||||
|
||||
/* Basic Operators */
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlListSearch (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlListReverseSearch (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListInsert (xmlListPtr l,
|
||||
void *data) ;
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListAppend (xmlListPtr l,
|
||||
void *data) ;
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListRemoveFirst (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListRemoveLast (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListRemoveAll (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListClear (xmlListPtr l);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListEmpty (xmlListPtr l);
|
||||
XMLPUBFUN xmlLinkPtr XMLCALL
|
||||
xmlListFront (xmlListPtr l);
|
||||
XMLPUBFUN xmlLinkPtr XMLCALL
|
||||
xmlListEnd (xmlListPtr l);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListSize (xmlListPtr l);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListPopFront (xmlListPtr l);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListPopBack (xmlListPtr l);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListPushFront (xmlListPtr l,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListPushBack (xmlListPtr l,
|
||||
void *data);
|
||||
|
||||
/* Advanced Operators */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListReverse (xmlListPtr l);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListSort (xmlListPtr l);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListWalk (xmlListPtr l,
|
||||
xmlListWalker walker,
|
||||
const void *user);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListReverseWalk (xmlListPtr l,
|
||||
xmlListWalker walker,
|
||||
const void *user);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlListMerge (xmlListPtr l1,
|
||||
xmlListPtr l2);
|
||||
XMLPUBFUN xmlListPtr XMLCALL
|
||||
xmlListDup (const xmlListPtr old);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlListCopy (xmlListPtr cur,
|
||||
const xmlListPtr old);
|
||||
/* Link operators */
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlLinkGetData (xmlLinkPtr lk);
|
||||
|
||||
/* xmlListUnique() */
|
||||
/* xmlListSwap */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XML_LINK_INCLUDE__ */
|
||||
163
cache/include/libxml/nanoftp.h
vendored
163
cache/include/libxml/nanoftp.h
vendored
@@ -1,163 +0,0 @@
|
||||
/*
|
||||
* Summary: minimal FTP implementation
|
||||
* Description: minimal FTP implementation allowing to fetch resources
|
||||
* like external subset.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __NANO_FTP_H__
|
||||
#define __NANO_FTP_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_FTP_ENABLED
|
||||
|
||||
/* Needed for portability to Windows 64 bits */
|
||||
#if defined(__MINGW32__) || defined(_WIN32_WCE)
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
/**
|
||||
* SOCKET:
|
||||
*
|
||||
* macro used to provide portability of code to windows sockets
|
||||
*/
|
||||
#define SOCKET int
|
||||
/**
|
||||
* INVALID_SOCKET:
|
||||
*
|
||||
* macro used to provide portability of code to windows sockets
|
||||
* the value to be used when the socket is not valid
|
||||
*/
|
||||
#undef INVALID_SOCKET
|
||||
#define INVALID_SOCKET (-1)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ftpListCallback:
|
||||
* @userData: user provided data for the callback
|
||||
* @filename: the file name (including "->" when links are shown)
|
||||
* @attrib: the attribute string
|
||||
* @owner: the owner string
|
||||
* @group: the group string
|
||||
* @size: the file size
|
||||
* @links: the link count
|
||||
* @year: the year
|
||||
* @month: the month
|
||||
* @day: the day
|
||||
* @hour: the hour
|
||||
* @minute: the minute
|
||||
*
|
||||
* A callback for the xmlNanoFTPList command.
|
||||
* Note that only one of year and day:minute are specified.
|
||||
*/
|
||||
typedef void (*ftpListCallback) (void *userData,
|
||||
const char *filename, const char *attrib,
|
||||
const char *owner, const char *group,
|
||||
unsigned long size, int links, int year,
|
||||
const char *month, int day, int hour,
|
||||
int minute);
|
||||
/**
|
||||
* ftpDataCallback:
|
||||
* @userData: the user provided context
|
||||
* @data: the data received
|
||||
* @len: its size in bytes
|
||||
*
|
||||
* A callback for the xmlNanoFTPGet command.
|
||||
*/
|
||||
typedef void (*ftpDataCallback) (void *userData,
|
||||
const char *data,
|
||||
int len);
|
||||
|
||||
/*
|
||||
* Init
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoFTPInit (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoFTPCleanup (void);
|
||||
|
||||
/*
|
||||
* Creating/freeing contexts.
|
||||
*/
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoFTPNewCtxt (const char *URL);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoFTPFreeCtxt (void * ctx);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoFTPConnectTo (const char *server,
|
||||
int port);
|
||||
/*
|
||||
* Opening/closing session connections.
|
||||
*/
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoFTPOpen (const char *URL);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPConnect (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPClose (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPQuit (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoFTPScanProxy (const char *URL);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoFTPProxy (const char *host,
|
||||
int port,
|
||||
const char *user,
|
||||
const char *passwd,
|
||||
int type);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPUpdateURL (void *ctx,
|
||||
const char *URL);
|
||||
|
||||
/*
|
||||
* Rather internal commands.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPGetResponse (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPCheckResponse (void *ctx);
|
||||
|
||||
/*
|
||||
* CD/DIR/GET handlers.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPCwd (void *ctx,
|
||||
const char *directory);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPDele (void *ctx,
|
||||
const char *file);
|
||||
|
||||
XMLPUBFUN SOCKET XMLCALL
|
||||
xmlNanoFTPGetConnection (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPCloseConnection(void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPList (void *ctx,
|
||||
ftpListCallback callback,
|
||||
void *userData,
|
||||
const char *filename);
|
||||
XMLPUBFUN SOCKET XMLCALL
|
||||
xmlNanoFTPGetSocket (void *ctx,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPGet (void *ctx,
|
||||
ftpDataCallback callback,
|
||||
void *userData,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoFTPRead (void *ctx,
|
||||
void *dest,
|
||||
int len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* LIBXML_FTP_ENABLED */
|
||||
#endif /* __NANO_FTP_H__ */
|
||||
81
cache/include/libxml/nanohttp.h
vendored
81
cache/include/libxml/nanohttp.h
vendored
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* Summary: minimal HTTP implementation
|
||||
* Description: minimal HTTP implementation allowing to fetch resources
|
||||
* like external subset.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __NANO_HTTP_H__
|
||||
#define __NANO_HTTP_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_HTTP_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoHTTPInit (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoHTTPCleanup (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoHTTPScanProxy (const char *URL);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoHTTPFetch (const char *URL,
|
||||
const char *filename,
|
||||
char **contentType);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoHTTPMethod (const char *URL,
|
||||
const char *method,
|
||||
const char *input,
|
||||
char **contentType,
|
||||
const char *headers,
|
||||
int ilen);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoHTTPMethodRedir (const char *URL,
|
||||
const char *method,
|
||||
const char *input,
|
||||
char **contentType,
|
||||
char **redir,
|
||||
const char *headers,
|
||||
int ilen);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoHTTPOpen (const char *URL,
|
||||
char **contentType);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlNanoHTTPOpenRedir (const char *URL,
|
||||
char **contentType,
|
||||
char **redir);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoHTTPReturnCode (void *ctx);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlNanoHTTPAuthHeader (void *ctx);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlNanoHTTPRedir (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoHTTPContentLength( void * ctx );
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlNanoHTTPEncoding (void *ctx);
|
||||
XMLPUBFUN const char * XMLCALL
|
||||
xmlNanoHTTPMimeType (void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoHTTPRead (void *ctx,
|
||||
void *dest,
|
||||
int len);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNanoHTTPSave (void *ctxt,
|
||||
const char *filename);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlNanoHTTPClose (void *ctx);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_HTTP_ENABLED */
|
||||
#endif /* __NANO_HTTP_H__ */
|
||||
1241
cache/include/libxml/parser.h
vendored
1241
cache/include/libxml/parser.h
vendored
File diff suppressed because it is too large
Load Diff
644
cache/include/libxml/parserInternals.h
vendored
644
cache/include/libxml/parserInternals.h
vendored
@@ -1,644 +0,0 @@
|
||||
/*
|
||||
* Summary: internals routines and limits exported by the parser.
|
||||
* Description: this module exports a number of internal parsing routines
|
||||
* they are not really all intended for applications but
|
||||
* can prove useful doing low level processing.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_PARSER_INTERNALS_H__
|
||||
#define __XML_PARSER_INTERNALS_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/HTMLparser.h>
|
||||
#include <libxml/chvalid.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlParserMaxDepth:
|
||||
*
|
||||
* arbitrary depth limit for the XML documents that we allow to
|
||||
* process. This is not a limitation of the parser but a safety
|
||||
* boundary feature, use XML_PARSE_HUGE option to override it.
|
||||
*/
|
||||
XMLPUBVAR unsigned int xmlParserMaxDepth;
|
||||
|
||||
/**
|
||||
* XML_MAX_TEXT_LENGTH:
|
||||
*
|
||||
* Maximum size allowed for a single text node when building a tree.
|
||||
* This is not a limitation of the parser but a safety boundary feature,
|
||||
* use XML_PARSE_HUGE option to override it.
|
||||
* Introduced in 2.9.0
|
||||
*/
|
||||
#define XML_MAX_TEXT_LENGTH 10000000
|
||||
|
||||
/**
|
||||
* XML_MAX_NAME_LENGTH:
|
||||
*
|
||||
* Maximum size allowed for a markup identitier
|
||||
* This is not a limitation of the parser but a safety boundary feature,
|
||||
* use XML_PARSE_HUGE option to override it.
|
||||
* Note that with the use of parsing dictionaries overriding the limit
|
||||
* may result in more runtime memory usage in face of "unfriendly' content
|
||||
* Introduced in 2.9.0
|
||||
*/
|
||||
#define XML_MAX_NAME_LENGTH 50000
|
||||
|
||||
/**
|
||||
* XML_MAX_DICTIONARY_LIMIT:
|
||||
*
|
||||
* Maximum size allowed by the parser for a dictionary by default
|
||||
* This is not a limitation of the parser but a safety boundary feature,
|
||||
* use XML_PARSE_HUGE option to override it.
|
||||
* Introduced in 2.9.0
|
||||
*/
|
||||
#define XML_MAX_DICTIONARY_LIMIT 10000000
|
||||
|
||||
/**
|
||||
* XML_MAX_LOOKUP_LIMIT:
|
||||
*
|
||||
* Maximum size allowed by the parser for ahead lookup
|
||||
* This is an upper boundary enforced by the parser to avoid bad
|
||||
* behaviour on "unfriendly' content
|
||||
* Introduced in 2.9.0
|
||||
*/
|
||||
#define XML_MAX_LOOKUP_LIMIT 10000000
|
||||
|
||||
/**
|
||||
* XML_MAX_NAMELEN:
|
||||
*
|
||||
* Identifiers can be longer, but this will be more costly
|
||||
* at runtime.
|
||||
*/
|
||||
#define XML_MAX_NAMELEN 100
|
||||
|
||||
/**
|
||||
* INPUT_CHUNK:
|
||||
*
|
||||
* The parser tries to always have that amount of input ready.
|
||||
* One of the point is providing context when reporting errors.
|
||||
*/
|
||||
#define INPUT_CHUNK 250
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* UNICODE version of the macros. *
|
||||
* *
|
||||
************************************************************************/
|
||||
/**
|
||||
* IS_BYTE_CHAR:
|
||||
* @c: an byte value (int)
|
||||
*
|
||||
* Macro to check the following production in the XML spec:
|
||||
*
|
||||
* [2] Char ::= #x9 | #xA | #xD | [#x20...]
|
||||
* any byte character in the accepted range
|
||||
*/
|
||||
#define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
|
||||
|
||||
/**
|
||||
* IS_CHAR:
|
||||
* @c: an UNICODE value (int)
|
||||
*
|
||||
* Macro to check the following production in the XML spec:
|
||||
*
|
||||
* [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
|
||||
* | [#x10000-#x10FFFF]
|
||||
* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
|
||||
*/
|
||||
#define IS_CHAR(c) xmlIsCharQ(c)
|
||||
|
||||
/**
|
||||
* IS_CHAR_CH:
|
||||
* @c: an xmlChar (usually an unsigned char)
|
||||
*
|
||||
* Behaves like IS_CHAR on single-byte value
|
||||
*/
|
||||
#define IS_CHAR_CH(c) xmlIsChar_ch(c)
|
||||
|
||||
/**
|
||||
* IS_BLANK:
|
||||
* @c: an UNICODE value (int)
|
||||
*
|
||||
* Macro to check the following production in the XML spec:
|
||||
*
|
||||
* [3] S ::= (#x20 | #x9 | #xD | #xA)+
|
||||
*/
|
||||
#define IS_BLANK(c) xmlIsBlankQ(c)
|
||||
|
||||
/**
|
||||
* IS_BLANK_CH:
|
||||
* @c: an xmlChar value (normally unsigned char)
|
||||
*
|
||||
* Behaviour same as IS_BLANK
|
||||
*/
|
||||
#define IS_BLANK_CH(c) xmlIsBlank_ch(c)
|
||||
|
||||
/**
|
||||
* IS_BASECHAR:
|
||||
* @c: an UNICODE value (int)
|
||||
*
|
||||
* Macro to check the following production in the XML spec:
|
||||
*
|
||||
* [85] BaseChar ::= ... long list see REC ...
|
||||
*/
|
||||
#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
|
||||
|
||||
/**
|
||||
* IS_DIGIT:
|
||||
* @c: an UNICODE value (int)
|
||||
*
|
||||
* Macro to check the following production in the XML spec:
|
||||
*
|
||||
* [88] Digit ::= ... long list see REC ...
|
||||
*/
|
||||
#define IS_DIGIT(c) xmlIsDigitQ(c)
|
||||
|
||||
/**
|
||||
* IS_DIGIT_CH:
|
||||
* @c: an xmlChar value (usually an unsigned char)
|
||||
*
|
||||
* Behaves like IS_DIGIT but with a single byte argument
|
||||
*/
|
||||
#define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
|
||||
|
||||
/**
|
||||
* IS_COMBINING:
|
||||
* @c: an UNICODE value (int)
|
||||
*
|
||||
* Macro to check the following production in the XML spec:
|
||||
*
|
||||
* [87] CombiningChar ::= ... long list see REC ...
|
||||
*/
|
||||
#define IS_COMBINING(c) xmlIsCombiningQ(c)
|
||||
|
||||
/**
|
||||
* IS_COMBINING_CH:
|
||||
* @c: an xmlChar (usually an unsigned char)
|
||||
*
|
||||
* Always false (all combining chars > 0xff)
|
||||
*/
|
||||
#define IS_COMBINING_CH(c) 0
|
||||
|
||||
/**
|
||||
* IS_EXTENDER:
|
||||
* @c: an UNICODE value (int)
|
||||
*
|
||||
* Macro to check the following production in the XML spec:
|
||||
*
|
||||
*
|
||||
* [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
|
||||
* #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
|
||||
* [#x309D-#x309E] | [#x30FC-#x30FE]
|
||||
*/
|
||||
#define IS_EXTENDER(c) xmlIsExtenderQ(c)
|
||||
|
||||
/**
|
||||
* IS_EXTENDER_CH:
|
||||
* @c: an xmlChar value (usually an unsigned char)
|
||||
*
|
||||
* Behaves like IS_EXTENDER but with a single-byte argument
|
||||
*/
|
||||
#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
|
||||
|
||||
/**
|
||||
* IS_IDEOGRAPHIC:
|
||||
* @c: an UNICODE value (int)
|
||||
*
|
||||
* Macro to check the following production in the XML spec:
|
||||
*
|
||||
*
|
||||
* [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
|
||||
*/
|
||||
#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
|
||||
|
||||
/**
|
||||
* IS_LETTER:
|
||||
* @c: an UNICODE value (int)
|
||||
*
|
||||
* Macro to check the following production in the XML spec:
|
||||
*
|
||||
*
|
||||
* [84] Letter ::= BaseChar | Ideographic
|
||||
*/
|
||||
#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
|
||||
|
||||
/**
|
||||
* IS_LETTER_CH:
|
||||
* @c: an xmlChar value (normally unsigned char)
|
||||
*
|
||||
* Macro behaves like IS_LETTER, but only check base chars
|
||||
*
|
||||
*/
|
||||
#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
|
||||
|
||||
/**
|
||||
* IS_ASCII_LETTER:
|
||||
* @c: an xmlChar value
|
||||
*
|
||||
* Macro to check [a-zA-Z]
|
||||
*
|
||||
*/
|
||||
#define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
|
||||
((0x61 <= (c)) && ((c) <= 0x7a)))
|
||||
|
||||
/**
|
||||
* IS_ASCII_DIGIT:
|
||||
* @c: an xmlChar value
|
||||
*
|
||||
* Macro to check [0-9]
|
||||
*
|
||||
*/
|
||||
#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
|
||||
|
||||
/**
|
||||
* IS_PUBIDCHAR:
|
||||
* @c: an UNICODE value (int)
|
||||
*
|
||||
* Macro to check the following production in the XML spec:
|
||||
*
|
||||
*
|
||||
* [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
|
||||
*/
|
||||
#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
|
||||
|
||||
/**
|
||||
* IS_PUBIDCHAR_CH:
|
||||
* @c: an xmlChar value (normally unsigned char)
|
||||
*
|
||||
* Same as IS_PUBIDCHAR but for single-byte value
|
||||
*/
|
||||
#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
|
||||
|
||||
/**
|
||||
* SKIP_EOL:
|
||||
* @p: and UTF8 string pointer
|
||||
*
|
||||
* Skips the end of line chars.
|
||||
*/
|
||||
#define SKIP_EOL(p) \
|
||||
if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \
|
||||
if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
|
||||
|
||||
/**
|
||||
* MOVETO_ENDTAG:
|
||||
* @p: and UTF8 string pointer
|
||||
*
|
||||
* Skips to the next '>' char.
|
||||
*/
|
||||
#define MOVETO_ENDTAG(p) \
|
||||
while ((*p) && (*(p) != '>')) (p)++
|
||||
|
||||
/**
|
||||
* MOVETO_STARTTAG:
|
||||
* @p: and UTF8 string pointer
|
||||
*
|
||||
* Skips to the next '<' char.
|
||||
*/
|
||||
#define MOVETO_STARTTAG(p) \
|
||||
while ((*p) && (*(p) != '<')) (p)++
|
||||
|
||||
/**
|
||||
* Global variables used for predefined strings.
|
||||
*/
|
||||
XMLPUBVAR const xmlChar xmlStringText[];
|
||||
XMLPUBVAR const xmlChar xmlStringTextNoenc[];
|
||||
XMLPUBVAR const xmlChar xmlStringComment[];
|
||||
|
||||
/*
|
||||
* Function to finish the work of the macros where needed.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlIsLetter (int c);
|
||||
|
||||
/**
|
||||
* Parser context.
|
||||
*/
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlCreateFileParserCtxt (const char *filename);
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlCreateURLParserCtxt (const char *filename,
|
||||
int options);
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlCreateMemoryParserCtxt(const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlCreateEntityParserCtxt(const xmlChar *URL,
|
||||
const xmlChar *ID,
|
||||
const xmlChar *base);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlCharEncodingHandlerPtr handler);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input,
|
||||
xmlCharEncodingHandlerPtr handler);
|
||||
|
||||
#ifdef IN_LIBXML
|
||||
/* internal error reporting */
|
||||
XMLPUBFUN void XMLCALL
|
||||
__xmlErrEncoding (xmlParserCtxtPtr ctxt,
|
||||
xmlParserErrors xmlerr,
|
||||
const char *msg,
|
||||
const xmlChar * str1,
|
||||
const xmlChar * str2);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Input Streams.
|
||||
*/
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *buffer);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
|
||||
xmlEntityPtr entity);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlPushInput (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr input);
|
||||
XMLPUBFUN xmlChar XMLCALL
|
||||
xmlPopInput (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeInputStream (xmlParserInputPtr input);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
|
||||
const char *filename);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlNewInputStream (xmlParserCtxtPtr ctxt);
|
||||
|
||||
/**
|
||||
* Namespaces.
|
||||
*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlSplitQName (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlChar **prefix);
|
||||
|
||||
/**
|
||||
* Generic production rules.
|
||||
*/
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlParseName (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseNmtoken (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseEntityValue (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **orig);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseAttValue (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseCharData (xmlParserCtxtPtr ctxt,
|
||||
int cdata);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseExternalID (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **publicID,
|
||||
int strict);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseComment (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlParsePITarget (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParsePI (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **value);
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
xmlParseNotationType (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
|
||||
xmlEnumerationPtr *tree);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseAttributeType (xmlParserCtxtPtr ctxt,
|
||||
xmlEnumerationPtr *tree);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlParseElementMixedContentDecl
|
||||
(xmlParserCtxtPtr ctxt,
|
||||
int inputchk);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlParseElementChildrenContentDecl
|
||||
(xmlParserCtxtPtr ctxt,
|
||||
int inputchk);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlElementContentPtr *result);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseElementDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseCharRef (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlEntityPtr XMLCALL
|
||||
xmlParseEntityRef (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseReference (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParsePEReference (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlParseAttribute (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **value);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlParseStartTag (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseEndTag (xmlParserCtxtPtr ctxt);
|
||||
#endif /* LIBXML_SAX1_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseCDSect (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseContent (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseElement (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseVersionNum (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseEncName (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseSDDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseTextDecl (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseMisc (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *ExternalID,
|
||||
const xmlChar *SystemID);
|
||||
/**
|
||||
* XML_SUBSTITUTE_NONE:
|
||||
*
|
||||
* If no entities need to be substituted.
|
||||
*/
|
||||
#define XML_SUBSTITUTE_NONE 0
|
||||
/**
|
||||
* XML_SUBSTITUTE_REF:
|
||||
*
|
||||
* Whether general entities need to be substituted.
|
||||
*/
|
||||
#define XML_SUBSTITUTE_REF 1
|
||||
/**
|
||||
* XML_SUBSTITUTE_PEREF:
|
||||
*
|
||||
* Whether parameter entities need to be substituted.
|
||||
*/
|
||||
#define XML_SUBSTITUTE_PEREF 2
|
||||
/**
|
||||
* XML_SUBSTITUTE_BOTH:
|
||||
*
|
||||
* Both general and parameter entities need to be substituted.
|
||||
*/
|
||||
#define XML_SUBSTITUTE_BOTH 3
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *str,
|
||||
int what,
|
||||
xmlChar end,
|
||||
xmlChar end2,
|
||||
xmlChar end3);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *str,
|
||||
int len,
|
||||
int what,
|
||||
xmlChar end,
|
||||
xmlChar end2,
|
||||
xmlChar end3);
|
||||
|
||||
/*
|
||||
* Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL nodePush (xmlParserCtxtPtr ctxt,
|
||||
xmlNodePtr value);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL nodePop (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL inputPush (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr value);
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL inputPop (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN const xmlChar * XMLCALL namePop (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL namePush (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *value);
|
||||
|
||||
/*
|
||||
* other commodities shared between parser.c and parserInternals.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
|
||||
const xmlChar *cur,
|
||||
int *len);
|
||||
XMLPUBFUN void XMLCALL xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang);
|
||||
|
||||
/*
|
||||
* Really core function shared with HTML parser.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt,
|
||||
int *len);
|
||||
XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out,
|
||||
int val);
|
||||
XMLPUBFUN int XMLCALL xmlCopyChar (int len,
|
||||
xmlChar *out,
|
||||
int val);
|
||||
XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
/*
|
||||
* Actually comes from the HTML parser but launched from the init stuff.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL htmlInitAutoClose (void);
|
||||
XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename,
|
||||
const char *encoding);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Specific function to keep track of entities references
|
||||
* and used by the XSLT debugger.
|
||||
*/
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
/**
|
||||
* xmlEntityReferenceFunc:
|
||||
* @ent: the entity
|
||||
* @firstNode: the fist node in the chunk
|
||||
* @lastNode: the last nod in the chunk
|
||||
*
|
||||
* Callback function used when one needs to be able to track back the
|
||||
* provenance of a chunk of nodes inherited from an entity replacement.
|
||||
*/
|
||||
typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
|
||||
xmlNodePtr firstNode,
|
||||
xmlNodePtr lastNode);
|
||||
|
||||
XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlParseQuotedString (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParseNamespace (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlScanName (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
|
||||
xmlChar **prefix);
|
||||
/**
|
||||
* Entities
|
||||
*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlDecodeEntities (xmlParserCtxtPtr ctxt,
|
||||
int len,
|
||||
int what,
|
||||
xmlChar end,
|
||||
xmlChar end2,
|
||||
xmlChar end3);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlHandleEntity (xmlParserCtxtPtr ctxt,
|
||||
xmlEntityPtr entity);
|
||||
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
#ifdef IN_LIBXML
|
||||
/*
|
||||
* internal only
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlErrMemory (xmlParserCtxtPtr ctxt,
|
||||
const char *extra);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_PARSER_INTERNALS_H__ */
|
||||
100
cache/include/libxml/pattern.h
vendored
100
cache/include/libxml/pattern.h
vendored
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
* Summary: pattern expression handling
|
||||
* Description: allows to compile and test pattern expressions for nodes
|
||||
* either in a tree or based on a parser state.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_PATTERN_H__
|
||||
#define __XML_PATTERN_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/dict.h>
|
||||
|
||||
#ifdef LIBXML_PATTERN_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlPattern:
|
||||
*
|
||||
* A compiled (XPath based) pattern to select nodes
|
||||
*/
|
||||
typedef struct _xmlPattern xmlPattern;
|
||||
typedef xmlPattern *xmlPatternPtr;
|
||||
|
||||
/**
|
||||
* xmlPatternFlags:
|
||||
*
|
||||
* This is the set of options affecting the behaviour of pattern
|
||||
* matching with this module
|
||||
*
|
||||
*/
|
||||
typedef enum {
|
||||
XML_PATTERN_DEFAULT = 0, /* simple pattern match */
|
||||
XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */
|
||||
XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */
|
||||
XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */
|
||||
} xmlPatternFlags;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreePattern (xmlPatternPtr comp);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreePatternList (xmlPatternPtr comp);
|
||||
|
||||
XMLPUBFUN xmlPatternPtr XMLCALL
|
||||
xmlPatterncompile (const xmlChar *pattern,
|
||||
xmlDict *dict,
|
||||
int flags,
|
||||
const xmlChar **namespaces);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlPatternMatch (xmlPatternPtr comp,
|
||||
xmlNodePtr node);
|
||||
|
||||
/* streaming interfaces */
|
||||
typedef struct _xmlStreamCtxt xmlStreamCtxt;
|
||||
typedef xmlStreamCtxt *xmlStreamCtxtPtr;
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlPatternStreamable (xmlPatternPtr comp);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlPatternMaxDepth (xmlPatternPtr comp);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlPatternMinDepth (xmlPatternPtr comp);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlPatternFromRoot (xmlPatternPtr comp);
|
||||
XMLPUBFUN xmlStreamCtxtPtr XMLCALL
|
||||
xmlPatternGetStreamCtxt (xmlPatternPtr comp);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStreamPushNode (xmlStreamCtxtPtr stream,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns,
|
||||
int nodeType);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStreamPush (xmlStreamCtxtPtr stream,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStreamPushAttr (xmlStreamCtxtPtr stream,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStreamPop (xmlStreamCtxtPtr stream);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_PATTERN_ENABLED */
|
||||
|
||||
#endif /* __XML_PATTERN_H__ */
|
||||
217
cache/include/libxml/relaxng.h
vendored
217
cache/include/libxml/relaxng.h
vendored
@@ -1,217 +0,0 @@
|
||||
/*
|
||||
* Summary: implementation of the Relax-NG validation
|
||||
* Description: implementation of the Relax-NG validation
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_RELAX_NG__
|
||||
#define __XML_RELAX_NG__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/hash.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _xmlRelaxNG xmlRelaxNG;
|
||||
typedef xmlRelaxNG *xmlRelaxNGPtr;
|
||||
|
||||
|
||||
/**
|
||||
* xmlRelaxNGValidityErrorFunc:
|
||||
* @ctx: the validation context
|
||||
* @msg: the message
|
||||
* @...: extra arguments
|
||||
*
|
||||
* Signature of an error callback from a Relax-NG validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
/**
|
||||
* xmlRelaxNGValidityWarningFunc:
|
||||
* @ctx: the validation context
|
||||
* @msg: the message
|
||||
* @...: extra arguments
|
||||
*
|
||||
* Signature of a warning callback from a Relax-NG validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
/**
|
||||
* A schemas validation context
|
||||
*/
|
||||
typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
|
||||
typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
|
||||
|
||||
typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
|
||||
typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
|
||||
|
||||
/*
|
||||
* xmlRelaxNGValidErr:
|
||||
*
|
||||
* List of possible Relax NG validation errors
|
||||
*/
|
||||
typedef enum {
|
||||
XML_RELAXNG_OK = 0,
|
||||
XML_RELAXNG_ERR_MEMORY,
|
||||
XML_RELAXNG_ERR_TYPE,
|
||||
XML_RELAXNG_ERR_TYPEVAL,
|
||||
XML_RELAXNG_ERR_DUPID,
|
||||
XML_RELAXNG_ERR_TYPECMP,
|
||||
XML_RELAXNG_ERR_NOSTATE,
|
||||
XML_RELAXNG_ERR_NODEFINE,
|
||||
XML_RELAXNG_ERR_LISTEXTRA,
|
||||
XML_RELAXNG_ERR_LISTEMPTY,
|
||||
XML_RELAXNG_ERR_INTERNODATA,
|
||||
XML_RELAXNG_ERR_INTERSEQ,
|
||||
XML_RELAXNG_ERR_INTEREXTRA,
|
||||
XML_RELAXNG_ERR_ELEMNAME,
|
||||
XML_RELAXNG_ERR_ATTRNAME,
|
||||
XML_RELAXNG_ERR_ELEMNONS,
|
||||
XML_RELAXNG_ERR_ATTRNONS,
|
||||
XML_RELAXNG_ERR_ELEMWRONGNS,
|
||||
XML_RELAXNG_ERR_ATTRWRONGNS,
|
||||
XML_RELAXNG_ERR_ELEMEXTRANS,
|
||||
XML_RELAXNG_ERR_ATTREXTRANS,
|
||||
XML_RELAXNG_ERR_ELEMNOTEMPTY,
|
||||
XML_RELAXNG_ERR_NOELEM,
|
||||
XML_RELAXNG_ERR_NOTELEM,
|
||||
XML_RELAXNG_ERR_ATTRVALID,
|
||||
XML_RELAXNG_ERR_CONTENTVALID,
|
||||
XML_RELAXNG_ERR_EXTRACONTENT,
|
||||
XML_RELAXNG_ERR_INVALIDATTR,
|
||||
XML_RELAXNG_ERR_DATAELEM,
|
||||
XML_RELAXNG_ERR_VALELEM,
|
||||
XML_RELAXNG_ERR_LISTELEM,
|
||||
XML_RELAXNG_ERR_DATATYPE,
|
||||
XML_RELAXNG_ERR_VALUE,
|
||||
XML_RELAXNG_ERR_LIST,
|
||||
XML_RELAXNG_ERR_NOGRAMMAR,
|
||||
XML_RELAXNG_ERR_EXTRADATA,
|
||||
XML_RELAXNG_ERR_LACKDATA,
|
||||
XML_RELAXNG_ERR_INTERNAL,
|
||||
XML_RELAXNG_ERR_ELEMWRONG,
|
||||
XML_RELAXNG_ERR_TEXTWRONG
|
||||
} xmlRelaxNGValidErr;
|
||||
|
||||
/*
|
||||
* xmlRelaxNGParserFlags:
|
||||
*
|
||||
* List of possible Relax NG Parser flags
|
||||
*/
|
||||
typedef enum {
|
||||
XML_RELAXNGP_NONE = 0,
|
||||
XML_RELAXNGP_FREE_DOC = 1,
|
||||
XML_RELAXNGP_CRNG = 2
|
||||
} xmlRelaxNGParserFlag;
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRelaxNGInitTypes (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRelaxNGCleanupTypes (void);
|
||||
|
||||
/*
|
||||
* Interfaces for parsing.
|
||||
*/
|
||||
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
|
||||
xmlRelaxNGNewParserCtxt (const char *URL);
|
||||
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
|
||||
xmlRelaxNGNewMemParserCtxt (const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
|
||||
xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
|
||||
int flag);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
|
||||
xmlRelaxNGValidityErrorFunc err,
|
||||
xmlRelaxNGValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
|
||||
xmlRelaxNGValidityErrorFunc *err,
|
||||
xmlRelaxNGValidityWarningFunc *warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRelaxNGSetParserStructuredErrors(
|
||||
xmlRelaxNGParserCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc serror,
|
||||
void *ctx);
|
||||
XMLPUBFUN xmlRelaxNGPtr XMLCALL
|
||||
xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRelaxNGFree (xmlRelaxNGPtr schema);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRelaxNGDump (FILE *output,
|
||||
xmlRelaxNGPtr schema);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRelaxNGDumpTree (FILE * output,
|
||||
xmlRelaxNGPtr schema);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
/*
|
||||
* Interfaces for validating
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlRelaxNGValidityErrorFunc err,
|
||||
xmlRelaxNGValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlRelaxNGValidityErrorFunc *err,
|
||||
xmlRelaxNGValidityWarningFunc *warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc serror, void *ctx);
|
||||
XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
|
||||
xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
/*
|
||||
* Interfaces for progressive validation when possible
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
|
||||
const xmlChar *data,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_SCHEMAS_ENABLED */
|
||||
|
||||
#endif /* __XML_RELAX_NG__ */
|
||||
958
cache/include/libxml/schemasInternals.h
vendored
958
cache/include/libxml/schemasInternals.h
vendored
@@ -1,958 +0,0 @@
|
||||
/*
|
||||
* Summary: internal interfaces for XML Schemas
|
||||
* Description: internal interfaces for the XML Schemas handling
|
||||
* and schema validity checking
|
||||
* The Schemas development is a Work In Progress.
|
||||
* Some of those interfaces are not garanteed to be API or ABI stable !
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XML_SCHEMA_INTERNALS_H__
|
||||
#define __XML_SCHEMA_INTERNALS_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
|
||||
#include <libxml/xmlregexp.h>
|
||||
#include <libxml/hash.h>
|
||||
#include <libxml/dict.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
XML_SCHEMAS_UNKNOWN = 0,
|
||||
XML_SCHEMAS_STRING,
|
||||
XML_SCHEMAS_NORMSTRING,
|
||||
XML_SCHEMAS_DECIMAL,
|
||||
XML_SCHEMAS_TIME,
|
||||
XML_SCHEMAS_GDAY,
|
||||
XML_SCHEMAS_GMONTH,
|
||||
XML_SCHEMAS_GMONTHDAY,
|
||||
XML_SCHEMAS_GYEAR,
|
||||
XML_SCHEMAS_GYEARMONTH,
|
||||
XML_SCHEMAS_DATE,
|
||||
XML_SCHEMAS_DATETIME,
|
||||
XML_SCHEMAS_DURATION,
|
||||
XML_SCHEMAS_FLOAT,
|
||||
XML_SCHEMAS_DOUBLE,
|
||||
XML_SCHEMAS_BOOLEAN,
|
||||
XML_SCHEMAS_TOKEN,
|
||||
XML_SCHEMAS_LANGUAGE,
|
||||
XML_SCHEMAS_NMTOKEN,
|
||||
XML_SCHEMAS_NMTOKENS,
|
||||
XML_SCHEMAS_NAME,
|
||||
XML_SCHEMAS_QNAME,
|
||||
XML_SCHEMAS_NCNAME,
|
||||
XML_SCHEMAS_ID,
|
||||
XML_SCHEMAS_IDREF,
|
||||
XML_SCHEMAS_IDREFS,
|
||||
XML_SCHEMAS_ENTITY,
|
||||
XML_SCHEMAS_ENTITIES,
|
||||
XML_SCHEMAS_NOTATION,
|
||||
XML_SCHEMAS_ANYURI,
|
||||
XML_SCHEMAS_INTEGER,
|
||||
XML_SCHEMAS_NPINTEGER,
|
||||
XML_SCHEMAS_NINTEGER,
|
||||
XML_SCHEMAS_NNINTEGER,
|
||||
XML_SCHEMAS_PINTEGER,
|
||||
XML_SCHEMAS_INT,
|
||||
XML_SCHEMAS_UINT,
|
||||
XML_SCHEMAS_LONG,
|
||||
XML_SCHEMAS_ULONG,
|
||||
XML_SCHEMAS_SHORT,
|
||||
XML_SCHEMAS_USHORT,
|
||||
XML_SCHEMAS_BYTE,
|
||||
XML_SCHEMAS_UBYTE,
|
||||
XML_SCHEMAS_HEXBINARY,
|
||||
XML_SCHEMAS_BASE64BINARY,
|
||||
XML_SCHEMAS_ANYTYPE,
|
||||
XML_SCHEMAS_ANYSIMPLETYPE
|
||||
} xmlSchemaValType;
|
||||
|
||||
/*
|
||||
* XML Schemas defines multiple type of types.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */
|
||||
XML_SCHEMA_TYPE_ANY,
|
||||
XML_SCHEMA_TYPE_FACET,
|
||||
XML_SCHEMA_TYPE_SIMPLE,
|
||||
XML_SCHEMA_TYPE_COMPLEX,
|
||||
XML_SCHEMA_TYPE_SEQUENCE = 6,
|
||||
XML_SCHEMA_TYPE_CHOICE,
|
||||
XML_SCHEMA_TYPE_ALL,
|
||||
XML_SCHEMA_TYPE_SIMPLE_CONTENT,
|
||||
XML_SCHEMA_TYPE_COMPLEX_CONTENT,
|
||||
XML_SCHEMA_TYPE_UR,
|
||||
XML_SCHEMA_TYPE_RESTRICTION,
|
||||
XML_SCHEMA_TYPE_EXTENSION,
|
||||
XML_SCHEMA_TYPE_ELEMENT,
|
||||
XML_SCHEMA_TYPE_ATTRIBUTE,
|
||||
XML_SCHEMA_TYPE_ATTRIBUTEGROUP,
|
||||
XML_SCHEMA_TYPE_GROUP,
|
||||
XML_SCHEMA_TYPE_NOTATION,
|
||||
XML_SCHEMA_TYPE_LIST,
|
||||
XML_SCHEMA_TYPE_UNION,
|
||||
XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
|
||||
XML_SCHEMA_TYPE_IDC_UNIQUE,
|
||||
XML_SCHEMA_TYPE_IDC_KEY,
|
||||
XML_SCHEMA_TYPE_IDC_KEYREF,
|
||||
XML_SCHEMA_TYPE_PARTICLE = 25,
|
||||
XML_SCHEMA_TYPE_ATTRIBUTE_USE,
|
||||
XML_SCHEMA_FACET_MININCLUSIVE = 1000,
|
||||
XML_SCHEMA_FACET_MINEXCLUSIVE,
|
||||
XML_SCHEMA_FACET_MAXINCLUSIVE,
|
||||
XML_SCHEMA_FACET_MAXEXCLUSIVE,
|
||||
XML_SCHEMA_FACET_TOTALDIGITS,
|
||||
XML_SCHEMA_FACET_FRACTIONDIGITS,
|
||||
XML_SCHEMA_FACET_PATTERN,
|
||||
XML_SCHEMA_FACET_ENUMERATION,
|
||||
XML_SCHEMA_FACET_WHITESPACE,
|
||||
XML_SCHEMA_FACET_LENGTH,
|
||||
XML_SCHEMA_FACET_MAXLENGTH,
|
||||
XML_SCHEMA_FACET_MINLENGTH,
|
||||
XML_SCHEMA_EXTRA_QNAMEREF = 2000,
|
||||
XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
|
||||
} xmlSchemaTypeType;
|
||||
|
||||
typedef enum {
|
||||
XML_SCHEMA_CONTENT_UNKNOWN = 0,
|
||||
XML_SCHEMA_CONTENT_EMPTY = 1,
|
||||
XML_SCHEMA_CONTENT_ELEMENTS,
|
||||
XML_SCHEMA_CONTENT_MIXED,
|
||||
XML_SCHEMA_CONTENT_SIMPLE,
|
||||
XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
|
||||
XML_SCHEMA_CONTENT_BASIC,
|
||||
XML_SCHEMA_CONTENT_ANY
|
||||
} xmlSchemaContentType;
|
||||
|
||||
typedef struct _xmlSchemaVal xmlSchemaVal;
|
||||
typedef xmlSchemaVal *xmlSchemaValPtr;
|
||||
|
||||
typedef struct _xmlSchemaType xmlSchemaType;
|
||||
typedef xmlSchemaType *xmlSchemaTypePtr;
|
||||
|
||||
typedef struct _xmlSchemaFacet xmlSchemaFacet;
|
||||
typedef xmlSchemaFacet *xmlSchemaFacetPtr;
|
||||
|
||||
/**
|
||||
* Annotation
|
||||
*/
|
||||
typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
|
||||
typedef xmlSchemaAnnot *xmlSchemaAnnotPtr;
|
||||
struct _xmlSchemaAnnot {
|
||||
struct _xmlSchemaAnnot *next;
|
||||
xmlNodePtr content; /* the annotation */
|
||||
};
|
||||
|
||||
/**
|
||||
* XML_SCHEMAS_ANYATTR_SKIP:
|
||||
*
|
||||
* Skip unknown attribute from validation
|
||||
* Obsolete, not used anymore.
|
||||
*/
|
||||
#define XML_SCHEMAS_ANYATTR_SKIP 1
|
||||
/**
|
||||
* XML_SCHEMAS_ANYATTR_LAX:
|
||||
*
|
||||
* Ignore validation non definition on attributes
|
||||
* Obsolete, not used anymore.
|
||||
*/
|
||||
#define XML_SCHEMAS_ANYATTR_LAX 2
|
||||
/**
|
||||
* XML_SCHEMAS_ANYATTR_STRICT:
|
||||
*
|
||||
* Apply strict validation rules on attributes
|
||||
* Obsolete, not used anymore.
|
||||
*/
|
||||
#define XML_SCHEMAS_ANYATTR_STRICT 3
|
||||
/**
|
||||
* XML_SCHEMAS_ANY_SKIP:
|
||||
*
|
||||
* Skip unknown attribute from validation
|
||||
*/
|
||||
#define XML_SCHEMAS_ANY_SKIP 1
|
||||
/**
|
||||
* XML_SCHEMAS_ANY_LAX:
|
||||
*
|
||||
* Used by wildcards.
|
||||
* Validate if type found, don't worry if not found
|
||||
*/
|
||||
#define XML_SCHEMAS_ANY_LAX 2
|
||||
/**
|
||||
* XML_SCHEMAS_ANY_STRICT:
|
||||
*
|
||||
* Used by wildcards.
|
||||
* Apply strict validation rules
|
||||
*/
|
||||
#define XML_SCHEMAS_ANY_STRICT 3
|
||||
/**
|
||||
* XML_SCHEMAS_ATTR_USE_PROHIBITED:
|
||||
*
|
||||
* Used by wildcards.
|
||||
* The attribute is prohibited.
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
|
||||
/**
|
||||
* XML_SCHEMAS_ATTR_USE_REQUIRED:
|
||||
*
|
||||
* The attribute is required.
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTR_USE_REQUIRED 1
|
||||
/**
|
||||
* XML_SCHEMAS_ATTR_USE_OPTIONAL:
|
||||
*
|
||||
* The attribute is optional.
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
|
||||
/**
|
||||
* XML_SCHEMAS_ATTR_GLOBAL:
|
||||
*
|
||||
* allow elements in no namespace
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTR_GLOBAL 1 << 0
|
||||
/**
|
||||
* XML_SCHEMAS_ATTR_NSDEFAULT:
|
||||
*
|
||||
* allow elements in no namespace
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7
|
||||
/**
|
||||
* XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
|
||||
*
|
||||
* this is set when the "type" and "ref" references
|
||||
* have been resolved.
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8
|
||||
/**
|
||||
* XML_SCHEMAS_ATTR_FIXED:
|
||||
*
|
||||
* the attribute has a fixed value
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTR_FIXED 1 << 9
|
||||
|
||||
/**
|
||||
* xmlSchemaAttribute:
|
||||
* An attribute definition.
|
||||
*/
|
||||
|
||||
typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
|
||||
typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
|
||||
struct _xmlSchemaAttribute {
|
||||
xmlSchemaTypeType type;
|
||||
struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
|
||||
const xmlChar *name; /* the name of the declaration */
|
||||
const xmlChar *id; /* Deprecated; not used */
|
||||
const xmlChar *ref; /* Deprecated; not used */
|
||||
const xmlChar *refNs; /* Deprecated; not used */
|
||||
const xmlChar *typeName; /* the local name of the type definition */
|
||||
const xmlChar *typeNs; /* the ns URI of the type definition */
|
||||
xmlSchemaAnnotPtr annot;
|
||||
|
||||
xmlSchemaTypePtr base; /* Deprecated; not used */
|
||||
int occurs; /* Deprecated; not used */
|
||||
const xmlChar *defValue; /* The initial value of the value constraint */
|
||||
xmlSchemaTypePtr subtypes; /* the type definition */
|
||||
xmlNodePtr node;
|
||||
const xmlChar *targetNamespace;
|
||||
int flags;
|
||||
const xmlChar *refPrefix; /* Deprecated; not used */
|
||||
xmlSchemaValPtr defVal; /* The compiled value constraint */
|
||||
xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlSchemaAttributeLink:
|
||||
* Used to build a list of attribute uses on complexType definitions.
|
||||
* WARNING: Deprecated; not used.
|
||||
*/
|
||||
typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
|
||||
typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
|
||||
struct _xmlSchemaAttributeLink {
|
||||
struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */
|
||||
struct _xmlSchemaAttribute *attr;/* the linked attribute */
|
||||
};
|
||||
|
||||
/**
|
||||
* XML_SCHEMAS_WILDCARD_COMPLETE:
|
||||
*
|
||||
* If the wildcard is complete.
|
||||
*/
|
||||
#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
|
||||
|
||||
/**
|
||||
* xmlSchemaCharValueLink:
|
||||
* Used to build a list of namespaces on wildcards.
|
||||
*/
|
||||
typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
|
||||
typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr;
|
||||
struct _xmlSchemaWildcardNs {
|
||||
struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */
|
||||
const xmlChar *value;/* the value */
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlSchemaWildcard.
|
||||
* A wildcard.
|
||||
*/
|
||||
typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
|
||||
typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
|
||||
struct _xmlSchemaWildcard {
|
||||
xmlSchemaTypeType type; /* The kind of type */
|
||||
const xmlChar *id; /* Deprecated; not used */
|
||||
xmlSchemaAnnotPtr annot;
|
||||
xmlNodePtr node;
|
||||
int minOccurs; /* Deprecated; not used */
|
||||
int maxOccurs; /* Deprecated; not used */
|
||||
int processContents;
|
||||
int any; /* Indicates if the ns constraint is of ##any */
|
||||
xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
|
||||
xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */
|
||||
int flags;
|
||||
};
|
||||
|
||||
/**
|
||||
* XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
|
||||
*
|
||||
* The attribute wildcard has been already builded.
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
|
||||
/**
|
||||
* XML_SCHEMAS_ATTRGROUP_GLOBAL:
|
||||
*
|
||||
* The attribute wildcard has been already builded.
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
|
||||
/**
|
||||
* XML_SCHEMAS_ATTRGROUP_MARKED:
|
||||
*
|
||||
* Marks the attr group as marked; used for circular checks.
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
|
||||
|
||||
/**
|
||||
* XML_SCHEMAS_ATTRGROUP_REDEFINED:
|
||||
*
|
||||
* The attr group was redefined.
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3
|
||||
/**
|
||||
* XML_SCHEMAS_ATTRGROUP_HAS_REFS:
|
||||
*
|
||||
* Whether this attr. group contains attr. group references.
|
||||
*/
|
||||
#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
|
||||
|
||||
/**
|
||||
* An attribute group definition.
|
||||
*
|
||||
* xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
|
||||
* must be kept similar
|
||||
*/
|
||||
typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
|
||||
typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr;
|
||||
struct _xmlSchemaAttributeGroup {
|
||||
xmlSchemaTypeType type; /* The kind of type */
|
||||
struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
|
||||
const xmlChar *name;
|
||||
const xmlChar *id;
|
||||
const xmlChar *ref; /* Deprecated; not used */
|
||||
const xmlChar *refNs; /* Deprecated; not used */
|
||||
xmlSchemaAnnotPtr annot;
|
||||
|
||||
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
|
||||
xmlNodePtr node;
|
||||
int flags;
|
||||
xmlSchemaWildcardPtr attributeWildcard;
|
||||
const xmlChar *refPrefix; /* Deprecated; not used */
|
||||
xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
|
||||
const xmlChar *targetNamespace;
|
||||
void *attrUses;
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlSchemaTypeLink:
|
||||
* Used to build a list of types (e.g. member types of
|
||||
* simpleType with variety "union").
|
||||
*/
|
||||
typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
|
||||
typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
|
||||
struct _xmlSchemaTypeLink {
|
||||
struct _xmlSchemaTypeLink *next;/* the next type link ... */
|
||||
xmlSchemaTypePtr type;/* the linked type */
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlSchemaFacetLink:
|
||||
* Used to build a list of facets.
|
||||
*/
|
||||
typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
|
||||
typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr;
|
||||
struct _xmlSchemaFacetLink {
|
||||
struct _xmlSchemaFacetLink *next;/* the next facet link ... */
|
||||
xmlSchemaFacetPtr facet;/* the linked facet */
|
||||
};
|
||||
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_MIXED:
|
||||
*
|
||||
* the element content type is mixed
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_MIXED 1 << 0
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
|
||||
*
|
||||
* the simple or complex type has a derivation method of "extension".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
|
||||
*
|
||||
* the simple or complex type has a derivation method of "restriction".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_GLOBAL:
|
||||
*
|
||||
* the type is global
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_GLOBAL 1 << 3
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
|
||||
*
|
||||
* the complexType owns an attribute wildcard, i.e.
|
||||
* it can be freed by the complexType
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_VARIETY_ABSENT:
|
||||
*
|
||||
* the simpleType has a variety of "absent".
|
||||
* TODO: Actually not necessary :-/, since if
|
||||
* none of the variety flags occur then it's
|
||||
* automatically absent.
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_VARIETY_LIST:
|
||||
*
|
||||
* the simpleType has a variety of "list".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_VARIETY_UNION:
|
||||
*
|
||||
* the simpleType has a variety of "union".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
|
||||
*
|
||||
* the simpleType has a variety of "union".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_FINAL_EXTENSION:
|
||||
*
|
||||
* the complexType has a final of "extension".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
|
||||
*
|
||||
* the simpleType/complexType has a final of "restriction".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_FINAL_LIST:
|
||||
*
|
||||
* the simpleType has a final of "list".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_FINAL_UNION:
|
||||
*
|
||||
* the simpleType has a final of "union".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_FINAL_DEFAULT:
|
||||
*
|
||||
* the simpleType has a final of "default".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
|
||||
*
|
||||
* Marks the item as a builtin primitive.
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_MARKED:
|
||||
*
|
||||
* Marks the item as marked; used for circular checks.
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_MARKED 1 << 16
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
|
||||
*
|
||||
* the complexType did not specify 'block' so use the default of the
|
||||
* <schema> item.
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
|
||||
*
|
||||
* the complexType has a 'block' of "extension".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
|
||||
*
|
||||
* the complexType has a 'block' of "restriction".
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_ABSTRACT:
|
||||
*
|
||||
* the simple/complexType is abstract.
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
|
||||
*
|
||||
* indicates if the facets need a computed value
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
|
||||
*
|
||||
* indicates that the type was typefixed
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_INTERNAL_INVALID:
|
||||
*
|
||||
* indicates that the type is invalid
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
|
||||
*
|
||||
* a whitespace-facet value of "preserve"
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
|
||||
*
|
||||
* a whitespace-facet value of "replace"
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
|
||||
*
|
||||
* a whitespace-facet value of "collapse"
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_HAS_FACETS:
|
||||
*
|
||||
* has facets
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_NORMVALUENEEDED:
|
||||
*
|
||||
* indicates if the facets (pattern) need a normalized value
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28
|
||||
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_FIXUP_1:
|
||||
*
|
||||
* First stage of fixup was done.
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29
|
||||
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_REDEFINED:
|
||||
*
|
||||
* The type was redefined.
|
||||
*/
|
||||
#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30
|
||||
/**
|
||||
* XML_SCHEMAS_TYPE_REDEFINING:
|
||||
*
|
||||
* The type redefines an other type.
|
||||
*/
|
||||
/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */
|
||||
|
||||
/**
|
||||
* _xmlSchemaType:
|
||||
*
|
||||
* Schemas type definition.
|
||||
*/
|
||||
struct _xmlSchemaType {
|
||||
xmlSchemaTypeType type; /* The kind of type */
|
||||
struct _xmlSchemaType *next; /* the next type if in a sequence ... */
|
||||
const xmlChar *name;
|
||||
const xmlChar *id ; /* Deprecated; not used */
|
||||
const xmlChar *ref; /* Deprecated; not used */
|
||||
const xmlChar *refNs; /* Deprecated; not used */
|
||||
xmlSchemaAnnotPtr annot;
|
||||
xmlSchemaTypePtr subtypes;
|
||||
xmlSchemaAttributePtr attributes; /* Deprecated; not used */
|
||||
xmlNodePtr node;
|
||||
int minOccurs; /* Deprecated; not used */
|
||||
int maxOccurs; /* Deprecated; not used */
|
||||
|
||||
int flags;
|
||||
xmlSchemaContentType contentType;
|
||||
const xmlChar *base; /* Base type's local name */
|
||||
const xmlChar *baseNs; /* Base type's target namespace */
|
||||
xmlSchemaTypePtr baseType; /* The base type component */
|
||||
xmlSchemaFacetPtr facets; /* Local facets */
|
||||
struct _xmlSchemaType *redef; /* Deprecated; not used */
|
||||
int recurse; /* Obsolete */
|
||||
xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
|
||||
xmlSchemaWildcardPtr attributeWildcard;
|
||||
int builtInType; /* Type of built-in types. */
|
||||
xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
|
||||
xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
|
||||
const xmlChar *refPrefix; /* Deprecated; not used */
|
||||
xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
|
||||
Could we use @subtypes for this? */
|
||||
xmlRegexpPtr contModel; /* Holds the automaton of the content model */
|
||||
const xmlChar *targetNamespace;
|
||||
void *attrUses;
|
||||
};
|
||||
|
||||
/*
|
||||
* xmlSchemaElement:
|
||||
* An element definition.
|
||||
*
|
||||
* xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
|
||||
* structures must be kept similar
|
||||
*/
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_NILLABLE:
|
||||
*
|
||||
* the element is nillable
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_NILLABLE 1 << 0
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_GLOBAL:
|
||||
*
|
||||
* the element is global
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_GLOBAL 1 << 1
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_DEFAULT:
|
||||
*
|
||||
* the element has a default value
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_DEFAULT 1 << 2
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_FIXED:
|
||||
*
|
||||
* the element has a fixed value
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_FIXED 1 << 3
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_ABSTRACT:
|
||||
*
|
||||
* the element is abstract
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_TOPLEVEL:
|
||||
*
|
||||
* the element is top level
|
||||
* obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_REF:
|
||||
*
|
||||
* the element is a reference to a type
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_REF 1 << 6
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_NSDEFAULT:
|
||||
*
|
||||
* allow elements in no namespace
|
||||
* Obsolete, not used anymore.
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
|
||||
*
|
||||
* this is set when "type", "ref", "substitutionGroup"
|
||||
* references have been resolved.
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_CIRCULAR:
|
||||
*
|
||||
* a helper flag for the search of circular references.
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_BLOCK_ABSENT:
|
||||
*
|
||||
* the "block" attribute is absent
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
|
||||
*
|
||||
* disallowed substitutions are absent
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
|
||||
*
|
||||
* disallowed substitutions: "restriction"
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
|
||||
*
|
||||
* disallowed substitutions: "substituion"
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_FINAL_ABSENT:
|
||||
*
|
||||
* substitution group exclusions are absent
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_FINAL_EXTENSION:
|
||||
*
|
||||
* substitution group exclusions: "extension"
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
|
||||
*
|
||||
* substitution group exclusions: "restriction"
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
|
||||
*
|
||||
* the declaration is a substitution group head
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17
|
||||
/**
|
||||
* XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
|
||||
*
|
||||
* this is set when the elem decl has been checked against
|
||||
* all constraints
|
||||
*/
|
||||
#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18
|
||||
|
||||
typedef struct _xmlSchemaElement xmlSchemaElement;
|
||||
typedef xmlSchemaElement *xmlSchemaElementPtr;
|
||||
struct _xmlSchemaElement {
|
||||
xmlSchemaTypeType type; /* The kind of type */
|
||||
struct _xmlSchemaType *next; /* Not used? */
|
||||
const xmlChar *name;
|
||||
const xmlChar *id; /* Deprecated; not used */
|
||||
const xmlChar *ref; /* Deprecated; not used */
|
||||
const xmlChar *refNs; /* Deprecated; not used */
|
||||
xmlSchemaAnnotPtr annot;
|
||||
xmlSchemaTypePtr subtypes; /* the type definition */
|
||||
xmlSchemaAttributePtr attributes;
|
||||
xmlNodePtr node;
|
||||
int minOccurs; /* Deprecated; not used */
|
||||
int maxOccurs; /* Deprecated; not used */
|
||||
|
||||
int flags;
|
||||
const xmlChar *targetNamespace;
|
||||
const xmlChar *namedType;
|
||||
const xmlChar *namedTypeNs;
|
||||
const xmlChar *substGroup;
|
||||
const xmlChar *substGroupNs;
|
||||
const xmlChar *scope;
|
||||
const xmlChar *value; /* The original value of the value constraint. */
|
||||
struct _xmlSchemaElement *refDecl; /* This will now be used for the
|
||||
substitution group affiliation */
|
||||
xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
|
||||
xmlSchemaContentType contentType;
|
||||
const xmlChar *refPrefix; /* Deprecated; not used */
|
||||
xmlSchemaValPtr defVal; /* The compiled value contraint. */
|
||||
void *idcs; /* The identity-constraint defs */
|
||||
};
|
||||
|
||||
/*
|
||||
* XML_SCHEMAS_FACET_UNKNOWN:
|
||||
*
|
||||
* unknown facet handling
|
||||
*/
|
||||
#define XML_SCHEMAS_FACET_UNKNOWN 0
|
||||
/*
|
||||
* XML_SCHEMAS_FACET_PRESERVE:
|
||||
*
|
||||
* preserve the type of the facet
|
||||
*/
|
||||
#define XML_SCHEMAS_FACET_PRESERVE 1
|
||||
/*
|
||||
* XML_SCHEMAS_FACET_REPLACE:
|
||||
*
|
||||
* replace the type of the facet
|
||||
*/
|
||||
#define XML_SCHEMAS_FACET_REPLACE 2
|
||||
/*
|
||||
* XML_SCHEMAS_FACET_COLLAPSE:
|
||||
*
|
||||
* collapse the types of the facet
|
||||
*/
|
||||
#define XML_SCHEMAS_FACET_COLLAPSE 3
|
||||
/**
|
||||
* A facet definition.
|
||||
*/
|
||||
struct _xmlSchemaFacet {
|
||||
xmlSchemaTypeType type; /* The kind of type */
|
||||
struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
|
||||
const xmlChar *value; /* The original value */
|
||||
const xmlChar *id; /* Obsolete */
|
||||
xmlSchemaAnnotPtr annot;
|
||||
xmlNodePtr node;
|
||||
int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
|
||||
int whitespace;
|
||||
xmlSchemaValPtr val; /* The compiled value */
|
||||
xmlRegexpPtr regexp; /* The regex for patterns */
|
||||
};
|
||||
|
||||
/**
|
||||
* A notation definition.
|
||||
*/
|
||||
typedef struct _xmlSchemaNotation xmlSchemaNotation;
|
||||
typedef xmlSchemaNotation *xmlSchemaNotationPtr;
|
||||
struct _xmlSchemaNotation {
|
||||
xmlSchemaTypeType type; /* The kind of type */
|
||||
const xmlChar *name;
|
||||
xmlSchemaAnnotPtr annot;
|
||||
const xmlChar *identifier;
|
||||
const xmlChar *targetNamespace;
|
||||
};
|
||||
|
||||
/*
|
||||
* TODO: Actually all those flags used for the schema should sit
|
||||
* on the schema parser context, since they are used only
|
||||
* during parsing an XML schema document, and not available
|
||||
* on the component level as per spec.
|
||||
*/
|
||||
/**
|
||||
* XML_SCHEMAS_QUALIF_ELEM:
|
||||
*
|
||||
* Reflects elementFormDefault == qualified in
|
||||
* an XML schema document.
|
||||
*/
|
||||
#define XML_SCHEMAS_QUALIF_ELEM 1 << 0
|
||||
/**
|
||||
* XML_SCHEMAS_QUALIF_ATTR:
|
||||
*
|
||||
* Reflects attributeFormDefault == qualified in
|
||||
* an XML schema document.
|
||||
*/
|
||||
#define XML_SCHEMAS_QUALIF_ATTR 1 << 1
|
||||
/**
|
||||
* XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
|
||||
*
|
||||
* the schema has "extension" in the set of finalDefault.
|
||||
*/
|
||||
#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2
|
||||
/**
|
||||
* XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
|
||||
*
|
||||
* the schema has "restriction" in the set of finalDefault.
|
||||
*/
|
||||
#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3
|
||||
/**
|
||||
* XML_SCHEMAS_FINAL_DEFAULT_LIST:
|
||||
*
|
||||
* the cshema has "list" in the set of finalDefault.
|
||||
*/
|
||||
#define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4
|
||||
/**
|
||||
* XML_SCHEMAS_FINAL_DEFAULT_UNION:
|
||||
*
|
||||
* the schema has "union" in the set of finalDefault.
|
||||
*/
|
||||
#define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5
|
||||
/**
|
||||
* XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
|
||||
*
|
||||
* the schema has "extension" in the set of blockDefault.
|
||||
*/
|
||||
#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6
|
||||
/**
|
||||
* XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
|
||||
*
|
||||
* the schema has "restriction" in the set of blockDefault.
|
||||
*/
|
||||
#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7
|
||||
/**
|
||||
* XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
|
||||
*
|
||||
* the schema has "substitution" in the set of blockDefault.
|
||||
*/
|
||||
#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8
|
||||
/**
|
||||
* XML_SCHEMAS_INCLUDING_CONVERT_NS:
|
||||
*
|
||||
* the schema is currently including an other schema with
|
||||
* no target namespace.
|
||||
*/
|
||||
#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
|
||||
/**
|
||||
* _xmlSchema:
|
||||
*
|
||||
* A Schemas definition
|
||||
*/
|
||||
struct _xmlSchema {
|
||||
const xmlChar *name; /* schema name */
|
||||
const xmlChar *targetNamespace; /* the target namespace */
|
||||
const xmlChar *version;
|
||||
const xmlChar *id; /* Obsolete */
|
||||
xmlDocPtr doc;
|
||||
xmlSchemaAnnotPtr annot;
|
||||
int flags;
|
||||
|
||||
xmlHashTablePtr typeDecl;
|
||||
xmlHashTablePtr attrDecl;
|
||||
xmlHashTablePtr attrgrpDecl;
|
||||
xmlHashTablePtr elemDecl;
|
||||
xmlHashTablePtr notaDecl;
|
||||
|
||||
xmlHashTablePtr schemasImports;
|
||||
|
||||
void *_private; /* unused by the library for users or bindings */
|
||||
xmlHashTablePtr groupDecl;
|
||||
xmlDictPtr dict;
|
||||
void *includes; /* the includes, this is opaque for now */
|
||||
int preserve; /* whether to free the document */
|
||||
int counter; /* used to give ononymous components unique names */
|
||||
xmlHashTablePtr idcDef; /* All identity-constraint defs. */
|
||||
void *volatiles; /* Obsolete */
|
||||
};
|
||||
|
||||
XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type);
|
||||
XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_SCHEMAS_ENABLED */
|
||||
#endif /* __XML_SCHEMA_INTERNALS_H__ */
|
||||
142
cache/include/libxml/schematron.h
vendored
142
cache/include/libxml/schematron.h
vendored
@@ -1,142 +0,0 @@
|
||||
/*
|
||||
* Summary: XML Schemastron implementation
|
||||
* Description: interface to the XML Schematron validity checking.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XML_SCHEMATRON_H__
|
||||
#define __XML_SCHEMATRON_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_SCHEMATRON_ENABLED
|
||||
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
|
||||
XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
|
||||
XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
|
||||
XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
|
||||
XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
|
||||
XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
|
||||
XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
|
||||
} xmlSchematronValidOptions;
|
||||
|
||||
/**
|
||||
* The schemas related types are kept internal
|
||||
*/
|
||||
typedef struct _xmlSchematron xmlSchematron;
|
||||
typedef xmlSchematron *xmlSchematronPtr;
|
||||
|
||||
/**
|
||||
* xmlSchematronValidityErrorFunc:
|
||||
* @ctx: the validation context
|
||||
* @msg: the message
|
||||
* @...: extra arguments
|
||||
*
|
||||
* Signature of an error callback from a Schematron validation
|
||||
*/
|
||||
typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
|
||||
|
||||
/**
|
||||
* xmlSchematronValidityWarningFunc:
|
||||
* @ctx: the validation context
|
||||
* @msg: the message
|
||||
* @...: extra arguments
|
||||
*
|
||||
* Signature of a warning callback from a Schematron validation
|
||||
*/
|
||||
typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
|
||||
|
||||
/**
|
||||
* A schemas validation context
|
||||
*/
|
||||
typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
|
||||
typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
|
||||
|
||||
typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
|
||||
typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
|
||||
|
||||
/*
|
||||
* Interfaces for parsing.
|
||||
*/
|
||||
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
|
||||
xmlSchematronNewParserCtxt (const char *URL);
|
||||
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
|
||||
xmlSchematronNewMemParserCtxt(const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
|
||||
xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
|
||||
/*****
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
|
||||
xmlSchematronValidityErrorFunc err,
|
||||
xmlSchematronValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
|
||||
xmlSchematronValidityErrorFunc * err,
|
||||
xmlSchematronValidityWarningFunc * warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
|
||||
*****/
|
||||
XMLPUBFUN xmlSchematronPtr XMLCALL
|
||||
xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronFree (xmlSchematronPtr schema);
|
||||
/*
|
||||
* Interfaces for validating
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronSetValidStructuredErrors(
|
||||
xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc serror,
|
||||
void *ctx);
|
||||
/******
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlSchematronValidityErrorFunc err,
|
||||
xmlSchematronValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlSchematronValidityErrorFunc *err,
|
||||
xmlSchematronValidityWarningFunc *warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlNodePtr elem);
|
||||
*******/
|
||||
|
||||
XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
|
||||
xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
|
||||
int options);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
|
||||
xmlDocPtr instance);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_SCHEMATRON_ENABLED */
|
||||
#endif /* __XML_SCHEMATRON_H__ */
|
||||
84
cache/include/libxml/threads.h
vendored
84
cache/include/libxml/threads.h
vendored
@@ -1,84 +0,0 @@
|
||||
/**
|
||||
* Summary: interfaces for thread handling
|
||||
* Description: set of generic threading related routines
|
||||
* should work with pthreads, Windows native or TLS threads
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_THREADS_H__
|
||||
#define __XML_THREADS_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* xmlMutex are a simple mutual exception locks.
|
||||
*/
|
||||
typedef struct _xmlMutex xmlMutex;
|
||||
typedef xmlMutex *xmlMutexPtr;
|
||||
|
||||
/*
|
||||
* xmlRMutex are reentrant mutual exception locks.
|
||||
*/
|
||||
typedef struct _xmlRMutex xmlRMutex;
|
||||
typedef xmlRMutex *xmlRMutexPtr;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include <libxml/globals.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
XMLPUBFUN xmlMutexPtr XMLCALL
|
||||
xmlNewMutex (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlMutexLock (xmlMutexPtr tok);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlMutexUnlock (xmlMutexPtr tok);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeMutex (xmlMutexPtr tok);
|
||||
|
||||
XMLPUBFUN xmlRMutexPtr XMLCALL
|
||||
xmlNewRMutex (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRMutexLock (xmlRMutexPtr tok);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRMutexUnlock (xmlRMutexPtr tok);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeRMutex (xmlRMutexPtr tok);
|
||||
|
||||
/*
|
||||
* Library wide APIs.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlInitThreads (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlLockLibrary (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlUnlockLibrary(void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlGetThreadId (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsMainThread (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupThreads(void);
|
||||
XMLPUBFUN xmlGlobalStatePtr XMLCALL
|
||||
xmlGetGlobalState(void);
|
||||
|
||||
#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)
|
||||
int XMLCALL xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __XML_THREADS_H__ */
|
||||
1310
cache/include/libxml/tree.h
vendored
1310
cache/include/libxml/tree.h
vendored
File diff suppressed because it is too large
Load Diff
94
cache/include/libxml/uri.h
vendored
94
cache/include/libxml/uri.h
vendored
@@ -1,94 +0,0 @@
|
||||
/**
|
||||
* Summary: library of generic URI related routines
|
||||
* Description: library of generic URI related routines
|
||||
* Implements RFC 2396
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_URI_H__
|
||||
#define __XML_URI_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlURI:
|
||||
*
|
||||
* A parsed URI reference. This is a struct containing the various fields
|
||||
* as described in RFC 2396 but separated for further processing.
|
||||
*
|
||||
* Note: query is a deprecated field which is incorrectly unescaped.
|
||||
* query_raw takes precedence over query if the former is set.
|
||||
* See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
|
||||
*/
|
||||
typedef struct _xmlURI xmlURI;
|
||||
typedef xmlURI *xmlURIPtr;
|
||||
struct _xmlURI {
|
||||
char *scheme; /* the URI scheme */
|
||||
char *opaque; /* opaque part */
|
||||
char *authority; /* the authority part */
|
||||
char *server; /* the server part */
|
||||
char *user; /* the user part */
|
||||
int port; /* the port number */
|
||||
char *path; /* the path string */
|
||||
char *query; /* the query string (deprecated - use with caution) */
|
||||
char *fragment; /* the fragment identifier */
|
||||
int cleanup; /* parsing potentially unclean URI */
|
||||
char *query_raw; /* the query string (as it appears in the URI) */
|
||||
};
|
||||
|
||||
/*
|
||||
* This function is in tree.h:
|
||||
* xmlChar * xmlNodeGetBase (xmlDocPtr doc,
|
||||
* xmlNodePtr cur);
|
||||
*/
|
||||
XMLPUBFUN xmlURIPtr XMLCALL
|
||||
xmlCreateURI (void);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlBuildURI (const xmlChar *URI,
|
||||
const xmlChar *base);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlBuildRelativeURI (const xmlChar *URI,
|
||||
const xmlChar *base);
|
||||
XMLPUBFUN xmlURIPtr XMLCALL
|
||||
xmlParseURI (const char *str);
|
||||
XMLPUBFUN xmlURIPtr XMLCALL
|
||||
xmlParseURIRaw (const char *str,
|
||||
int raw);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParseURIReference (xmlURIPtr uri,
|
||||
const char *str);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlSaveUri (xmlURIPtr uri);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlPrintURI (FILE *stream,
|
||||
xmlURIPtr uri);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlURIEscapeStr (const xmlChar *str,
|
||||
const xmlChar *list);
|
||||
XMLPUBFUN char * XMLCALL
|
||||
xmlURIUnescapeString (const char *str,
|
||||
int len,
|
||||
char *target);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlNormalizeURIPath (char *path);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlURIEscape (const xmlChar *str);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeURI (xmlURIPtr uri);
|
||||
XMLPUBFUN xmlChar* XMLCALL
|
||||
xmlCanonicPath (const xmlChar *path);
|
||||
XMLPUBFUN xmlChar* XMLCALL
|
||||
xmlPathToURI (const xmlChar *path);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_URI_H__ */
|
||||
458
cache/include/libxml/valid.h
vendored
458
cache/include/libxml/valid.h
vendored
@@ -1,458 +0,0 @@
|
||||
/*
|
||||
* Summary: The DTD validation
|
||||
* Description: API for the DTD handling and the validity checking
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XML_VALID_H__
|
||||
#define __XML_VALID_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/list.h>
|
||||
#include <libxml/xmlautomata.h>
|
||||
#include <libxml/xmlregexp.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Validation state added for non-determinist content model.
|
||||
*/
|
||||
typedef struct _xmlValidState xmlValidState;
|
||||
typedef xmlValidState *xmlValidStatePtr;
|
||||
|
||||
/**
|
||||
* xmlValidityErrorFunc:
|
||||
* @ctx: usually an xmlValidCtxtPtr to a validity error context,
|
||||
* but comes from ctxt->userData (which normally contains such
|
||||
* a pointer); ctxt->userData can be changed by the user.
|
||||
* @msg: the string to format *printf like vararg
|
||||
* @...: remaining arguments to the format
|
||||
*
|
||||
* Callback called when a validity error is found. This is a message
|
||||
* oriented function similar to an *printf function.
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
/**
|
||||
* xmlValidityWarningFunc:
|
||||
* @ctx: usually an xmlValidCtxtPtr to a validity error context,
|
||||
* but comes from ctxt->userData (which normally contains such
|
||||
* a pointer); ctxt->userData can be changed by the user.
|
||||
* @msg: the string to format *printf like vararg
|
||||
* @...: remaining arguments to the format
|
||||
*
|
||||
* Callback called when a validity warning is found. This is a message
|
||||
* oriented function similar to an *printf function.
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
#ifdef IN_LIBXML
|
||||
/**
|
||||
* XML_CTXT_FINISH_DTD_0:
|
||||
*
|
||||
* Special value for finishDtd field when embedded in an xmlParserCtxt
|
||||
*/
|
||||
#define XML_CTXT_FINISH_DTD_0 0xabcd1234
|
||||
/**
|
||||
* XML_CTXT_FINISH_DTD_1:
|
||||
*
|
||||
* Special value for finishDtd field when embedded in an xmlParserCtxt
|
||||
*/
|
||||
#define XML_CTXT_FINISH_DTD_1 0xabcd1235
|
||||
#endif
|
||||
|
||||
/*
|
||||
* xmlValidCtxt:
|
||||
* An xmlValidCtxt is used for error reporting when validating.
|
||||
*/
|
||||
typedef struct _xmlValidCtxt xmlValidCtxt;
|
||||
typedef xmlValidCtxt *xmlValidCtxtPtr;
|
||||
struct _xmlValidCtxt {
|
||||
void *userData; /* user specific data block */
|
||||
xmlValidityErrorFunc error; /* the callback in case of errors */
|
||||
xmlValidityWarningFunc warning; /* the callback in case of warning */
|
||||
|
||||
/* Node analysis stack used when validating within entities */
|
||||
xmlNodePtr node; /* Current parsed Node */
|
||||
int nodeNr; /* Depth of the parsing stack */
|
||||
int nodeMax; /* Max depth of the parsing stack */
|
||||
xmlNodePtr *nodeTab; /* array of nodes */
|
||||
|
||||
unsigned int finishDtd; /* finished validating the Dtd ? */
|
||||
xmlDocPtr doc; /* the document */
|
||||
int valid; /* temporary validity check result */
|
||||
|
||||
/* state state used for non-determinist content validation */
|
||||
xmlValidState *vstate; /* current state */
|
||||
int vstateNr; /* Depth of the validation stack */
|
||||
int vstateMax; /* Max depth of the validation stack */
|
||||
xmlValidState *vstateTab; /* array of validation states */
|
||||
|
||||
#ifdef LIBXML_REGEXP_ENABLED
|
||||
xmlAutomataPtr am; /* the automata */
|
||||
xmlAutomataStatePtr state; /* used to build the automata */
|
||||
#else
|
||||
void *am;
|
||||
void *state;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
* ALL notation declarations are stored in a table.
|
||||
* There is one table per DTD.
|
||||
*/
|
||||
|
||||
typedef struct _xmlHashTable xmlNotationTable;
|
||||
typedef xmlNotationTable *xmlNotationTablePtr;
|
||||
|
||||
/*
|
||||
* ALL element declarations are stored in a table.
|
||||
* There is one table per DTD.
|
||||
*/
|
||||
|
||||
typedef struct _xmlHashTable xmlElementTable;
|
||||
typedef xmlElementTable *xmlElementTablePtr;
|
||||
|
||||
/*
|
||||
* ALL attribute declarations are stored in a table.
|
||||
* There is one table per DTD.
|
||||
*/
|
||||
|
||||
typedef struct _xmlHashTable xmlAttributeTable;
|
||||
typedef xmlAttributeTable *xmlAttributeTablePtr;
|
||||
|
||||
/*
|
||||
* ALL IDs attributes are stored in a table.
|
||||
* There is one table per document.
|
||||
*/
|
||||
|
||||
typedef struct _xmlHashTable xmlIDTable;
|
||||
typedef xmlIDTable *xmlIDTablePtr;
|
||||
|
||||
/*
|
||||
* ALL Refs attributes are stored in a table.
|
||||
* There is one table per document.
|
||||
*/
|
||||
|
||||
typedef struct _xmlHashTable xmlRefTable;
|
||||
typedef xmlRefTable *xmlRefTablePtr;
|
||||
|
||||
/* Notation */
|
||||
XMLPUBFUN xmlNotationPtr XMLCALL
|
||||
xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDtdPtr dtd,
|
||||
const xmlChar *name,
|
||||
const xmlChar *PublicID,
|
||||
const xmlChar *SystemID);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlNotationTablePtr XMLCALL
|
||||
xmlCopyNotationTable (xmlNotationTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeNotationTable (xmlNotationTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpNotationDecl (xmlBufferPtr buf,
|
||||
xmlNotationPtr nota);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpNotationTable (xmlBufferPtr buf,
|
||||
xmlNotationTablePtr table);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/* Element Content */
|
||||
/* the non Doc version are being deprecated */
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlNewElementContent (const xmlChar *name,
|
||||
xmlElementContentType type);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlCopyElementContent (xmlElementContentPtr content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeElementContent (xmlElementContentPtr cur);
|
||||
/* the new versions with doc argument */
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlNewDocElementContent (xmlDocPtr doc,
|
||||
const xmlChar *name,
|
||||
xmlElementContentType type);
|
||||
XMLPUBFUN xmlElementContentPtr XMLCALL
|
||||
xmlCopyDocElementContent(xmlDocPtr doc,
|
||||
xmlElementContentPtr content);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeDocElementContent(xmlDocPtr doc,
|
||||
xmlElementContentPtr cur);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSnprintfElementContent(char *buf,
|
||||
int size,
|
||||
xmlElementContentPtr content,
|
||||
int englob);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/* DEPRECATED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSprintfElementContent(char *buf,
|
||||
xmlElementContentPtr content,
|
||||
int englob);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
/* DEPRECATED */
|
||||
|
||||
/* Element */
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
xmlAddElementDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDtdPtr dtd,
|
||||
const xmlChar *name,
|
||||
xmlElementTypeVal type,
|
||||
xmlElementContentPtr content);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlElementTablePtr XMLCALL
|
||||
xmlCopyElementTable (xmlElementTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeElementTable (xmlElementTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpElementTable (xmlBufferPtr buf,
|
||||
xmlElementTablePtr table);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpElementDecl (xmlBufferPtr buf,
|
||||
xmlElementPtr elem);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/* Enumeration */
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
xmlCreateEnumeration (const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeEnumeration (xmlEnumerationPtr cur);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlEnumerationPtr XMLCALL
|
||||
xmlCopyEnumeration (xmlEnumerationPtr cur);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
|
||||
/* Attribute */
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDtdPtr dtd,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns,
|
||||
xmlAttributeType type,
|
||||
xmlAttributeDefault def,
|
||||
const xmlChar *defaultValue,
|
||||
xmlEnumerationPtr tree);
|
||||
#ifdef LIBXML_TREE_ENABLED
|
||||
XMLPUBFUN xmlAttributeTablePtr XMLCALL
|
||||
xmlCopyAttributeTable (xmlAttributeTablePtr table);
|
||||
#endif /* LIBXML_TREE_ENABLED */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeAttributeTable (xmlAttributeTablePtr table);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpAttributeTable (xmlBufferPtr buf,
|
||||
xmlAttributeTablePtr table);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlDumpAttributeDecl (xmlBufferPtr buf,
|
||||
xmlAttributePtr attr);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/* IDs */
|
||||
XMLPUBFUN xmlIDPtr XMLCALL
|
||||
xmlAddID (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
const xmlChar *value,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeIDTable (xmlIDTablePtr table);
|
||||
XMLPUBFUN xmlAttrPtr XMLCALL
|
||||
xmlGetID (xmlDocPtr doc,
|
||||
const xmlChar *ID);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsID (xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRemoveID (xmlDocPtr doc,
|
||||
xmlAttrPtr attr);
|
||||
|
||||
/* IDREFs */
|
||||
XMLPUBFUN xmlRefPtr XMLCALL
|
||||
xmlAddRef (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
const xmlChar *value,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeRefTable (xmlRefTablePtr table);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsRef (xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRemoveRef (xmlDocPtr doc,
|
||||
xmlAttrPtr attr);
|
||||
XMLPUBFUN xmlListPtr XMLCALL
|
||||
xmlGetRefs (xmlDocPtr doc,
|
||||
const xmlChar *ID);
|
||||
|
||||
/**
|
||||
* The public function calls related to validity checking.
|
||||
*/
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
/* Allocate/Release Validation Contexts */
|
||||
XMLPUBFUN xmlValidCtxtPtr XMLCALL
|
||||
xmlNewValidCtxt(void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeValidCtxt(xmlValidCtxtPtr);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateRoot (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlElementPtr elem);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlValidNormalizeAttributeValue(xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlAttributePtr attr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateAttributeValue(xmlAttributeType type,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNotationPtr nota);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateDtd (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlDtdPtr dtd);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateDocument (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateOneElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
xmlAttrPtr attr,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *prefix,
|
||||
xmlNsPtr ns,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
|
||||
#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
const xmlChar *notationName);
|
||||
#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIsMixedElement (xmlDocPtr doc,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
xmlGetDtdAttrDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlAttributePtr XMLCALL
|
||||
xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *elem,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN xmlNotationPtr XMLCALL
|
||||
xmlGetDtdNotationDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
xmlGetDtdQElementDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *name,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN xmlElementPtr XMLCALL
|
||||
xmlGetDtdElementDesc (xmlDtdPtr dtd,
|
||||
const xmlChar *name);
|
||||
|
||||
#ifdef LIBXML_VALID_ENABLED
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidGetPotentialChildren(xmlElementContent *ctree,
|
||||
const xmlChar **names,
|
||||
int *len,
|
||||
int max);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidGetValidElements(xmlNode *prev,
|
||||
xmlNode *next,
|
||||
const xmlChar **names,
|
||||
int max);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNameValue (const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNamesValue (const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNmtokenValue (const xmlChar *value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidateNmtokensValue(const xmlChar *value);
|
||||
|
||||
#ifdef LIBXML_REGEXP_ENABLED
|
||||
/*
|
||||
* Validation based on the regexp support
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
|
||||
xmlElementPtr elem);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidatePushElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *qname);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidatePushCData (xmlValidCtxtPtr ctxt,
|
||||
const xmlChar *data,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlValidatePopElement (xmlValidCtxtPtr ctxt,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr elem,
|
||||
const xmlChar *qname);
|
||||
#endif /* LIBXML_REGEXP_ENABLED */
|
||||
#endif /* LIBXML_VALID_ENABLED */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_VALID_H__ */
|
||||
129
cache/include/libxml/xinclude.h
vendored
129
cache/include/libxml/xinclude.h
vendored
@@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Summary: implementation of XInclude
|
||||
* Description: API to handle XInclude processing,
|
||||
* implements the
|
||||
* World Wide Web Consortium Last Call Working Draft 10 November 2003
|
||||
* http://www.w3.org/TR/2003/WD-xinclude-20031110
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_XINCLUDE_H__
|
||||
#define __XML_XINCLUDE_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* XINCLUDE_NS:
|
||||
*
|
||||
* Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
|
||||
*/
|
||||
#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
|
||||
/**
|
||||
* XINCLUDE_OLD_NS:
|
||||
*
|
||||
* Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
|
||||
*/
|
||||
#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
|
||||
/**
|
||||
* XINCLUDE_NODE:
|
||||
*
|
||||
* Macro defining "include"
|
||||
*/
|
||||
#define XINCLUDE_NODE (const xmlChar *) "include"
|
||||
/**
|
||||
* XINCLUDE_FALLBACK:
|
||||
*
|
||||
* Macro defining "fallback"
|
||||
*/
|
||||
#define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
|
||||
/**
|
||||
* XINCLUDE_HREF:
|
||||
*
|
||||
* Macro defining "href"
|
||||
*/
|
||||
#define XINCLUDE_HREF (const xmlChar *) "href"
|
||||
/**
|
||||
* XINCLUDE_PARSE:
|
||||
*
|
||||
* Macro defining "parse"
|
||||
*/
|
||||
#define XINCLUDE_PARSE (const xmlChar *) "parse"
|
||||
/**
|
||||
* XINCLUDE_PARSE_XML:
|
||||
*
|
||||
* Macro defining "xml"
|
||||
*/
|
||||
#define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
|
||||
/**
|
||||
* XINCLUDE_PARSE_TEXT:
|
||||
*
|
||||
* Macro defining "text"
|
||||
*/
|
||||
#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
|
||||
/**
|
||||
* XINCLUDE_PARSE_ENCODING:
|
||||
*
|
||||
* Macro defining "encoding"
|
||||
*/
|
||||
#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
|
||||
/**
|
||||
* XINCLUDE_PARSE_XPOINTER:
|
||||
*
|
||||
* Macro defining "xpointer"
|
||||
*/
|
||||
#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
|
||||
|
||||
typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
|
||||
typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
|
||||
|
||||
/*
|
||||
* standalone processing
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcess (xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessFlags (xmlDocPtr doc,
|
||||
int flags);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessFlagsData(xmlDocPtr doc,
|
||||
int flags,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
|
||||
int flags,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessTree (xmlNodePtr tree);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
|
||||
int flags);
|
||||
/*
|
||||
* contextual processing
|
||||
*/
|
||||
XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL
|
||||
xmlXIncludeNewContext (xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
|
||||
int flags);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
|
||||
xmlNodePtr tree);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_XINCLUDE_ENABLED */
|
||||
|
||||
#endif /* __XML_XINCLUDE_H__ */
|
||||
189
cache/include/libxml/xlink.h
vendored
189
cache/include/libxml/xlink.h
vendored
@@ -1,189 +0,0 @@
|
||||
/*
|
||||
* Summary: unfinished XLink detection module
|
||||
* Description: unfinished XLink detection module
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_XLINK_H__
|
||||
#define __XML_XLINK_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef LIBXML_XPTR_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Various defines for the various Link properties.
|
||||
*
|
||||
* NOTE: the link detection layer will try to resolve QName expansion
|
||||
* of namespaces. If "foo" is the prefix for "http://foo.com/"
|
||||
* then the link detection layer will expand role="foo:myrole"
|
||||
* to "http://foo.com/:myrole".
|
||||
* NOTE: the link detection layer will expand URI-Refences found on
|
||||
* href attributes by using the base mechanism if found.
|
||||
*/
|
||||
typedef xmlChar *xlinkHRef;
|
||||
typedef xmlChar *xlinkRole;
|
||||
typedef xmlChar *xlinkTitle;
|
||||
|
||||
typedef enum {
|
||||
XLINK_TYPE_NONE = 0,
|
||||
XLINK_TYPE_SIMPLE,
|
||||
XLINK_TYPE_EXTENDED,
|
||||
XLINK_TYPE_EXTENDED_SET
|
||||
} xlinkType;
|
||||
|
||||
typedef enum {
|
||||
XLINK_SHOW_NONE = 0,
|
||||
XLINK_SHOW_NEW,
|
||||
XLINK_SHOW_EMBED,
|
||||
XLINK_SHOW_REPLACE
|
||||
} xlinkShow;
|
||||
|
||||
typedef enum {
|
||||
XLINK_ACTUATE_NONE = 0,
|
||||
XLINK_ACTUATE_AUTO,
|
||||
XLINK_ACTUATE_ONREQUEST
|
||||
} xlinkActuate;
|
||||
|
||||
/**
|
||||
* xlinkNodeDetectFunc:
|
||||
* @ctx: user data pointer
|
||||
* @node: the node to check
|
||||
*
|
||||
* This is the prototype for the link detection routine.
|
||||
* It calls the default link detection callbacks upon link detection.
|
||||
*/
|
||||
typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
|
||||
|
||||
/*
|
||||
* The link detection module interact with the upper layers using
|
||||
* a set of callback registered at parsing time.
|
||||
*/
|
||||
|
||||
/**
|
||||
* xlinkSimpleLinkFunk:
|
||||
* @ctx: user data pointer
|
||||
* @node: the node carrying the link
|
||||
* @href: the target of the link
|
||||
* @role: the role string
|
||||
* @title: the link title
|
||||
*
|
||||
* This is the prototype for a simple link detection callback.
|
||||
*/
|
||||
typedef void
|
||||
(*xlinkSimpleLinkFunk) (void *ctx,
|
||||
xmlNodePtr node,
|
||||
const xlinkHRef href,
|
||||
const xlinkRole role,
|
||||
const xlinkTitle title);
|
||||
|
||||
/**
|
||||
* xlinkExtendedLinkFunk:
|
||||
* @ctx: user data pointer
|
||||
* @node: the node carrying the link
|
||||
* @nbLocators: the number of locators detected on the link
|
||||
* @hrefs: pointer to the array of locator hrefs
|
||||
* @roles: pointer to the array of locator roles
|
||||
* @nbArcs: the number of arcs detected on the link
|
||||
* @from: pointer to the array of source roles found on the arcs
|
||||
* @to: pointer to the array of target roles found on the arcs
|
||||
* @show: array of values for the show attributes found on the arcs
|
||||
* @actuate: array of values for the actuate attributes found on the arcs
|
||||
* @nbTitles: the number of titles detected on the link
|
||||
* @title: array of titles detected on the link
|
||||
* @langs: array of xml:lang values for the titles
|
||||
*
|
||||
* This is the prototype for a extended link detection callback.
|
||||
*/
|
||||
typedef void
|
||||
(*xlinkExtendedLinkFunk)(void *ctx,
|
||||
xmlNodePtr node,
|
||||
int nbLocators,
|
||||
const xlinkHRef *hrefs,
|
||||
const xlinkRole *roles,
|
||||
int nbArcs,
|
||||
const xlinkRole *from,
|
||||
const xlinkRole *to,
|
||||
xlinkShow *show,
|
||||
xlinkActuate *actuate,
|
||||
int nbTitles,
|
||||
const xlinkTitle *titles,
|
||||
const xmlChar **langs);
|
||||
|
||||
/**
|
||||
* xlinkExtendedLinkSetFunk:
|
||||
* @ctx: user data pointer
|
||||
* @node: the node carrying the link
|
||||
* @nbLocators: the number of locators detected on the link
|
||||
* @hrefs: pointer to the array of locator hrefs
|
||||
* @roles: pointer to the array of locator roles
|
||||
* @nbTitles: the number of titles detected on the link
|
||||
* @title: array of titles detected on the link
|
||||
* @langs: array of xml:lang values for the titles
|
||||
*
|
||||
* This is the prototype for a extended link set detection callback.
|
||||
*/
|
||||
typedef void
|
||||
(*xlinkExtendedLinkSetFunk) (void *ctx,
|
||||
xmlNodePtr node,
|
||||
int nbLocators,
|
||||
const xlinkHRef *hrefs,
|
||||
const xlinkRole *roles,
|
||||
int nbTitles,
|
||||
const xlinkTitle *titles,
|
||||
const xmlChar **langs);
|
||||
|
||||
/**
|
||||
* This is the structure containing a set of Links detection callbacks.
|
||||
*
|
||||
* There is no default xlink callbacks, if one want to get link
|
||||
* recognition activated, those call backs must be provided before parsing.
|
||||
*/
|
||||
typedef struct _xlinkHandler xlinkHandler;
|
||||
typedef xlinkHandler *xlinkHandlerPtr;
|
||||
struct _xlinkHandler {
|
||||
xlinkSimpleLinkFunk simple;
|
||||
xlinkExtendedLinkFunk extended;
|
||||
xlinkExtendedLinkSetFunk set;
|
||||
};
|
||||
|
||||
/*
|
||||
* The default detection routine, can be overridden, they call the default
|
||||
* detection callbacks.
|
||||
*/
|
||||
|
||||
XMLPUBFUN xlinkNodeDetectFunc XMLCALL
|
||||
xlinkGetDefaultDetect (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
|
||||
|
||||
/*
|
||||
* Routines to set/get the default handlers.
|
||||
*/
|
||||
XMLPUBFUN xlinkHandlerPtr XMLCALL
|
||||
xlinkGetDefaultHandler (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xlinkSetDefaultHandler (xlinkHandlerPtr handler);
|
||||
|
||||
/*
|
||||
* Link detection module itself.
|
||||
*/
|
||||
XMLPUBFUN xlinkType XMLCALL
|
||||
xlinkIsLink (xmlDocPtr doc,
|
||||
xmlNodePtr node);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_XPTR_ENABLED */
|
||||
|
||||
#endif /* __XML_XLINK_H__ */
|
||||
366
cache/include/libxml/xmlIO.h
vendored
366
cache/include/libxml/xmlIO.h
vendored
@@ -1,366 +0,0 @@
|
||||
/*
|
||||
* Summary: interface for the I/O interfaces used by the parser
|
||||
* Description: interface for the I/O interfaces used by the parser
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_IO_H__
|
||||
#define __XML_IO_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Those are the functions and datatypes for the parser input
|
||||
* I/O structures.
|
||||
*/
|
||||
|
||||
/**
|
||||
* xmlInputMatchCallback:
|
||||
* @filename: the filename or URI
|
||||
*
|
||||
* Callback used in the I/O Input API to detect if the current handler
|
||||
* can provide input fonctionnalities for this resource.
|
||||
*
|
||||
* Returns 1 if yes and 0 if another Input module should be used
|
||||
*/
|
||||
typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
|
||||
/**
|
||||
* xmlInputOpenCallback:
|
||||
* @filename: the filename or URI
|
||||
*
|
||||
* Callback used in the I/O Input API to open the resource
|
||||
*
|
||||
* Returns an Input context or NULL in case or error
|
||||
*/
|
||||
typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
|
||||
/**
|
||||
* xmlInputReadCallback:
|
||||
* @context: an Input context
|
||||
* @buffer: the buffer to store data read
|
||||
* @len: the length of the buffer in bytes
|
||||
*
|
||||
* Callback used in the I/O Input API to read the resource
|
||||
*
|
||||
* Returns the number of bytes read or -1 in case of error
|
||||
*/
|
||||
typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
|
||||
/**
|
||||
* xmlInputCloseCallback:
|
||||
* @context: an Input context
|
||||
*
|
||||
* Callback used in the I/O Input API to close the resource
|
||||
*
|
||||
* Returns 0 or -1 in case of error
|
||||
*/
|
||||
typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/*
|
||||
* Those are the functions and datatypes for the library output
|
||||
* I/O structures.
|
||||
*/
|
||||
|
||||
/**
|
||||
* xmlOutputMatchCallback:
|
||||
* @filename: the filename or URI
|
||||
*
|
||||
* Callback used in the I/O Output API to detect if the current handler
|
||||
* can provide output fonctionnalities for this resource.
|
||||
*
|
||||
* Returns 1 if yes and 0 if another Output module should be used
|
||||
*/
|
||||
typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
|
||||
/**
|
||||
* xmlOutputOpenCallback:
|
||||
* @filename: the filename or URI
|
||||
*
|
||||
* Callback used in the I/O Output API to open the resource
|
||||
*
|
||||
* Returns an Output context or NULL in case or error
|
||||
*/
|
||||
typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
|
||||
/**
|
||||
* xmlOutputWriteCallback:
|
||||
* @context: an Output context
|
||||
* @buffer: the buffer of data to write
|
||||
* @len: the length of the buffer in bytes
|
||||
*
|
||||
* Callback used in the I/O Output API to write to the resource
|
||||
*
|
||||
* Returns the number of bytes written or -1 in case of error
|
||||
*/
|
||||
typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
|
||||
int len);
|
||||
/**
|
||||
* xmlOutputCloseCallback:
|
||||
* @context: an Output context
|
||||
*
|
||||
* Callback used in the I/O Output API to close the resource
|
||||
*
|
||||
* Returns 0 or -1 in case of error
|
||||
*/
|
||||
typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include <libxml/globals.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/encoding.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
struct _xmlParserInputBuffer {
|
||||
void* context;
|
||||
xmlInputReadCallback readcallback;
|
||||
xmlInputCloseCallback closecallback;
|
||||
|
||||
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
|
||||
|
||||
xmlBufPtr buffer; /* Local buffer encoded in UTF-8 */
|
||||
xmlBufPtr raw; /* if encoder != NULL buffer for raw input */
|
||||
int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
|
||||
int error;
|
||||
unsigned long rawconsumed;/* amount consumed from raw */
|
||||
};
|
||||
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
struct _xmlOutputBuffer {
|
||||
void* context;
|
||||
xmlOutputWriteCallback writecallback;
|
||||
xmlOutputCloseCallback closecallback;
|
||||
|
||||
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
|
||||
|
||||
xmlBufPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
|
||||
xmlBufPtr conv; /* if encoder != NULL buffer for output */
|
||||
int written; /* total number of byte written */
|
||||
int error;
|
||||
};
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
/*
|
||||
* Interfaces for input
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupInputCallbacks (void);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlPopInputCallbacks (void);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRegisterDefaultInputCallbacks (void);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
xmlAllocParserInputBuffer (xmlCharEncoding enc);
|
||||
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
xmlParserInputBufferCreateFilename (const char *URI,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
xmlParserInputBufferCreateFile (FILE *file,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
xmlParserInputBufferCreateFd (int fd,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
xmlParserInputBufferCreateMem (const char *mem, int size,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
xmlParserInputBufferCreateStatic (const char *mem, int size,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
xmlCharEncoding enc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParserInputBufferRead (xmlParserInputBufferPtr in,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlParserInputBufferPush (xmlParserInputBufferPtr in,
|
||||
int len,
|
||||
const char *buf);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
|
||||
XMLPUBFUN char * XMLCALL
|
||||
xmlParserGetDirectory (const char *filename);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
|
||||
xmlInputOpenCallback openFunc,
|
||||
xmlInputReadCallback readFunc,
|
||||
xmlInputCloseCallback closeFunc);
|
||||
|
||||
xmlParserInputBufferPtr
|
||||
__xmlParserInputBufferCreateFilename(const char *URI,
|
||||
xmlCharEncoding enc);
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
/*
|
||||
* Interfaces for output
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupOutputCallbacks (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRegisterDefaultOutputCallbacks(void);
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
xmlOutputBufferCreateFilename (const char *URI,
|
||||
xmlCharEncodingHandlerPtr encoder,
|
||||
int compression);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
xmlOutputBufferCreateFile (FILE *file,
|
||||
xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
|
||||
xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
xmlOutputBufferCreateFd (int fd,
|
||||
xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
XMLPUBFUN xmlOutputBufferPtr XMLCALL
|
||||
xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
|
||||
xmlOutputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
xmlCharEncodingHandlerPtr encoder);
|
||||
|
||||
/* Couple of APIs to get the output without digging into the buffers */
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlOutputBufferGetContent (xmlOutputBufferPtr out);
|
||||
XMLPUBFUN size_t XMLCALL
|
||||
xmlOutputBufferGetSize (xmlOutputBufferPtr out);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlOutputBufferWrite (xmlOutputBufferPtr out,
|
||||
int len,
|
||||
const char *buf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlOutputBufferWriteString (xmlOutputBufferPtr out,
|
||||
const char *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
|
||||
const xmlChar *str,
|
||||
xmlCharEncodingOutputFunc escaping);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlOutputBufferFlush (xmlOutputBufferPtr out);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlOutputBufferClose (xmlOutputBufferPtr out);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
|
||||
xmlOutputOpenCallback openFunc,
|
||||
xmlOutputWriteCallback writeFunc,
|
||||
xmlOutputCloseCallback closeFunc);
|
||||
|
||||
xmlOutputBufferPtr
|
||||
__xmlOutputBufferCreateFilename(const char *URI,
|
||||
xmlCharEncodingHandlerPtr encoder,
|
||||
int compression);
|
||||
|
||||
#ifdef LIBXML_HTTP_ENABLED
|
||||
/* This function only exists if HTTP support built into the library */
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRegisterHTTPPostCallbacks (void );
|
||||
#endif /* LIBXML_HTTP_ENABLED */
|
||||
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
|
||||
xmlParserInputPtr ret);
|
||||
|
||||
/*
|
||||
* A predefined entity loader disabling network accesses
|
||||
*/
|
||||
XMLPUBFUN xmlParserInputPtr XMLCALL
|
||||
xmlNoNetExternalEntityLoader (const char *URL,
|
||||
const char *ID,
|
||||
xmlParserCtxtPtr ctxt);
|
||||
|
||||
/*
|
||||
* xmlNormalizeWindowsPath is obsolete, don't use it.
|
||||
* Check xmlCanonicPath in uri.h for a better alternative.
|
||||
*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlNormalizeWindowsPath (const xmlChar *path);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCheckFilename (const char *path);
|
||||
/**
|
||||
* Default 'file://' protocol callbacks
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlFileMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlFileOpen (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlFileRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlFileClose (void * context);
|
||||
|
||||
/**
|
||||
* Default 'http://' protocol callbacks
|
||||
*/
|
||||
#ifdef LIBXML_HTTP_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOHTTPMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlIOHTTPOpen (const char *filename);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlIOHTTPOpenW (const char * post_uri,
|
||||
int compression );
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOHTTPRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOHTTPClose (void * context);
|
||||
#endif /* LIBXML_HTTP_ENABLED */
|
||||
|
||||
/**
|
||||
* Default 'ftp://' protocol callbacks
|
||||
*/
|
||||
#ifdef LIBXML_FTP_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOFTPMatch (const char *filename);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlIOFTPOpen (const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOFTPRead (void * context,
|
||||
char * buffer,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlIOFTPClose (void * context);
|
||||
#endif /* LIBXML_FTP_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XML_IO_H__ */
|
||||
146
cache/include/libxml/xmlautomata.h
vendored
146
cache/include/libxml/xmlautomata.h
vendored
@@ -1,146 +0,0 @@
|
||||
/*
|
||||
* Summary: API to build regexp automata
|
||||
* Description: the API to build regexp automata
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_AUTOMATA_H__
|
||||
#define __XML_AUTOMATA_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef LIBXML_REGEXP_ENABLED
|
||||
#ifdef LIBXML_AUTOMATA_ENABLED
|
||||
#include <libxml/xmlregexp.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlAutomataPtr:
|
||||
*
|
||||
* A libxml automata description, It can be compiled into a regexp
|
||||
*/
|
||||
typedef struct _xmlAutomata xmlAutomata;
|
||||
typedef xmlAutomata *xmlAutomataPtr;
|
||||
|
||||
/**
|
||||
* xmlAutomataStatePtr:
|
||||
*
|
||||
* A state int the automata description,
|
||||
*/
|
||||
typedef struct _xmlAutomataState xmlAutomataState;
|
||||
typedef xmlAutomataState *xmlAutomataStatePtr;
|
||||
|
||||
/*
|
||||
* Building API
|
||||
*/
|
||||
XMLPUBFUN xmlAutomataPtr XMLCALL
|
||||
xmlNewAutomata (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeAutomata (xmlAutomataPtr am);
|
||||
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataGetInitState (xmlAutomataPtr am);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlAutomataSetFinalState (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr state);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewState (xmlAutomataPtr am);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewTransition (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewTransition2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
const xmlChar *token2,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewNegTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
const xmlChar *token2,
|
||||
void *data);
|
||||
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewCountTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
const xmlChar *token2,
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewOnceTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
const xmlChar *token,
|
||||
const xmlChar *token2,
|
||||
int min,
|
||||
int max,
|
||||
void *data);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewAllTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int lax);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewEpsilon (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewCountedTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int counter);
|
||||
XMLPUBFUN xmlAutomataStatePtr XMLCALL
|
||||
xmlAutomataNewCounterTrans (xmlAutomataPtr am,
|
||||
xmlAutomataStatePtr from,
|
||||
xmlAutomataStatePtr to,
|
||||
int counter);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlAutomataNewCounter (xmlAutomataPtr am,
|
||||
int min,
|
||||
int max);
|
||||
|
||||
XMLPUBFUN xmlRegexpPtr XMLCALL
|
||||
xmlAutomataCompile (xmlAutomataPtr am);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlAutomataIsDeterminist (xmlAutomataPtr am);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_AUTOMATA_ENABLED */
|
||||
#endif /* LIBXML_REGEXP_ENABLED */
|
||||
|
||||
#endif /* __XML_AUTOMATA_H__ */
|
||||
945
cache/include/libxml/xmlerror.h
vendored
945
cache/include/libxml/xmlerror.h
vendored
@@ -1,945 +0,0 @@
|
||||
/*
|
||||
* Summary: error handling
|
||||
* Description: the API used to report errors
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#include <libxml/parser.h>
|
||||
|
||||
#ifndef __XML_ERROR_H__
|
||||
#define __XML_ERROR_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlErrorLevel:
|
||||
*
|
||||
* Indicates the level of an error
|
||||
*/
|
||||
typedef enum {
|
||||
XML_ERR_NONE = 0,
|
||||
XML_ERR_WARNING = 1, /* A simple warning */
|
||||
XML_ERR_ERROR = 2, /* A recoverable error */
|
||||
XML_ERR_FATAL = 3 /* A fatal error */
|
||||
} xmlErrorLevel;
|
||||
|
||||
/**
|
||||
* xmlErrorDomain:
|
||||
*
|
||||
* Indicates where an error may have come from
|
||||
*/
|
||||
typedef enum {
|
||||
XML_FROM_NONE = 0,
|
||||
XML_FROM_PARSER, /* The XML parser */
|
||||
XML_FROM_TREE, /* The tree module */
|
||||
XML_FROM_NAMESPACE, /* The XML Namespace module */
|
||||
XML_FROM_DTD, /* The XML DTD validation with parser context*/
|
||||
XML_FROM_HTML, /* The HTML parser */
|
||||
XML_FROM_MEMORY, /* The memory allocator */
|
||||
XML_FROM_OUTPUT, /* The serialization code */
|
||||
XML_FROM_IO, /* The Input/Output stack */
|
||||
XML_FROM_FTP, /* The FTP module */
|
||||
XML_FROM_HTTP, /* The HTTP module */
|
||||
XML_FROM_XINCLUDE, /* The XInclude processing */
|
||||
XML_FROM_XPATH, /* The XPath module */
|
||||
XML_FROM_XPOINTER, /* The XPointer module */
|
||||
XML_FROM_REGEXP, /* The regular expressions module */
|
||||
XML_FROM_DATATYPE, /* The W3C XML Schemas Datatype module */
|
||||
XML_FROM_SCHEMASP, /* The W3C XML Schemas parser module */
|
||||
XML_FROM_SCHEMASV, /* The W3C XML Schemas validation module */
|
||||
XML_FROM_RELAXNGP, /* The Relax-NG parser module */
|
||||
XML_FROM_RELAXNGV, /* The Relax-NG validator module */
|
||||
XML_FROM_CATALOG, /* The Catalog module */
|
||||
XML_FROM_C14N, /* The Canonicalization module */
|
||||
XML_FROM_XSLT, /* The XSLT engine from libxslt */
|
||||
XML_FROM_VALID, /* The XML DTD validation with valid context */
|
||||
XML_FROM_CHECK, /* The error checking module */
|
||||
XML_FROM_WRITER, /* The xmlwriter module */
|
||||
XML_FROM_MODULE, /* The dynamically loaded module module*/
|
||||
XML_FROM_I18N, /* The module handling character conversion */
|
||||
XML_FROM_SCHEMATRONV,/* The Schematron validator module */
|
||||
XML_FROM_BUFFER, /* The buffers module */
|
||||
XML_FROM_URI /* The URI module */
|
||||
} xmlErrorDomain;
|
||||
|
||||
/**
|
||||
* xmlError:
|
||||
*
|
||||
* An XML Error instance.
|
||||
*/
|
||||
|
||||
typedef struct _xmlError xmlError;
|
||||
typedef xmlError *xmlErrorPtr;
|
||||
struct _xmlError {
|
||||
int domain; /* What part of the library raised this error */
|
||||
int code; /* The error code, e.g. an xmlParserError */
|
||||
char *message;/* human-readable informative error message */
|
||||
xmlErrorLevel level;/* how consequent is the error */
|
||||
char *file; /* the filename */
|
||||
int line; /* the line number if available */
|
||||
char *str1; /* extra string information */
|
||||
char *str2; /* extra string information */
|
||||
char *str3; /* extra string information */
|
||||
int int1; /* extra number information */
|
||||
int int2; /* error column # or 0 if N/A (todo: rename field when we would brk ABI) */
|
||||
void *ctxt; /* the parser context if available */
|
||||
void *node; /* the node in the tree */
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlParserError:
|
||||
*
|
||||
* This is an error that the XML (or HTML) parser can generate
|
||||
*/
|
||||
typedef enum {
|
||||
XML_ERR_OK = 0,
|
||||
XML_ERR_INTERNAL_ERROR, /* 1 */
|
||||
XML_ERR_NO_MEMORY, /* 2 */
|
||||
XML_ERR_DOCUMENT_START, /* 3 */
|
||||
XML_ERR_DOCUMENT_EMPTY, /* 4 */
|
||||
XML_ERR_DOCUMENT_END, /* 5 */
|
||||
XML_ERR_INVALID_HEX_CHARREF, /* 6 */
|
||||
XML_ERR_INVALID_DEC_CHARREF, /* 7 */
|
||||
XML_ERR_INVALID_CHARREF, /* 8 */
|
||||
XML_ERR_INVALID_CHAR, /* 9 */
|
||||
XML_ERR_CHARREF_AT_EOF, /* 10 */
|
||||
XML_ERR_CHARREF_IN_PROLOG, /* 11 */
|
||||
XML_ERR_CHARREF_IN_EPILOG, /* 12 */
|
||||
XML_ERR_CHARREF_IN_DTD, /* 13 */
|
||||
XML_ERR_ENTITYREF_AT_EOF, /* 14 */
|
||||
XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */
|
||||
XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */
|
||||
XML_ERR_ENTITYREF_IN_DTD, /* 17 */
|
||||
XML_ERR_PEREF_AT_EOF, /* 18 */
|
||||
XML_ERR_PEREF_IN_PROLOG, /* 19 */
|
||||
XML_ERR_PEREF_IN_EPILOG, /* 20 */
|
||||
XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */
|
||||
XML_ERR_ENTITYREF_NO_NAME, /* 22 */
|
||||
XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */
|
||||
XML_ERR_PEREF_NO_NAME, /* 24 */
|
||||
XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */
|
||||
XML_ERR_UNDECLARED_ENTITY, /* 26 */
|
||||
XML_WAR_UNDECLARED_ENTITY, /* 27 */
|
||||
XML_ERR_UNPARSED_ENTITY, /* 28 */
|
||||
XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */
|
||||
XML_ERR_ENTITY_IS_PARAMETER, /* 30 */
|
||||
XML_ERR_UNKNOWN_ENCODING, /* 31 */
|
||||
XML_ERR_UNSUPPORTED_ENCODING, /* 32 */
|
||||
XML_ERR_STRING_NOT_STARTED, /* 33 */
|
||||
XML_ERR_STRING_NOT_CLOSED, /* 34 */
|
||||
XML_ERR_NS_DECL_ERROR, /* 35 */
|
||||
XML_ERR_ENTITY_NOT_STARTED, /* 36 */
|
||||
XML_ERR_ENTITY_NOT_FINISHED, /* 37 */
|
||||
XML_ERR_LT_IN_ATTRIBUTE, /* 38 */
|
||||
XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */
|
||||
XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */
|
||||
XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */
|
||||
XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */
|
||||
XML_ERR_LITERAL_NOT_STARTED, /* 43 */
|
||||
XML_ERR_LITERAL_NOT_FINISHED, /* 44 */
|
||||
XML_ERR_COMMENT_NOT_FINISHED, /* 45 */
|
||||
XML_ERR_PI_NOT_STARTED, /* 46 */
|
||||
XML_ERR_PI_NOT_FINISHED, /* 47 */
|
||||
XML_ERR_NOTATION_NOT_STARTED, /* 48 */
|
||||
XML_ERR_NOTATION_NOT_FINISHED, /* 49 */
|
||||
XML_ERR_ATTLIST_NOT_STARTED, /* 50 */
|
||||
XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */
|
||||
XML_ERR_MIXED_NOT_STARTED, /* 52 */
|
||||
XML_ERR_MIXED_NOT_FINISHED, /* 53 */
|
||||
XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */
|
||||
XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */
|
||||
XML_ERR_XMLDECL_NOT_STARTED, /* 56 */
|
||||
XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */
|
||||
XML_ERR_CONDSEC_NOT_STARTED, /* 58 */
|
||||
XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */
|
||||
XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */
|
||||
XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */
|
||||
XML_ERR_MISPLACED_CDATA_END, /* 62 */
|
||||
XML_ERR_CDATA_NOT_FINISHED, /* 63 */
|
||||
XML_ERR_RESERVED_XML_NAME, /* 64 */
|
||||
XML_ERR_SPACE_REQUIRED, /* 65 */
|
||||
XML_ERR_SEPARATOR_REQUIRED, /* 66 */
|
||||
XML_ERR_NMTOKEN_REQUIRED, /* 67 */
|
||||
XML_ERR_NAME_REQUIRED, /* 68 */
|
||||
XML_ERR_PCDATA_REQUIRED, /* 69 */
|
||||
XML_ERR_URI_REQUIRED, /* 70 */
|
||||
XML_ERR_PUBID_REQUIRED, /* 71 */
|
||||
XML_ERR_LT_REQUIRED, /* 72 */
|
||||
XML_ERR_GT_REQUIRED, /* 73 */
|
||||
XML_ERR_LTSLASH_REQUIRED, /* 74 */
|
||||
XML_ERR_EQUAL_REQUIRED, /* 75 */
|
||||
XML_ERR_TAG_NAME_MISMATCH, /* 76 */
|
||||
XML_ERR_TAG_NOT_FINISHED, /* 77 */
|
||||
XML_ERR_STANDALONE_VALUE, /* 78 */
|
||||
XML_ERR_ENCODING_NAME, /* 79 */
|
||||
XML_ERR_HYPHEN_IN_COMMENT, /* 80 */
|
||||
XML_ERR_INVALID_ENCODING, /* 81 */
|
||||
XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */
|
||||
XML_ERR_CONDSEC_INVALID, /* 83 */
|
||||
XML_ERR_VALUE_REQUIRED, /* 84 */
|
||||
XML_ERR_NOT_WELL_BALANCED, /* 85 */
|
||||
XML_ERR_EXTRA_CONTENT, /* 86 */
|
||||
XML_ERR_ENTITY_CHAR_ERROR, /* 87 */
|
||||
XML_ERR_ENTITY_PE_INTERNAL, /* 88 */
|
||||
XML_ERR_ENTITY_LOOP, /* 89 */
|
||||
XML_ERR_ENTITY_BOUNDARY, /* 90 */
|
||||
XML_ERR_INVALID_URI, /* 91 */
|
||||
XML_ERR_URI_FRAGMENT, /* 92 */
|
||||
XML_WAR_CATALOG_PI, /* 93 */
|
||||
XML_ERR_NO_DTD, /* 94 */
|
||||
XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */
|
||||
XML_ERR_VERSION_MISSING, /* 96 */
|
||||
XML_WAR_UNKNOWN_VERSION, /* 97 */
|
||||
XML_WAR_LANG_VALUE, /* 98 */
|
||||
XML_WAR_NS_URI, /* 99 */
|
||||
XML_WAR_NS_URI_RELATIVE, /* 100 */
|
||||
XML_ERR_MISSING_ENCODING, /* 101 */
|
||||
XML_WAR_SPACE_VALUE, /* 102 */
|
||||
XML_ERR_NOT_STANDALONE, /* 103 */
|
||||
XML_ERR_ENTITY_PROCESSING, /* 104 */
|
||||
XML_ERR_NOTATION_PROCESSING, /* 105 */
|
||||
XML_WAR_NS_COLUMN, /* 106 */
|
||||
XML_WAR_ENTITY_REDEFINED, /* 107 */
|
||||
XML_ERR_UNKNOWN_VERSION, /* 108 */
|
||||
XML_ERR_VERSION_MISMATCH, /* 109 */
|
||||
XML_ERR_NAME_TOO_LONG, /* 110 */
|
||||
XML_ERR_USER_STOP, /* 111 */
|
||||
XML_NS_ERR_XML_NAMESPACE = 200,
|
||||
XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
|
||||
XML_NS_ERR_QNAME, /* 202 */
|
||||
XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */
|
||||
XML_NS_ERR_EMPTY, /* 204 */
|
||||
XML_NS_ERR_COLON, /* 205 */
|
||||
XML_DTD_ATTRIBUTE_DEFAULT = 500,
|
||||
XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
|
||||
XML_DTD_ATTRIBUTE_VALUE, /* 502 */
|
||||
XML_DTD_CONTENT_ERROR, /* 503 */
|
||||
XML_DTD_CONTENT_MODEL, /* 504 */
|
||||
XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */
|
||||
XML_DTD_DIFFERENT_PREFIX, /* 506 */
|
||||
XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */
|
||||
XML_DTD_ELEM_NAMESPACE, /* 508 */
|
||||
XML_DTD_ELEM_REDEFINED, /* 509 */
|
||||
XML_DTD_EMPTY_NOTATION, /* 510 */
|
||||
XML_DTD_ENTITY_TYPE, /* 511 */
|
||||
XML_DTD_ID_FIXED, /* 512 */
|
||||
XML_DTD_ID_REDEFINED, /* 513 */
|
||||
XML_DTD_ID_SUBSET, /* 514 */
|
||||
XML_DTD_INVALID_CHILD, /* 515 */
|
||||
XML_DTD_INVALID_DEFAULT, /* 516 */
|
||||
XML_DTD_LOAD_ERROR, /* 517 */
|
||||
XML_DTD_MISSING_ATTRIBUTE, /* 518 */
|
||||
XML_DTD_MIXED_CORRUPT, /* 519 */
|
||||
XML_DTD_MULTIPLE_ID, /* 520 */
|
||||
XML_DTD_NO_DOC, /* 521 */
|
||||
XML_DTD_NO_DTD, /* 522 */
|
||||
XML_DTD_NO_ELEM_NAME, /* 523 */
|
||||
XML_DTD_NO_PREFIX, /* 524 */
|
||||
XML_DTD_NO_ROOT, /* 525 */
|
||||
XML_DTD_NOTATION_REDEFINED, /* 526 */
|
||||
XML_DTD_NOTATION_VALUE, /* 527 */
|
||||
XML_DTD_NOT_EMPTY, /* 528 */
|
||||
XML_DTD_NOT_PCDATA, /* 529 */
|
||||
XML_DTD_NOT_STANDALONE, /* 530 */
|
||||
XML_DTD_ROOT_NAME, /* 531 */
|
||||
XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */
|
||||
XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */
|
||||
XML_DTD_UNKNOWN_ELEM, /* 534 */
|
||||
XML_DTD_UNKNOWN_ENTITY, /* 535 */
|
||||
XML_DTD_UNKNOWN_ID, /* 536 */
|
||||
XML_DTD_UNKNOWN_NOTATION, /* 537 */
|
||||
XML_DTD_STANDALONE_DEFAULTED, /* 538 */
|
||||
XML_DTD_XMLID_VALUE, /* 539 */
|
||||
XML_DTD_XMLID_TYPE, /* 540 */
|
||||
XML_DTD_DUP_TOKEN, /* 541 */
|
||||
XML_HTML_STRUCURE_ERROR = 800,
|
||||
XML_HTML_UNKNOWN_TAG, /* 801 */
|
||||
XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
|
||||
XML_RNGP_ATTR_CONFLICT, /* 1001 */
|
||||
XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */
|
||||
XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */
|
||||
XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */
|
||||
XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */
|
||||
XML_RNGP_CHOICE_CONTENT, /* 1006 */
|
||||
XML_RNGP_CHOICE_EMPTY, /* 1007 */
|
||||
XML_RNGP_CREATE_FAILURE, /* 1008 */
|
||||
XML_RNGP_DATA_CONTENT, /* 1009 */
|
||||
XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */
|
||||
XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */
|
||||
XML_RNGP_DEFINE_EMPTY, /* 1012 */
|
||||
XML_RNGP_DEFINE_MISSING, /* 1013 */
|
||||
XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */
|
||||
XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */
|
||||
XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */
|
||||
XML_RNGP_ELEMENT_EMPTY, /* 1017 */
|
||||
XML_RNGP_ELEMENT_CONTENT, /* 1018 */
|
||||
XML_RNGP_ELEMENT_NAME, /* 1019 */
|
||||
XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */
|
||||
XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */
|
||||
XML_RNGP_EMPTY, /* 1022 */
|
||||
XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */
|
||||
XML_RNGP_EMPTY_CONTENT, /* 1024 */
|
||||
XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */
|
||||
XML_RNGP_ERROR_TYPE_LIB, /* 1026 */
|
||||
XML_RNGP_EXCEPT_EMPTY, /* 1027 */
|
||||
XML_RNGP_EXCEPT_MISSING, /* 1028 */
|
||||
XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */
|
||||
XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */
|
||||
XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */
|
||||
XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */
|
||||
XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */
|
||||
XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */
|
||||
XML_RNGP_FOREIGN_ELEMENT, /* 1035 */
|
||||
XML_RNGP_GRAMMAR_CONTENT, /* 1036 */
|
||||
XML_RNGP_GRAMMAR_EMPTY, /* 1037 */
|
||||
XML_RNGP_GRAMMAR_MISSING, /* 1038 */
|
||||
XML_RNGP_GRAMMAR_NO_START, /* 1039 */
|
||||
XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */
|
||||
XML_RNGP_HREF_ERROR, /* 1041 */
|
||||
XML_RNGP_INCLUDE_EMPTY, /* 1042 */
|
||||
XML_RNGP_INCLUDE_FAILURE, /* 1043 */
|
||||
XML_RNGP_INCLUDE_RECURSE, /* 1044 */
|
||||
XML_RNGP_INTERLEAVE_ADD, /* 1045 */
|
||||
XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */
|
||||
XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */
|
||||
XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */
|
||||
XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */
|
||||
XML_RNGP_INVALID_URI, /* 1050 */
|
||||
XML_RNGP_INVALID_VALUE, /* 1051 */
|
||||
XML_RNGP_MISSING_HREF, /* 1052 */
|
||||
XML_RNGP_NAME_MISSING, /* 1053 */
|
||||
XML_RNGP_NEED_COMBINE, /* 1054 */
|
||||
XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */
|
||||
XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */
|
||||
XML_RNGP_NSNAME_NO_NS, /* 1057 */
|
||||
XML_RNGP_PARAM_FORBIDDEN, /* 1058 */
|
||||
XML_RNGP_PARAM_NAME_MISSING, /* 1059 */
|
||||
XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */
|
||||
XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */
|
||||
XML_RNGP_PARENTREF_NO_NAME, /* 1062 */
|
||||
XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */
|
||||
XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */
|
||||
XML_RNGP_PARSE_ERROR, /* 1065 */
|
||||
XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */
|
||||
XML_RNGP_PAT_ATTR_ATTR, /* 1067 */
|
||||
XML_RNGP_PAT_ATTR_ELEM, /* 1068 */
|
||||
XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */
|
||||
XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */
|
||||
XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */
|
||||
XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */
|
||||
XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */
|
||||
XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */
|
||||
XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */
|
||||
XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */
|
||||
XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */
|
||||
XML_RNGP_PAT_LIST_ATTR, /* 1078 */
|
||||
XML_RNGP_PAT_LIST_ELEM, /* 1079 */
|
||||
XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */
|
||||
XML_RNGP_PAT_LIST_LIST, /* 1081 */
|
||||
XML_RNGP_PAT_LIST_REF, /* 1082 */
|
||||
XML_RNGP_PAT_LIST_TEXT, /* 1083 */
|
||||
XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */
|
||||
XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */
|
||||
XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */
|
||||
XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */
|
||||
XML_RNGP_PAT_START_ATTR, /* 1088 */
|
||||
XML_RNGP_PAT_START_DATA, /* 1089 */
|
||||
XML_RNGP_PAT_START_EMPTY, /* 1090 */
|
||||
XML_RNGP_PAT_START_GROUP, /* 1091 */
|
||||
XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */
|
||||
XML_RNGP_PAT_START_LIST, /* 1093 */
|
||||
XML_RNGP_PAT_START_ONEMORE, /* 1094 */
|
||||
XML_RNGP_PAT_START_TEXT, /* 1095 */
|
||||
XML_RNGP_PAT_START_VALUE, /* 1096 */
|
||||
XML_RNGP_PREFIX_UNDEFINED, /* 1097 */
|
||||
XML_RNGP_REF_CREATE_FAILED, /* 1098 */
|
||||
XML_RNGP_REF_CYCLE, /* 1099 */
|
||||
XML_RNGP_REF_NAME_INVALID, /* 1100 */
|
||||
XML_RNGP_REF_NO_DEF, /* 1101 */
|
||||
XML_RNGP_REF_NO_NAME, /* 1102 */
|
||||
XML_RNGP_REF_NOT_EMPTY, /* 1103 */
|
||||
XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */
|
||||
XML_RNGP_START_CONTENT, /* 1105 */
|
||||
XML_RNGP_START_EMPTY, /* 1106 */
|
||||
XML_RNGP_START_MISSING, /* 1107 */
|
||||
XML_RNGP_TEXT_EXPECTED, /* 1108 */
|
||||
XML_RNGP_TEXT_HAS_CHILD, /* 1109 */
|
||||
XML_RNGP_TYPE_MISSING, /* 1110 */
|
||||
XML_RNGP_TYPE_NOT_FOUND, /* 1111 */
|
||||
XML_RNGP_TYPE_VALUE, /* 1112 */
|
||||
XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */
|
||||
XML_RNGP_UNKNOWN_COMBINE, /* 1114 */
|
||||
XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */
|
||||
XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */
|
||||
XML_RNGP_URI_FRAGMENT, /* 1117 */
|
||||
XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */
|
||||
XML_RNGP_VALUE_EMPTY, /* 1119 */
|
||||
XML_RNGP_VALUE_NO_CONTENT, /* 1120 */
|
||||
XML_RNGP_XMLNS_NAME, /* 1121 */
|
||||
XML_RNGP_XML_NS, /* 1122 */
|
||||
XML_XPATH_EXPRESSION_OK = 1200,
|
||||
XML_XPATH_NUMBER_ERROR, /* 1201 */
|
||||
XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */
|
||||
XML_XPATH_START_LITERAL_ERROR, /* 1203 */
|
||||
XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */
|
||||
XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */
|
||||
XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */
|
||||
XML_XPATH_EXPR_ERROR, /* 1207 */
|
||||
XML_XPATH_UNCLOSED_ERROR, /* 1208 */
|
||||
XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */
|
||||
XML_XPATH_INVALID_OPERAND, /* 1210 */
|
||||
XML_XPATH_INVALID_TYPE, /* 1211 */
|
||||
XML_XPATH_INVALID_ARITY, /* 1212 */
|
||||
XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */
|
||||
XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */
|
||||
XML_XPATH_MEMORY_ERROR, /* 1215 */
|
||||
XML_XPTR_SYNTAX_ERROR, /* 1216 */
|
||||
XML_XPTR_RESOURCE_ERROR, /* 1217 */
|
||||
XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */
|
||||
XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */
|
||||
XML_XPATH_ENCODING_ERROR, /* 1220 */
|
||||
XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */
|
||||
XML_TREE_INVALID_HEX = 1300,
|
||||
XML_TREE_INVALID_DEC, /* 1301 */
|
||||
XML_TREE_UNTERMINATED_ENTITY, /* 1302 */
|
||||
XML_TREE_NOT_UTF8, /* 1303 */
|
||||
XML_SAVE_NOT_UTF8 = 1400,
|
||||
XML_SAVE_CHAR_INVALID, /* 1401 */
|
||||
XML_SAVE_NO_DOCTYPE, /* 1402 */
|
||||
XML_SAVE_UNKNOWN_ENCODING, /* 1403 */
|
||||
XML_REGEXP_COMPILE_ERROR = 1450,
|
||||
XML_IO_UNKNOWN = 1500,
|
||||
XML_IO_EACCES, /* 1501 */
|
||||
XML_IO_EAGAIN, /* 1502 */
|
||||
XML_IO_EBADF, /* 1503 */
|
||||
XML_IO_EBADMSG, /* 1504 */
|
||||
XML_IO_EBUSY, /* 1505 */
|
||||
XML_IO_ECANCELED, /* 1506 */
|
||||
XML_IO_ECHILD, /* 1507 */
|
||||
XML_IO_EDEADLK, /* 1508 */
|
||||
XML_IO_EDOM, /* 1509 */
|
||||
XML_IO_EEXIST, /* 1510 */
|
||||
XML_IO_EFAULT, /* 1511 */
|
||||
XML_IO_EFBIG, /* 1512 */
|
||||
XML_IO_EINPROGRESS, /* 1513 */
|
||||
XML_IO_EINTR, /* 1514 */
|
||||
XML_IO_EINVAL, /* 1515 */
|
||||
XML_IO_EIO, /* 1516 */
|
||||
XML_IO_EISDIR, /* 1517 */
|
||||
XML_IO_EMFILE, /* 1518 */
|
||||
XML_IO_EMLINK, /* 1519 */
|
||||
XML_IO_EMSGSIZE, /* 1520 */
|
||||
XML_IO_ENAMETOOLONG, /* 1521 */
|
||||
XML_IO_ENFILE, /* 1522 */
|
||||
XML_IO_ENODEV, /* 1523 */
|
||||
XML_IO_ENOENT, /* 1524 */
|
||||
XML_IO_ENOEXEC, /* 1525 */
|
||||
XML_IO_ENOLCK, /* 1526 */
|
||||
XML_IO_ENOMEM, /* 1527 */
|
||||
XML_IO_ENOSPC, /* 1528 */
|
||||
XML_IO_ENOSYS, /* 1529 */
|
||||
XML_IO_ENOTDIR, /* 1530 */
|
||||
XML_IO_ENOTEMPTY, /* 1531 */
|
||||
XML_IO_ENOTSUP, /* 1532 */
|
||||
XML_IO_ENOTTY, /* 1533 */
|
||||
XML_IO_ENXIO, /* 1534 */
|
||||
XML_IO_EPERM, /* 1535 */
|
||||
XML_IO_EPIPE, /* 1536 */
|
||||
XML_IO_ERANGE, /* 1537 */
|
||||
XML_IO_EROFS, /* 1538 */
|
||||
XML_IO_ESPIPE, /* 1539 */
|
||||
XML_IO_ESRCH, /* 1540 */
|
||||
XML_IO_ETIMEDOUT, /* 1541 */
|
||||
XML_IO_EXDEV, /* 1542 */
|
||||
XML_IO_NETWORK_ATTEMPT, /* 1543 */
|
||||
XML_IO_ENCODER, /* 1544 */
|
||||
XML_IO_FLUSH, /* 1545 */
|
||||
XML_IO_WRITE, /* 1546 */
|
||||
XML_IO_NO_INPUT, /* 1547 */
|
||||
XML_IO_BUFFER_FULL, /* 1548 */
|
||||
XML_IO_LOAD_ERROR, /* 1549 */
|
||||
XML_IO_ENOTSOCK, /* 1550 */
|
||||
XML_IO_EISCONN, /* 1551 */
|
||||
XML_IO_ECONNREFUSED, /* 1552 */
|
||||
XML_IO_ENETUNREACH, /* 1553 */
|
||||
XML_IO_EADDRINUSE, /* 1554 */
|
||||
XML_IO_EALREADY, /* 1555 */
|
||||
XML_IO_EAFNOSUPPORT, /* 1556 */
|
||||
XML_XINCLUDE_RECURSION=1600,
|
||||
XML_XINCLUDE_PARSE_VALUE, /* 1601 */
|
||||
XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
|
||||
XML_XINCLUDE_NO_HREF, /* 1603 */
|
||||
XML_XINCLUDE_NO_FALLBACK, /* 1604 */
|
||||
XML_XINCLUDE_HREF_URI, /* 1605 */
|
||||
XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */
|
||||
XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */
|
||||
XML_XINCLUDE_INVALID_CHAR, /* 1608 */
|
||||
XML_XINCLUDE_BUILD_FAILED, /* 1609 */
|
||||
XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */
|
||||
XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */
|
||||
XML_XINCLUDE_XPTR_FAILED, /* 1612 */
|
||||
XML_XINCLUDE_XPTR_RESULT, /* 1613 */
|
||||
XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */
|
||||
XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */
|
||||
XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */
|
||||
XML_XINCLUDE_DEPRECATED_NS, /* 1617 */
|
||||
XML_XINCLUDE_FRAGMENT_ID, /* 1618 */
|
||||
XML_CATALOG_MISSING_ATTR = 1650,
|
||||
XML_CATALOG_ENTRY_BROKEN, /* 1651 */
|
||||
XML_CATALOG_PREFER_VALUE, /* 1652 */
|
||||
XML_CATALOG_NOT_CATALOG, /* 1653 */
|
||||
XML_CATALOG_RECURSION, /* 1654 */
|
||||
XML_SCHEMAP_PREFIX_UNDEFINED = 1700,
|
||||
XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */
|
||||
XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */
|
||||
XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */
|
||||
XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */
|
||||
XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */
|
||||
XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */
|
||||
XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */
|
||||
XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */
|
||||
XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */
|
||||
XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */
|
||||
XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */
|
||||
XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */
|
||||
XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */
|
||||
XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */
|
||||
XML_SCHEMAP_INVALID_ENUM, /* 1715 */
|
||||
XML_SCHEMAP_INVALID_FACET, /* 1716 */
|
||||
XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */
|
||||
XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */
|
||||
XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */
|
||||
XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */
|
||||
XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */
|
||||
XML_SCHEMAP_NOATTR_NOREF, /* 1722 */
|
||||
XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */
|
||||
XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */
|
||||
XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */
|
||||
XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */
|
||||
XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */
|
||||
XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */
|
||||
XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */
|
||||
XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */
|
||||
XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */
|
||||
XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */
|
||||
XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */
|
||||
XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */
|
||||
XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */
|
||||
XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */
|
||||
XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */
|
||||
XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */
|
||||
XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */
|
||||
XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */
|
||||
XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */
|
||||
XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */
|
||||
XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */
|
||||
XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */
|
||||
XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */
|
||||
XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */
|
||||
XML_SCHEMAP_UNKNOWN_REF, /* 1747 */
|
||||
XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */
|
||||
XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */
|
||||
XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */
|
||||
XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */
|
||||
XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */
|
||||
XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */
|
||||
XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */
|
||||
XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */
|
||||
XML_SCHEMAP_REGEXP_INVALID, /* 1756 */
|
||||
XML_SCHEMAP_FAILED_LOAD, /* 1757 */
|
||||
XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */
|
||||
XML_SCHEMAP_NOROOT, /* 1759 */
|
||||
XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */
|
||||
XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */
|
||||
XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */
|
||||
XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */
|
||||
XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */
|
||||
XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */
|
||||
XML_SCHEMAP_FAILED_PARSE, /* 1766 */
|
||||
XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */
|
||||
XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */
|
||||
XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */
|
||||
XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */
|
||||
XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */
|
||||
XML_SCHEMAP_NOT_SCHEMA, /* 1772 */
|
||||
XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */
|
||||
XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */
|
||||
XML_SCHEMAP_RECURSIVE, /* 1775 */
|
||||
XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */
|
||||
XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */
|
||||
XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */
|
||||
XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */
|
||||
XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */
|
||||
XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */
|
||||
XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */
|
||||
XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */
|
||||
XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */
|
||||
XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */
|
||||
XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */
|
||||
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */
|
||||
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */
|
||||
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */
|
||||
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */
|
||||
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */
|
||||
XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */
|
||||
XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */
|
||||
XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */
|
||||
XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */
|
||||
XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */
|
||||
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */
|
||||
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */
|
||||
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */
|
||||
XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */
|
||||
XML_SCHEMAV_NOROOT = 1801,
|
||||
XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */
|
||||
XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */
|
||||
XML_SCHEMAV_MISSING, /* 1804 */
|
||||
XML_SCHEMAV_WRONGELEM, /* 1805 */
|
||||
XML_SCHEMAV_NOTYPE, /* 1806 */
|
||||
XML_SCHEMAV_NOROLLBACK, /* 1807 */
|
||||
XML_SCHEMAV_ISABSTRACT, /* 1808 */
|
||||
XML_SCHEMAV_NOTEMPTY, /* 1809 */
|
||||
XML_SCHEMAV_ELEMCONT, /* 1810 */
|
||||
XML_SCHEMAV_HAVEDEFAULT, /* 1811 */
|
||||
XML_SCHEMAV_NOTNILLABLE, /* 1812 */
|
||||
XML_SCHEMAV_EXTRACONTENT, /* 1813 */
|
||||
XML_SCHEMAV_INVALIDATTR, /* 1814 */
|
||||
XML_SCHEMAV_INVALIDELEM, /* 1815 */
|
||||
XML_SCHEMAV_NOTDETERMINIST, /* 1816 */
|
||||
XML_SCHEMAV_CONSTRUCT, /* 1817 */
|
||||
XML_SCHEMAV_INTERNAL, /* 1818 */
|
||||
XML_SCHEMAV_NOTSIMPLE, /* 1819 */
|
||||
XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */
|
||||
XML_SCHEMAV_ATTRINVALID, /* 1821 */
|
||||
XML_SCHEMAV_VALUE, /* 1822 */
|
||||
XML_SCHEMAV_FACET, /* 1823 */
|
||||
XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */
|
||||
XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */
|
||||
XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */
|
||||
XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */
|
||||
XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */
|
||||
XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */
|
||||
XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */
|
||||
XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */
|
||||
XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */
|
||||
XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */
|
||||
XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */
|
||||
XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */
|
||||
XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */
|
||||
XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */
|
||||
XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */
|
||||
XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */
|
||||
XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */
|
||||
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */
|
||||
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */
|
||||
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */
|
||||
XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */
|
||||
XML_SCHEMAV_CVC_ELT_1, /* 1845 */
|
||||
XML_SCHEMAV_CVC_ELT_2, /* 1846 */
|
||||
XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */
|
||||
XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */
|
||||
XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */
|
||||
XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */
|
||||
XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */
|
||||
XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */
|
||||
XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */
|
||||
XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */
|
||||
XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */
|
||||
XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */
|
||||
XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */
|
||||
XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */
|
||||
XML_SCHEMAV_CVC_ELT_6, /* 1859 */
|
||||
XML_SCHEMAV_CVC_ELT_7, /* 1860 */
|
||||
XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */
|
||||
XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */
|
||||
XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */
|
||||
XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */
|
||||
XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */
|
||||
XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */
|
||||
XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */
|
||||
XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */
|
||||
XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */
|
||||
XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */
|
||||
XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */
|
||||
XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */
|
||||
XML_SCHEMAV_CVC_COMPLEX_TYPE_1, /* 1873 */
|
||||
XML_SCHEMAV_CVC_AU, /* 1874 */
|
||||
XML_SCHEMAV_CVC_TYPE_1, /* 1875 */
|
||||
XML_SCHEMAV_CVC_TYPE_2, /* 1876 */
|
||||
XML_SCHEMAV_CVC_IDC, /* 1877 */
|
||||
XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
|
||||
XML_SCHEMAV_MISC, /* 1879 */
|
||||
XML_XPTR_UNKNOWN_SCHEME = 1900,
|
||||
XML_XPTR_CHILDSEQ_START, /* 1901 */
|
||||
XML_XPTR_EVAL_FAILED, /* 1902 */
|
||||
XML_XPTR_EXTRA_OBJECTS, /* 1903 */
|
||||
XML_C14N_CREATE_CTXT = 1950,
|
||||
XML_C14N_REQUIRES_UTF8, /* 1951 */
|
||||
XML_C14N_CREATE_STACK, /* 1952 */
|
||||
XML_C14N_INVALID_NODE, /* 1953 */
|
||||
XML_C14N_UNKNOW_NODE, /* 1954 */
|
||||
XML_C14N_RELATIVE_NAMESPACE, /* 1955 */
|
||||
XML_FTP_PASV_ANSWER = 2000,
|
||||
XML_FTP_EPSV_ANSWER, /* 2001 */
|
||||
XML_FTP_ACCNT, /* 2002 */
|
||||
XML_FTP_URL_SYNTAX, /* 2003 */
|
||||
XML_HTTP_URL_SYNTAX = 2020,
|
||||
XML_HTTP_USE_IP, /* 2021 */
|
||||
XML_HTTP_UNKNOWN_HOST, /* 2022 */
|
||||
XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000,
|
||||
XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */
|
||||
XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */
|
||||
XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */
|
||||
XML_SCHEMAP_SRC_RESOLVE, /* 3004 */
|
||||
XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */
|
||||
XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */
|
||||
XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */
|
||||
XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */
|
||||
XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */
|
||||
XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, /* 3016 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, /* 3017 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, /* 3018 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, /* 3019 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, /* 3020 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, /* 3021 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, /* 3022 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_3_1, /* 3023 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, /* 3024 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, /* 3025 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, /* 3026 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, /* 3027 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */
|
||||
XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */
|
||||
XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */
|
||||
XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */
|
||||
XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */
|
||||
XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */
|
||||
XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, /* 3035 */
|
||||
XML_SCHEMAP_S4S_ATTR_MISSING, /* 3036 */
|
||||
XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, /* 3037 */
|
||||
XML_SCHEMAP_SRC_ELEMENT_1, /* 3038 */
|
||||
XML_SCHEMAP_SRC_ELEMENT_2_1, /* 3039 */
|
||||
XML_SCHEMAP_SRC_ELEMENT_2_2, /* 3040 */
|
||||
XML_SCHEMAP_SRC_ELEMENT_3, /* 3041 */
|
||||
XML_SCHEMAP_P_PROPS_CORRECT_1, /* 3042 */
|
||||
XML_SCHEMAP_P_PROPS_CORRECT_2_1, /* 3043 */
|
||||
XML_SCHEMAP_P_PROPS_CORRECT_2_2, /* 3044 */
|
||||
XML_SCHEMAP_E_PROPS_CORRECT_2, /* 3045 */
|
||||
XML_SCHEMAP_E_PROPS_CORRECT_3, /* 3046 */
|
||||
XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */
|
||||
XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */
|
||||
XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */
|
||||
XML_SCHEMAP_SRC_INCLUDE, /* 3050 */
|
||||
XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */
|
||||
XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */
|
||||
XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */
|
||||
XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */
|
||||
XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */
|
||||
XML_SCHEMAP_NO_XMLNS, /* 3056 */
|
||||
XML_SCHEMAP_NO_XSI, /* 3057 */
|
||||
XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */
|
||||
XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */
|
||||
XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */
|
||||
XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, /* 3061 */
|
||||
XML_SCHEMAP_CVC_SIMPLE_TYPE, /* 3062 */
|
||||
XML_SCHEMAP_COS_CT_EXTENDS_1_1, /* 3063 */
|
||||
XML_SCHEMAP_SRC_IMPORT_1_1, /* 3064 */
|
||||
XML_SCHEMAP_SRC_IMPORT_1_2, /* 3065 */
|
||||
XML_SCHEMAP_SRC_IMPORT_2, /* 3066 */
|
||||
XML_SCHEMAP_SRC_IMPORT_2_1, /* 3067 */
|
||||
XML_SCHEMAP_SRC_IMPORT_2_2, /* 3068 */
|
||||
XML_SCHEMAP_INTERNAL, /* 3069 non-W3C */
|
||||
XML_SCHEMAP_NOT_DETERMINISTIC, /* 3070 non-W3C */
|
||||
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, /* 3071 */
|
||||
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, /* 3072 */
|
||||
XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, /* 3073 */
|
||||
XML_SCHEMAP_MG_PROPS_CORRECT_1, /* 3074 */
|
||||
XML_SCHEMAP_MG_PROPS_CORRECT_2, /* 3075 */
|
||||
XML_SCHEMAP_SRC_CT_1, /* 3076 */
|
||||
XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */
|
||||
XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */
|
||||
XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */
|
||||
XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */
|
||||
XML_SCHEMAP_SRC_REDEFINE, /* 3081 */
|
||||
XML_SCHEMAP_SRC_IMPORT, /* 3082 */
|
||||
XML_SCHEMAP_WARN_SKIP_SCHEMA, /* 3083 */
|
||||
XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */
|
||||
XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */
|
||||
XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */
|
||||
XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */
|
||||
XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */
|
||||
XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */
|
||||
XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */
|
||||
XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */
|
||||
XML_SCHEMATRONV_ASSERT = 4000, /* 4000 */
|
||||
XML_SCHEMATRONV_REPORT,
|
||||
XML_MODULE_OPEN = 4900, /* 4900 */
|
||||
XML_MODULE_CLOSE, /* 4901 */
|
||||
XML_CHECK_FOUND_ELEMENT = 5000,
|
||||
XML_CHECK_FOUND_ATTRIBUTE, /* 5001 */
|
||||
XML_CHECK_FOUND_TEXT, /* 5002 */
|
||||
XML_CHECK_FOUND_CDATA, /* 5003 */
|
||||
XML_CHECK_FOUND_ENTITYREF, /* 5004 */
|
||||
XML_CHECK_FOUND_ENTITY, /* 5005 */
|
||||
XML_CHECK_FOUND_PI, /* 5006 */
|
||||
XML_CHECK_FOUND_COMMENT, /* 5007 */
|
||||
XML_CHECK_FOUND_DOCTYPE, /* 5008 */
|
||||
XML_CHECK_FOUND_FRAGMENT, /* 5009 */
|
||||
XML_CHECK_FOUND_NOTATION, /* 5010 */
|
||||
XML_CHECK_UNKNOWN_NODE, /* 5011 */
|
||||
XML_CHECK_ENTITY_TYPE, /* 5012 */
|
||||
XML_CHECK_NO_PARENT, /* 5013 */
|
||||
XML_CHECK_NO_DOC, /* 5014 */
|
||||
XML_CHECK_NO_NAME, /* 5015 */
|
||||
XML_CHECK_NO_ELEM, /* 5016 */
|
||||
XML_CHECK_WRONG_DOC, /* 5017 */
|
||||
XML_CHECK_NO_PREV, /* 5018 */
|
||||
XML_CHECK_WRONG_PREV, /* 5019 */
|
||||
XML_CHECK_NO_NEXT, /* 5020 */
|
||||
XML_CHECK_WRONG_NEXT, /* 5021 */
|
||||
XML_CHECK_NOT_DTD, /* 5022 */
|
||||
XML_CHECK_NOT_ATTR, /* 5023 */
|
||||
XML_CHECK_NOT_ATTR_DECL, /* 5024 */
|
||||
XML_CHECK_NOT_ELEM_DECL, /* 5025 */
|
||||
XML_CHECK_NOT_ENTITY_DECL, /* 5026 */
|
||||
XML_CHECK_NOT_NS_DECL, /* 5027 */
|
||||
XML_CHECK_NO_HREF, /* 5028 */
|
||||
XML_CHECK_WRONG_PARENT,/* 5029 */
|
||||
XML_CHECK_NS_SCOPE, /* 5030 */
|
||||
XML_CHECK_NS_ANCESTOR, /* 5031 */
|
||||
XML_CHECK_NOT_UTF8, /* 5032 */
|
||||
XML_CHECK_NO_DICT, /* 5033 */
|
||||
XML_CHECK_NOT_NCNAME, /* 5034 */
|
||||
XML_CHECK_OUTSIDE_DICT, /* 5035 */
|
||||
XML_CHECK_WRONG_NAME, /* 5036 */
|
||||
XML_CHECK_NAME_NOT_NULL, /* 5037 */
|
||||
XML_I18N_NO_NAME = 6000,
|
||||
XML_I18N_NO_HANDLER, /* 6001 */
|
||||
XML_I18N_EXCESS_HANDLER, /* 6002 */
|
||||
XML_I18N_CONV_FAILED, /* 6003 */
|
||||
XML_I18N_NO_OUTPUT, /* 6004 */
|
||||
XML_BUF_OVERFLOW = 7000
|
||||
} xmlParserErrors;
|
||||
|
||||
/**
|
||||
* xmlGenericErrorFunc:
|
||||
* @ctx: a parsing context
|
||||
* @msg: the message
|
||||
* @...: the extra arguments of the varags to format the message
|
||||
*
|
||||
* Signature of the function to use when there is an error and
|
||||
* no parsing or validity context available .
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
/**
|
||||
* xmlStructuredErrorFunc:
|
||||
* @userData: user provided data for the error callback
|
||||
* @error: the error being raised.
|
||||
*
|
||||
* Signature of the function to use when there is an error and
|
||||
* the module handles the new error reporting mechanism.
|
||||
*/
|
||||
typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
|
||||
|
||||
/*
|
||||
* Use the following function to reset the two global variables
|
||||
* xmlGenericError and xmlGenericErrorContext.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSetGenericErrorFunc (void *ctx,
|
||||
xmlGenericErrorFunc handler);
|
||||
XMLPUBFUN void XMLCALL
|
||||
initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSetStructuredErrorFunc (void *ctx,
|
||||
xmlStructuredErrorFunc handler);
|
||||
/*
|
||||
* Default message routines used by SAX and Valid context for error
|
||||
* and warning reporting.
|
||||
*/
|
||||
XMLPUBFUN void XMLCDECL
|
||||
xmlParserError (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN void XMLCDECL
|
||||
xmlParserWarning (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN void XMLCDECL
|
||||
xmlParserValidityError (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN void XMLCDECL
|
||||
xmlParserValidityWarning (void *ctx,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParserPrintFileInfo (xmlParserInputPtr input);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlParserPrintFileContext (xmlParserInputPtr input);
|
||||
|
||||
/*
|
||||
* Extended error information routines
|
||||
*/
|
||||
XMLPUBFUN xmlErrorPtr XMLCALL
|
||||
xmlGetLastError (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlResetLastError (void);
|
||||
XMLPUBFUN xmlErrorPtr XMLCALL
|
||||
xmlCtxtGetLastError (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCtxtResetLastError (void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlResetError (xmlErrorPtr err);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCopyError (xmlErrorPtr from,
|
||||
xmlErrorPtr to);
|
||||
|
||||
#ifdef IN_LIBXML
|
||||
/*
|
||||
* Internal callback reporting routine
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
__xmlRaiseError (xmlStructuredErrorFunc schannel,
|
||||
xmlGenericErrorFunc channel,
|
||||
void *data,
|
||||
void *ctx,
|
||||
void *node,
|
||||
int domain,
|
||||
int code,
|
||||
xmlErrorLevel level,
|
||||
const char *file,
|
||||
int line,
|
||||
const char *str1,
|
||||
const char *str2,
|
||||
const char *str3,
|
||||
int int1,
|
||||
int col,
|
||||
const char *msg,
|
||||
...) LIBXML_ATTR_FORMAT(16,17);
|
||||
XMLPUBFUN void XMLCALL
|
||||
__xmlSimpleError (int domain,
|
||||
int code,
|
||||
xmlNodePtr node,
|
||||
const char *msg,
|
||||
const char *extra);
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_ERROR_H__ */
|
||||
162
cache/include/libxml/xmlexports.h
vendored
162
cache/include/libxml/xmlexports.h
vendored
@@ -1,162 +0,0 @@
|
||||
/*
|
||||
* Summary: macros for marking symbols as exportable/importable.
|
||||
* Description: macros for marking symbols as exportable/importable.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Igor Zlatovic <igor@zlatkovic.com>
|
||||
*/
|
||||
|
||||
#ifndef __XML_EXPORTS_H__
|
||||
#define __XML_EXPORTS_H__
|
||||
|
||||
/**
|
||||
* XMLPUBFUN, XMLPUBVAR, XMLCALL
|
||||
*
|
||||
* Macros which declare an exportable function, an exportable variable and
|
||||
* the calling convention used for functions.
|
||||
*
|
||||
* Please use an extra block for every platform/compiler combination when
|
||||
* modifying this, rather than overlong #ifdef lines. This helps
|
||||
* readability as well as the fact that different compilers on the same
|
||||
* platform might need different definitions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* XMLPUBFUN:
|
||||
*
|
||||
* Macros which declare an exportable function
|
||||
*/
|
||||
#define XMLPUBFUN
|
||||
/**
|
||||
* XMLPUBVAR:
|
||||
*
|
||||
* Macros which declare an exportable variable
|
||||
*/
|
||||
#define XMLPUBVAR extern
|
||||
/**
|
||||
* XMLCALL:
|
||||
*
|
||||
* Macros which declare the called convention for exported functions
|
||||
*/
|
||||
#define XMLCALL
|
||||
/**
|
||||
* XMLCDECL:
|
||||
*
|
||||
* Macro which declares the calling convention for exported functions that
|
||||
* use '...'.
|
||||
*/
|
||||
#define XMLCDECL
|
||||
|
||||
/** DOC_DISABLE */
|
||||
|
||||
/* Windows platform with MS compiler */
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
#undef XMLPUBFUN
|
||||
#undef XMLPUBVAR
|
||||
#undef XMLCALL
|
||||
#undef XMLCDECL
|
||||
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
||||
#define XMLPUBFUN __declspec(dllexport)
|
||||
#define XMLPUBVAR __declspec(dllexport)
|
||||
#else
|
||||
#define XMLPUBFUN
|
||||
#if !defined(LIBXML_STATIC)
|
||||
#define XMLPUBVAR __declspec(dllimport) extern
|
||||
#else
|
||||
#define XMLPUBVAR extern
|
||||
#endif
|
||||
#endif
|
||||
#if defined(LIBXML_FASTCALL)
|
||||
#define XMLCALL __fastcall
|
||||
#else
|
||||
#define XMLCALL __cdecl
|
||||
#endif
|
||||
#define XMLCDECL __cdecl
|
||||
#if !defined _REENTRANT
|
||||
#define _REENTRANT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Windows platform with Borland compiler */
|
||||
#if defined(_WIN32) && defined(__BORLANDC__)
|
||||
#undef XMLPUBFUN
|
||||
#undef XMLPUBVAR
|
||||
#undef XMLCALL
|
||||
#undef XMLCDECL
|
||||
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
||||
#define XMLPUBFUN __declspec(dllexport)
|
||||
#define XMLPUBVAR __declspec(dllexport) extern
|
||||
#else
|
||||
#define XMLPUBFUN
|
||||
#if !defined(LIBXML_STATIC)
|
||||
#define XMLPUBVAR __declspec(dllimport) extern
|
||||
#else
|
||||
#define XMLPUBVAR extern
|
||||
#endif
|
||||
#endif
|
||||
#define XMLCALL __cdecl
|
||||
#define XMLCDECL __cdecl
|
||||
#if !defined _REENTRANT
|
||||
#define _REENTRANT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Windows platform with GNU compiler (Mingw) */
|
||||
#if defined(_WIN32) && defined(__MINGW32__)
|
||||
#undef XMLPUBFUN
|
||||
#undef XMLPUBVAR
|
||||
#undef XMLCALL
|
||||
#undef XMLCDECL
|
||||
/*
|
||||
* if defined(IN_LIBXML) this raises problems on mingw with msys
|
||||
* _imp__xmlFree listed as missing. Try to workaround the problem
|
||||
* by also making that declaration when compiling client code.
|
||||
*/
|
||||
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
||||
#define XMLPUBFUN __declspec(dllexport)
|
||||
#define XMLPUBVAR __declspec(dllexport) extern
|
||||
#else
|
||||
#define XMLPUBFUN
|
||||
#if !defined(LIBXML_STATIC)
|
||||
#define XMLPUBVAR __declspec(dllimport) extern
|
||||
#else
|
||||
#define XMLPUBVAR extern
|
||||
#endif
|
||||
#endif
|
||||
#define XMLCALL __cdecl
|
||||
#define XMLCDECL __cdecl
|
||||
#if !defined _REENTRANT
|
||||
#define _REENTRANT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Cygwin platform, GNU compiler */
|
||||
#if defined(_WIN32) && defined(__CYGWIN__)
|
||||
#undef XMLPUBFUN
|
||||
#undef XMLPUBVAR
|
||||
#undef XMLCALL
|
||||
#undef XMLCDECL
|
||||
#if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
|
||||
#define XMLPUBFUN __declspec(dllexport)
|
||||
#define XMLPUBVAR __declspec(dllexport)
|
||||
#else
|
||||
#define XMLPUBFUN
|
||||
#if !defined(LIBXML_STATIC)
|
||||
#define XMLPUBVAR __declspec(dllimport) extern
|
||||
#else
|
||||
#define XMLPUBVAR
|
||||
#endif
|
||||
#endif
|
||||
#define XMLCALL __cdecl
|
||||
#define XMLCDECL __cdecl
|
||||
#endif
|
||||
|
||||
/* Compatibility */
|
||||
#if !defined(LIBXML_DLL_IMPORT)
|
||||
#define LIBXML_DLL_IMPORT XMLPUBVAR
|
||||
#endif
|
||||
|
||||
#endif /* __XML_EXPORTS_H__ */
|
||||
|
||||
|
||||
224
cache/include/libxml/xmlmemory.h
vendored
224
cache/include/libxml/xmlmemory.h
vendored
@@ -1,224 +0,0 @@
|
||||
/*
|
||||
* Summary: interface for the memory allocator
|
||||
* Description: provides interfaces for the memory allocator,
|
||||
* including debugging capabilities.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __DEBUG_MEMORY_ALLOC__
|
||||
#define __DEBUG_MEMORY_ALLOC__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
/**
|
||||
* DEBUG_MEMORY:
|
||||
*
|
||||
* DEBUG_MEMORY replaces the allocator with a collect and debug
|
||||
* shell to the libc allocator.
|
||||
* DEBUG_MEMORY should only be activated when debugging
|
||||
* libxml i.e. if libxml has been configured with --with-debug-mem too.
|
||||
*/
|
||||
/* #define DEBUG_MEMORY_FREED */
|
||||
/* #define DEBUG_MEMORY_LOCATION */
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifndef DEBUG_MEMORY
|
||||
#define DEBUG_MEMORY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* DEBUG_MEMORY_LOCATION:
|
||||
*
|
||||
* DEBUG_MEMORY_LOCATION should be activated only when debugging
|
||||
* libxml i.e. if libxml has been configured with --with-debug-mem too.
|
||||
*/
|
||||
#ifdef DEBUG_MEMORY_LOCATION
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The XML memory wrapper support 4 basic overloadable functions.
|
||||
*/
|
||||
/**
|
||||
* xmlFreeFunc:
|
||||
* @mem: an already allocated block of memory
|
||||
*
|
||||
* Signature for a free() implementation.
|
||||
*/
|
||||
typedef void (XMLCALL *xmlFreeFunc)(void *mem);
|
||||
/**
|
||||
* xmlMallocFunc:
|
||||
* @size: the size requested in bytes
|
||||
*
|
||||
* Signature for a malloc() implementation.
|
||||
*
|
||||
* Returns a pointer to the newly allocated block or NULL in case of error.
|
||||
*/
|
||||
typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
|
||||
|
||||
/**
|
||||
* xmlReallocFunc:
|
||||
* @mem: an already allocated block of memory
|
||||
* @size: the new size requested in bytes
|
||||
*
|
||||
* Signature for a realloc() implementation.
|
||||
*
|
||||
* Returns a pointer to the newly reallocated block or NULL in case of error.
|
||||
*/
|
||||
typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
|
||||
|
||||
/**
|
||||
* xmlStrdupFunc:
|
||||
* @str: a zero terminated string
|
||||
*
|
||||
* Signature for an strdup() implementation.
|
||||
*
|
||||
* Returns the copy of the string or NULL in case of error.
|
||||
*/
|
||||
typedef char *(XMLCALL *xmlStrdupFunc)(const char *str);
|
||||
|
||||
/*
|
||||
* The 4 interfaces used for all memory handling within libxml.
|
||||
LIBXML_DLL_IMPORT xmlFreeFunc xmlFree;
|
||||
LIBXML_DLL_IMPORT xmlMallocFunc xmlMalloc;
|
||||
LIBXML_DLL_IMPORT xmlMallocFunc xmlMallocAtomic;
|
||||
LIBXML_DLL_IMPORT xmlReallocFunc xmlRealloc;
|
||||
LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup;
|
||||
*/
|
||||
|
||||
/*
|
||||
* The way to overload the existing functions.
|
||||
* The xmlGc function have an extra entry for atomic block
|
||||
* allocations useful for garbage collected memory allocators
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlMemSetup (xmlFreeFunc freeFunc,
|
||||
xmlMallocFunc mallocFunc,
|
||||
xmlReallocFunc reallocFunc,
|
||||
xmlStrdupFunc strdupFunc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlMemGet (xmlFreeFunc *freeFunc,
|
||||
xmlMallocFunc *mallocFunc,
|
||||
xmlReallocFunc *reallocFunc,
|
||||
xmlStrdupFunc *strdupFunc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlGcMemSetup (xmlFreeFunc freeFunc,
|
||||
xmlMallocFunc mallocFunc,
|
||||
xmlMallocFunc mallocAtomicFunc,
|
||||
xmlReallocFunc reallocFunc,
|
||||
xmlStrdupFunc strdupFunc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlGcMemGet (xmlFreeFunc *freeFunc,
|
||||
xmlMallocFunc *mallocFunc,
|
||||
xmlMallocFunc *mallocAtomicFunc,
|
||||
xmlReallocFunc *reallocFunc,
|
||||
xmlStrdupFunc *strdupFunc);
|
||||
|
||||
/*
|
||||
* Initialization of the memory layer.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlInitMemory (void);
|
||||
|
||||
/*
|
||||
* Cleanup of the memory layer.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlCleanupMemory (void);
|
||||
/*
|
||||
* These are specific to the XML debug memory wrapper.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlMemUsed (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlMemBlocks (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlMemDisplay (FILE *fp);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlMemDisplayLast(FILE *fp, long nbBytes);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlMemShow (FILE *fp, int nr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlMemoryDump (void);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlMemRealloc (void *ptr,size_t size);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlMemFree (void *ptr);
|
||||
XMLPUBFUN char * XMLCALL
|
||||
xmlMemoryStrdup (const char *str);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
|
||||
XMLPUBFUN char * XMLCALL
|
||||
xmlMemStrdupLoc (const char *str, const char *file, int line);
|
||||
|
||||
|
||||
#ifdef DEBUG_MEMORY_LOCATION
|
||||
/**
|
||||
* xmlMalloc:
|
||||
* @size: number of bytes to allocate
|
||||
*
|
||||
* Wrapper for the malloc() function used in the XML library.
|
||||
*
|
||||
* Returns the pointer to the allocated area or NULL in case of error.
|
||||
*/
|
||||
#define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
|
||||
/**
|
||||
* xmlMallocAtomic:
|
||||
* @size: number of bytes to allocate
|
||||
*
|
||||
* Wrapper for the malloc() function used in the XML library for allocation
|
||||
* of block not containing pointers to other areas.
|
||||
*
|
||||
* Returns the pointer to the allocated area or NULL in case of error.
|
||||
*/
|
||||
#define xmlMallocAtomic(size) xmlMallocAtomicLoc((size), __FILE__, __LINE__)
|
||||
/**
|
||||
* xmlRealloc:
|
||||
* @ptr: pointer to the existing allocated area
|
||||
* @size: number of bytes to allocate
|
||||
*
|
||||
* Wrapper for the realloc() function used in the XML library.
|
||||
*
|
||||
* Returns the pointer to the allocated area or NULL in case of error.
|
||||
*/
|
||||
#define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
|
||||
/**
|
||||
* xmlMemStrdup:
|
||||
* @str: pointer to the existing string
|
||||
*
|
||||
* Wrapper for the strdup() function, xmlStrdup() is usually preferred.
|
||||
*
|
||||
* Returns the pointer to the allocated area or NULL in case of error.
|
||||
*/
|
||||
#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
|
||||
|
||||
#endif /* DEBUG_MEMORY_LOCATION */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifndef __XML_GLOBALS_H
|
||||
#ifndef __XML_THREADS_H__
|
||||
#include <libxml/threads.h>
|
||||
#include <libxml/globals.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __DEBUG_MEMORY_ALLOC__ */
|
||||
|
||||
57
cache/include/libxml/xmlmodule.h
vendored
57
cache/include/libxml/xmlmodule.h
vendored
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Summary: dynamic module loading
|
||||
* Description: basic API for dynamic module loading, used by
|
||||
* libexslt added in 2.6.17
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Joel W. Reed
|
||||
*/
|
||||
|
||||
#ifndef __XML_MODULE_H__
|
||||
#define __XML_MODULE_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_MODULES_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlModulePtr:
|
||||
*
|
||||
* A handle to a dynamically loaded module
|
||||
*/
|
||||
typedef struct _xmlModule xmlModule;
|
||||
typedef xmlModule *xmlModulePtr;
|
||||
|
||||
/**
|
||||
* xmlModuleOption:
|
||||
*
|
||||
* enumeration of options that can be passed down to xmlModuleOpen()
|
||||
*/
|
||||
typedef enum {
|
||||
XML_MODULE_LAZY = 1, /* lazy binding */
|
||||
XML_MODULE_LOCAL= 2 /* local binding */
|
||||
} xmlModuleOption;
|
||||
|
||||
XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module,
|
||||
const char* name,
|
||||
void **result);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_MODULES_ENABLED */
|
||||
|
||||
#endif /*__XML_MODULE_H__ */
|
||||
428
cache/include/libxml/xmlreader.h
vendored
428
cache/include/libxml/xmlreader.h
vendored
@@ -1,428 +0,0 @@
|
||||
/*
|
||||
* Summary: the XMLReader implementation
|
||||
* Description: API of the XML streaming API based on C# interfaces.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_XMLREADER_H__
|
||||
#define __XML_XMLREADER_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xmlIO.h>
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
#include <libxml/relaxng.h>
|
||||
#include <libxml/xmlschemas.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlParserSeverities:
|
||||
*
|
||||
* How severe an error callback is when the per-reader error callback API
|
||||
* is used.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
|
||||
XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
|
||||
XML_PARSER_SEVERITY_WARNING = 3,
|
||||
XML_PARSER_SEVERITY_ERROR = 4
|
||||
} xmlParserSeverities;
|
||||
|
||||
#ifdef LIBXML_READER_ENABLED
|
||||
|
||||
/**
|
||||
* xmlTextReaderMode:
|
||||
*
|
||||
* Internal state values for the reader.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_TEXTREADER_MODE_INITIAL = 0,
|
||||
XML_TEXTREADER_MODE_INTERACTIVE = 1,
|
||||
XML_TEXTREADER_MODE_ERROR = 2,
|
||||
XML_TEXTREADER_MODE_EOF =3,
|
||||
XML_TEXTREADER_MODE_CLOSED = 4,
|
||||
XML_TEXTREADER_MODE_READING = 5
|
||||
} xmlTextReaderMode;
|
||||
|
||||
/**
|
||||
* xmlParserProperties:
|
||||
*
|
||||
* Some common options to use with xmlTextReaderSetParserProp, but it
|
||||
* is better to use xmlParserOption and the xmlReaderNewxxx and
|
||||
* xmlReaderForxxx APIs now.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_PARSER_LOADDTD = 1,
|
||||
XML_PARSER_DEFAULTATTRS = 2,
|
||||
XML_PARSER_VALIDATE = 3,
|
||||
XML_PARSER_SUBST_ENTITIES = 4
|
||||
} xmlParserProperties;
|
||||
|
||||
/**
|
||||
* xmlReaderTypes:
|
||||
*
|
||||
* Predefined constants for the different types of nodes.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_READER_TYPE_NONE = 0,
|
||||
XML_READER_TYPE_ELEMENT = 1,
|
||||
XML_READER_TYPE_ATTRIBUTE = 2,
|
||||
XML_READER_TYPE_TEXT = 3,
|
||||
XML_READER_TYPE_CDATA = 4,
|
||||
XML_READER_TYPE_ENTITY_REFERENCE = 5,
|
||||
XML_READER_TYPE_ENTITY = 6,
|
||||
XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
|
||||
XML_READER_TYPE_COMMENT = 8,
|
||||
XML_READER_TYPE_DOCUMENT = 9,
|
||||
XML_READER_TYPE_DOCUMENT_TYPE = 10,
|
||||
XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
|
||||
XML_READER_TYPE_NOTATION = 12,
|
||||
XML_READER_TYPE_WHITESPACE = 13,
|
||||
XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
|
||||
XML_READER_TYPE_END_ELEMENT = 15,
|
||||
XML_READER_TYPE_END_ENTITY = 16,
|
||||
XML_READER_TYPE_XML_DECLARATION = 17
|
||||
} xmlReaderTypes;
|
||||
|
||||
/**
|
||||
* xmlTextReader:
|
||||
*
|
||||
* Structure for an xmlReader context.
|
||||
*/
|
||||
typedef struct _xmlTextReader xmlTextReader;
|
||||
|
||||
/**
|
||||
* xmlTextReaderPtr:
|
||||
*
|
||||
* Pointer to an xmlReader context.
|
||||
*/
|
||||
typedef xmlTextReader *xmlTextReaderPtr;
|
||||
|
||||
/*
|
||||
* Constructors & Destructor
|
||||
*/
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
xmlNewTextReader (xmlParserInputBufferPtr input,
|
||||
const char *URI);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
xmlNewTextReaderFilename(const char *URI);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlFreeTextReader (xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderSetup(xmlTextReaderPtr reader,
|
||||
xmlParserInputBufferPtr input, const char *URL,
|
||||
const char *encoding, int options);
|
||||
|
||||
/*
|
||||
* Iterators
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderRead (xmlTextReaderPtr reader);
|
||||
|
||||
#ifdef LIBXML_WRITER_ENABLED
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderReadInnerXml(xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderReadOuterXml(xmlTextReaderPtr reader);
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderReadString (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderReadAttributeValue(xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* Attributes of the node
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderDepth (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderHasValue(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderIsDefault (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderNodeType (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderReadState (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlTextReaderConstName (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlTextReaderConstString (xmlTextReaderPtr reader,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlTextReaderConstValue (xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* use the Const version of the routine for
|
||||
* better performance and simpler code
|
||||
*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderBaseUri (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderLocalName (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderName (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderPrefix (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderXmlLang (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderValue (xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* Methods of the XmlTextReader
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderClose (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
|
||||
int no);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
|
||||
const xmlChar *localName,
|
||||
const xmlChar *namespaceURI);
|
||||
XMLPUBFUN xmlParserInputBufferPtr XMLCALL
|
||||
xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
|
||||
int no);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
|
||||
const xmlChar *localName,
|
||||
const xmlChar *namespaceURI);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderNormalization (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* Extensions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
|
||||
int prop,
|
||||
int value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
|
||||
int prop);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
|
||||
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlTextReaderPreserve (xmlTextReaderPtr reader);
|
||||
#ifdef LIBXML_PATTERN_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
|
||||
const xmlChar *pattern,
|
||||
const xmlChar **namespaces);
|
||||
#endif /* LIBXML_PATTERN_ENABLED */
|
||||
XMLPUBFUN xmlDocPtr XMLCALL
|
||||
xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlTextReaderExpand (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderNext (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderNextSibling (xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderIsValid (xmlTextReaderPtr reader);
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
|
||||
const char *rng);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderRelaxNGValidateCtxt(xmlTextReaderPtr reader,
|
||||
xmlRelaxNGValidCtxtPtr ctxt,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
|
||||
xmlRelaxNGPtr schema);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
|
||||
const char *xsd);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
|
||||
xmlSchemaValidCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderSetSchema (xmlTextReaderPtr reader,
|
||||
xmlSchemaPtr schema);
|
||||
#endif
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderStandalone (xmlTextReaderPtr reader);
|
||||
|
||||
|
||||
/*
|
||||
* Index lookup
|
||||
*/
|
||||
XMLPUBFUN long XMLCALL
|
||||
xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
|
||||
|
||||
/*
|
||||
* New more complete APIs for simpler creation and reuse of readers
|
||||
*/
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
xmlReaderWalker (xmlDocPtr doc);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
xmlReaderForDoc (const xmlChar * cur,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
xmlReaderForFile (const char *filename,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
xmlReaderForMemory (const char *buffer,
|
||||
int size,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
xmlReaderForFd (int fd,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlTextReaderPtr XMLCALL
|
||||
xmlReaderForIO (xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlReaderNewWalker (xmlTextReaderPtr reader,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlReaderNewDoc (xmlTextReaderPtr reader,
|
||||
const xmlChar * cur,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlReaderNewFile (xmlTextReaderPtr reader,
|
||||
const char *filename,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlReaderNewMemory (xmlTextReaderPtr reader,
|
||||
const char *buffer,
|
||||
int size,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlReaderNewFd (xmlTextReaderPtr reader,
|
||||
int fd,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlReaderNewIO (xmlTextReaderPtr reader,
|
||||
xmlInputReadCallback ioread,
|
||||
xmlInputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
const char *URL,
|
||||
const char *encoding,
|
||||
int options);
|
||||
/*
|
||||
* Error handling extensions
|
||||
*/
|
||||
typedef void * xmlTextReaderLocatorPtr;
|
||||
|
||||
/**
|
||||
* xmlTextReaderErrorFunc:
|
||||
* @arg: the user argument
|
||||
* @msg: the message
|
||||
* @severity: the severity of the error
|
||||
* @locator: a locator indicating where the error occured
|
||||
*
|
||||
* Signature of an error callback from a reader parser
|
||||
*/
|
||||
typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
|
||||
const char *msg,
|
||||
xmlParserSeverities severity,
|
||||
xmlTextReaderLocatorPtr locator);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlTextReaderErrorFunc f,
|
||||
void *arg);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlStructuredErrorFunc f,
|
||||
void *arg);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
|
||||
xmlTextReaderErrorFunc *f,
|
||||
void **arg);
|
||||
|
||||
#endif /* LIBXML_READER_ENABLED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XML_XMLREADER_H__ */
|
||||
|
||||
222
cache/include/libxml/xmlregexp.h
vendored
222
cache/include/libxml/xmlregexp.h
vendored
@@ -1,222 +0,0 @@
|
||||
/*
|
||||
* Summary: regular expressions handling
|
||||
* Description: basic API for libxml regular expressions handling used
|
||||
* for XML Schemas and validation.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_REGEXP_H__
|
||||
#define __XML_REGEXP_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_REGEXP_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlRegexpPtr:
|
||||
*
|
||||
* A libxml regular expression, they can actually be far more complex
|
||||
* thank the POSIX regex expressions.
|
||||
*/
|
||||
typedef struct _xmlRegexp xmlRegexp;
|
||||
typedef xmlRegexp *xmlRegexpPtr;
|
||||
|
||||
/**
|
||||
* xmlRegExecCtxtPtr:
|
||||
*
|
||||
* A libxml progressive regular expression evaluation context
|
||||
*/
|
||||
typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
|
||||
typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/dict.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The POSIX like API
|
||||
*/
|
||||
XMLPUBFUN xmlRegexpPtr XMLCALL
|
||||
xmlRegexpCompile (const xmlChar *regexp);
|
||||
XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRegexpExec (xmlRegexpPtr comp,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRegexpPrint (FILE *output,
|
||||
xmlRegexpPtr regexp);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRegexpIsDeterminist(xmlRegexpPtr comp);
|
||||
|
||||
/**
|
||||
* xmlRegExecCallbacks:
|
||||
* @exec: the regular expression context
|
||||
* @token: the current token string
|
||||
* @transdata: transition data
|
||||
* @inputdata: input data
|
||||
*
|
||||
* Callback function when doing a transition in the automata
|
||||
*/
|
||||
typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
|
||||
const xmlChar *token,
|
||||
void *transdata,
|
||||
void *inputdata);
|
||||
|
||||
/*
|
||||
* The progressive API
|
||||
*/
|
||||
XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
|
||||
xmlRegNewExecCtxt (xmlRegexpPtr comp,
|
||||
xmlRegExecCallbacks callback,
|
||||
void *data);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRegExecPushString(xmlRegExecCtxtPtr exec,
|
||||
const xmlChar *value,
|
||||
void *data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
|
||||
const xmlChar *value,
|
||||
const xmlChar *value2,
|
||||
void *data);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
|
||||
int *nbval,
|
||||
int *nbneg,
|
||||
xmlChar **values,
|
||||
int *terminal);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
|
||||
const xmlChar **string,
|
||||
int *nbval,
|
||||
int *nbneg,
|
||||
xmlChar **values,
|
||||
int *terminal);
|
||||
#ifdef LIBXML_EXPR_ENABLED
|
||||
/*
|
||||
* Formal regular expression handling
|
||||
* Its goal is to do some formal work on content models
|
||||
*/
|
||||
|
||||
/* expressions are used within a context */
|
||||
typedef struct _xmlExpCtxt xmlExpCtxt;
|
||||
typedef xmlExpCtxt *xmlExpCtxtPtr;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
|
||||
XMLPUBFUN xmlExpCtxtPtr XMLCALL
|
||||
xmlExpNewCtxt (int maxNodes,
|
||||
xmlDictPtr dict);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
|
||||
|
||||
/* Expressions are trees but the tree is opaque */
|
||||
typedef struct _xmlExpNode xmlExpNode;
|
||||
typedef xmlExpNode *xmlExpNodePtr;
|
||||
|
||||
typedef enum {
|
||||
XML_EXP_EMPTY = 0,
|
||||
XML_EXP_FORBID = 1,
|
||||
XML_EXP_ATOM = 2,
|
||||
XML_EXP_SEQ = 3,
|
||||
XML_EXP_OR = 4,
|
||||
XML_EXP_COUNT = 5
|
||||
} xmlExpNodeType;
|
||||
|
||||
/*
|
||||
* 2 core expressions shared by all for the empty language set
|
||||
* and for the set with just the empty token
|
||||
*/
|
||||
XMLPUBVAR xmlExpNodePtr forbiddenExp;
|
||||
XMLPUBVAR xmlExpNodePtr emptyExp;
|
||||
|
||||
/*
|
||||
* Expressions are reference counted internally
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlExpFree (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlExpRef (xmlExpNodePtr expr);
|
||||
|
||||
/*
|
||||
* constructors can be either manual or from a string
|
||||
*/
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
xmlExpParse (xmlExpCtxtPtr ctxt,
|
||||
const char *expr);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
xmlExpNewAtom (xmlExpCtxtPtr ctxt,
|
||||
const xmlChar *name,
|
||||
int len);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
xmlExpNewOr (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr left,
|
||||
xmlExpNodePtr right);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
xmlExpNewSeq (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr left,
|
||||
xmlExpNodePtr right);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
xmlExpNewRange (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr subset,
|
||||
int min,
|
||||
int max);
|
||||
/*
|
||||
* The really interesting APIs
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlExpIsNillable(xmlExpNodePtr expr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlExpMaxToken (xmlExpNodePtr expr);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
const xmlChar**langList,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlExpGetStart (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
const xmlChar**tokList,
|
||||
int len);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
xmlExpStringDerive(xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
const xmlChar *str,
|
||||
int len);
|
||||
XMLPUBFUN xmlExpNodePtr XMLCALL
|
||||
xmlExpExpDerive (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
xmlExpNodePtr sub);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlExpSubsume (xmlExpCtxtPtr ctxt,
|
||||
xmlExpNodePtr expr,
|
||||
xmlExpNodePtr sub);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlExpDump (xmlBufferPtr buf,
|
||||
xmlExpNodePtr expr);
|
||||
#endif /* LIBXML_EXPR_ENABLED */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_REGEXP_ENABLED */
|
||||
|
||||
#endif /*__XML_REGEXP_H__ */
|
||||
88
cache/include/libxml/xmlsave.h
vendored
88
cache/include/libxml/xmlsave.h
vendored
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
* Summary: the XML document serializer
|
||||
* Description: API to save document or subtree of document
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_XMLSAVE_H__
|
||||
#define __XML_XMLSAVE_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/encoding.h>
|
||||
#include <libxml/xmlIO.h>
|
||||
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlSaveOption:
|
||||
*
|
||||
* This is the set of XML save options that can be passed down
|
||||
* to the xmlSaveToFd() and similar calls.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_SAVE_FORMAT = 1<<0, /* format save output */
|
||||
XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */
|
||||
XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */
|
||||
XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */
|
||||
XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
|
||||
XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
|
||||
XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
|
||||
XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
|
||||
} xmlSaveOption;
|
||||
|
||||
|
||||
typedef struct _xmlSaveCtxt xmlSaveCtxt;
|
||||
typedef xmlSaveCtxt *xmlSaveCtxtPtr;
|
||||
|
||||
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
||||
xmlSaveToFd (int fd,
|
||||
const char *encoding,
|
||||
int options);
|
||||
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
||||
xmlSaveToFilename (const char *filename,
|
||||
const char *encoding,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
||||
xmlSaveToBuffer (xmlBufferPtr buffer,
|
||||
const char *encoding,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN xmlSaveCtxtPtr XMLCALL
|
||||
xmlSaveToIO (xmlOutputWriteCallback iowrite,
|
||||
xmlOutputCloseCallback ioclose,
|
||||
void *ioctx,
|
||||
const char *encoding,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN long XMLCALL
|
||||
xmlSaveDoc (xmlSaveCtxtPtr ctxt,
|
||||
xmlDocPtr doc);
|
||||
XMLPUBFUN long XMLCALL
|
||||
xmlSaveTree (xmlSaveCtxtPtr ctxt,
|
||||
xmlNodePtr node);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSaveFlush (xmlSaveCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSaveClose (xmlSaveCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
|
||||
xmlCharEncodingOutputFunc escape);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
|
||||
xmlCharEncodingOutputFunc escape);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
#endif /* __XML_XMLSAVE_H__ */
|
||||
|
||||
|
||||
246
cache/include/libxml/xmlschemas.h
vendored
246
cache/include/libxml/xmlschemas.h
vendored
@@ -1,246 +0,0 @@
|
||||
/*
|
||||
* Summary: incomplete XML Schemas structure implementation
|
||||
* Description: interface to the XML Schemas handling and schema validity
|
||||
* checking, it is incomplete right now.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XML_SCHEMA_H__
|
||||
#define __XML_SCHEMA_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
|
||||
#include <libxml/tree.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* This error codes are obsolete; not used any more.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_SCHEMAS_ERR_OK = 0,
|
||||
XML_SCHEMAS_ERR_NOROOT = 1,
|
||||
XML_SCHEMAS_ERR_UNDECLAREDELEM,
|
||||
XML_SCHEMAS_ERR_NOTTOPLEVEL,
|
||||
XML_SCHEMAS_ERR_MISSING,
|
||||
XML_SCHEMAS_ERR_WRONGELEM,
|
||||
XML_SCHEMAS_ERR_NOTYPE,
|
||||
XML_SCHEMAS_ERR_NOROLLBACK,
|
||||
XML_SCHEMAS_ERR_ISABSTRACT,
|
||||
XML_SCHEMAS_ERR_NOTEMPTY,
|
||||
XML_SCHEMAS_ERR_ELEMCONT,
|
||||
XML_SCHEMAS_ERR_HAVEDEFAULT,
|
||||
XML_SCHEMAS_ERR_NOTNILLABLE,
|
||||
XML_SCHEMAS_ERR_EXTRACONTENT,
|
||||
XML_SCHEMAS_ERR_INVALIDATTR,
|
||||
XML_SCHEMAS_ERR_INVALIDELEM,
|
||||
XML_SCHEMAS_ERR_NOTDETERMINIST,
|
||||
XML_SCHEMAS_ERR_CONSTRUCT,
|
||||
XML_SCHEMAS_ERR_INTERNAL,
|
||||
XML_SCHEMAS_ERR_NOTSIMPLE,
|
||||
XML_SCHEMAS_ERR_ATTRUNKNOWN,
|
||||
XML_SCHEMAS_ERR_ATTRINVALID,
|
||||
XML_SCHEMAS_ERR_VALUE,
|
||||
XML_SCHEMAS_ERR_FACET,
|
||||
XML_SCHEMAS_ERR_,
|
||||
XML_SCHEMAS_ERR_XXX
|
||||
} xmlSchemaValidError;
|
||||
|
||||
/*
|
||||
* ATTENTION: Change xmlSchemaSetValidOptions's check
|
||||
* for invalid values, if adding to the validation
|
||||
* options below.
|
||||
*/
|
||||
/**
|
||||
* xmlSchemaValidOption:
|
||||
*
|
||||
* This is the set of XML Schema validation options.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_SCHEMA_VAL_VC_I_CREATE = 1<<0
|
||||
/* Default/fixed: create an attribute node
|
||||
* or an element's text node on the instance.
|
||||
*/
|
||||
} xmlSchemaValidOption;
|
||||
|
||||
/*
|
||||
XML_SCHEMA_VAL_XSI_ASSEMBLE = 1<<1,
|
||||
* assemble schemata using
|
||||
* xsi:schemaLocation and
|
||||
* xsi:noNamespaceSchemaLocation
|
||||
*/
|
||||
|
||||
/**
|
||||
* The schemas related types are kept internal
|
||||
*/
|
||||
typedef struct _xmlSchema xmlSchema;
|
||||
typedef xmlSchema *xmlSchemaPtr;
|
||||
|
||||
/**
|
||||
* xmlSchemaValidityErrorFunc:
|
||||
* @ctx: the validation context
|
||||
* @msg: the message
|
||||
* @...: extra arguments
|
||||
*
|
||||
* Signature of an error callback from an XSD validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc)
|
||||
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
/**
|
||||
* xmlSchemaValidityWarningFunc:
|
||||
* @ctx: the validation context
|
||||
* @msg: the message
|
||||
* @...: extra arguments
|
||||
*
|
||||
* Signature of a warning callback from an XSD validation
|
||||
*/
|
||||
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc)
|
||||
(void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
|
||||
|
||||
/**
|
||||
* A schemas validation context
|
||||
*/
|
||||
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
|
||||
typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
|
||||
|
||||
typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
|
||||
typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
|
||||
|
||||
/**
|
||||
* xmlSchemaValidityLocatorFunc:
|
||||
* @ctx: user provided context
|
||||
* @file: returned file information
|
||||
* @line: returned line information
|
||||
*
|
||||
* A schemas validation locator, a callback called by the validator.
|
||||
* This is used when file or node informations are not available
|
||||
* to find out what file and line number are affected
|
||||
*
|
||||
* Returns: 0 in case of success and -1 in case of error
|
||||
*/
|
||||
|
||||
typedef int (XMLCDECL *xmlSchemaValidityLocatorFunc) (void *ctx,
|
||||
const char **file, unsigned long *line);
|
||||
|
||||
/*
|
||||
* Interfaces for parsing.
|
||||
*/
|
||||
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
|
||||
xmlSchemaNewParserCtxt (const char *URL);
|
||||
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
|
||||
xmlSchemaNewMemParserCtxt (const char *buffer,
|
||||
int size);
|
||||
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
|
||||
xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
|
||||
xmlSchemaValidityErrorFunc err,
|
||||
xmlSchemaValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc serror,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
|
||||
xmlSchemaValidityErrorFunc * err,
|
||||
xmlSchemaValidityWarningFunc * warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
|
||||
|
||||
XMLPUBFUN xmlSchemaPtr XMLCALL
|
||||
xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaFree (xmlSchemaPtr schema);
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaDump (FILE *output,
|
||||
xmlSchemaPtr schema);
|
||||
#endif /* LIBXML_OUTPUT_ENABLED */
|
||||
/*
|
||||
* Interfaces for validating
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlSchemaValidityErrorFunc err,
|
||||
xmlSchemaValidityWarningFunc warn,
|
||||
void *ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlStructuredErrorFunc serror,
|
||||
void *ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlSchemaValidityErrorFunc *err,
|
||||
xmlSchemaValidityWarningFunc *warn,
|
||||
void **ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
|
||||
int options);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt,
|
||||
const char *filename);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
|
||||
|
||||
XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
|
||||
xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlDocPtr instance);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlNodePtr elem);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlParserInputBufferPtr input,
|
||||
xmlCharEncoding enc,
|
||||
xmlSAXHandlerPtr sax,
|
||||
void *user_data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
|
||||
const char * filename,
|
||||
int options);
|
||||
|
||||
XMLPUBFUN xmlParserCtxtPtr XMLCALL
|
||||
xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
|
||||
|
||||
/*
|
||||
* Interface to insert Schemas SAX validation in a SAX stream
|
||||
*/
|
||||
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
|
||||
typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
|
||||
|
||||
XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
|
||||
xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
|
||||
xmlSAXHandlerPtr *sax,
|
||||
void **user_data);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
|
||||
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaValidateSetLocator (xmlSchemaValidCtxtPtr vctxt,
|
||||
xmlSchemaValidityLocatorFunc f,
|
||||
void *ctxt);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_SCHEMAS_ENABLED */
|
||||
#endif /* __XML_SCHEMA_H__ */
|
||||
151
cache/include/libxml/xmlschemastypes.h
vendored
151
cache/include/libxml/xmlschemastypes.h
vendored
@@ -1,151 +0,0 @@
|
||||
/*
|
||||
* Summary: implementation of XML Schema Datatypes
|
||||
* Description: module providing the XML Schema Datatypes implementation
|
||||
* both definition and validity checking
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __XML_SCHEMA_TYPES_H__
|
||||
#define __XML_SCHEMA_TYPES_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_SCHEMAS_ENABLED
|
||||
|
||||
#include <libxml/schemasInternals.h>
|
||||
#include <libxml/xmlschemas.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
|
||||
XML_SCHEMA_WHITESPACE_PRESERVE = 1,
|
||||
XML_SCHEMA_WHITESPACE_REPLACE = 2,
|
||||
XML_SCHEMA_WHITESPACE_COLLAPSE = 3
|
||||
} xmlSchemaWhitespaceValueType;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaInitTypes (void);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaCleanupTypes (void);
|
||||
XMLPUBFUN xmlSchemaTypePtr XMLCALL
|
||||
xmlSchemaGetPredefinedType (const xmlChar *name,
|
||||
const xmlChar *ns);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr *val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr *val,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateFacet (xmlSchemaTypePtr base,
|
||||
xmlSchemaFacetPtr facet,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
|
||||
xmlSchemaWhitespaceValueType fws,
|
||||
xmlSchemaValType valType,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr val,
|
||||
xmlSchemaWhitespaceValueType ws);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaFreeValue (xmlSchemaValPtr val);
|
||||
XMLPUBFUN xmlSchemaFacetPtr XMLCALL
|
||||
xmlSchemaNewFacet (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
|
||||
xmlSchemaTypePtr typeDecl,
|
||||
xmlSchemaParserCtxtPtr ctxt,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaCompareValues (xmlSchemaValPtr x,
|
||||
xmlSchemaValPtr y);
|
||||
XMLPUBFUN xmlSchemaTypePtr XMLCALL
|
||||
xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
|
||||
const xmlChar *value,
|
||||
unsigned long actualLen,
|
||||
unsigned long *expectedLen);
|
||||
XMLPUBFUN xmlSchemaTypePtr XMLCALL
|
||||
xmlSchemaGetBuiltInType (xmlSchemaValType type);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
|
||||
int facetType);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlSchemaCollapseString (const xmlChar *value);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlSchemaWhiteSpaceReplace (const xmlChar *value);
|
||||
XMLPUBFUN unsigned long XMLCALL
|
||||
xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
|
||||
xmlSchemaFacetPtr facet,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr val,
|
||||
unsigned long *length);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
|
||||
xmlSchemaValType valType,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr val,
|
||||
unsigned long *length,
|
||||
xmlSchemaWhitespaceValueType ws);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
|
||||
const xmlChar *value,
|
||||
xmlSchemaValPtr *val,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaGetCanonValue (xmlSchemaValPtr val,
|
||||
const xmlChar **retValue);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
|
||||
const xmlChar **retValue,
|
||||
xmlSchemaWhitespaceValueType ws);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValueAppend (xmlSchemaValPtr prev,
|
||||
xmlSchemaValPtr cur);
|
||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||
xmlSchemaValueGetNext (xmlSchemaValPtr cur);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlSchemaValueGetAsString (xmlSchemaValPtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
|
||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||
xmlSchemaNewStringValue (xmlSchemaValType type,
|
||||
const xmlChar *value);
|
||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||
xmlSchemaNewNOTATIONValue (const xmlChar *name,
|
||||
const xmlChar *ns);
|
||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||
xmlSchemaNewQNameValue (const xmlChar *namespaceName,
|
||||
const xmlChar *localName);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
|
||||
xmlSchemaWhitespaceValueType xws,
|
||||
xmlSchemaValPtr y,
|
||||
xmlSchemaWhitespaceValueType yws);
|
||||
XMLPUBFUN xmlSchemaValPtr XMLCALL
|
||||
xmlSchemaCopyValue (xmlSchemaValPtr val);
|
||||
XMLPUBFUN xmlSchemaValType XMLCALL
|
||||
xmlSchemaGetValType (xmlSchemaValPtr val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_SCHEMAS_ENABLED */
|
||||
#endif /* __XML_SCHEMA_TYPES_H__ */
|
||||
140
cache/include/libxml/xmlstring.h
vendored
140
cache/include/libxml/xmlstring.h
vendored
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* Summary: set of routines to process strings
|
||||
* Description: type and interfaces needed for the internal string handling
|
||||
* of the library, especially UTF8 processing.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_STRING_H__
|
||||
#define __XML_STRING_H__
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlChar:
|
||||
*
|
||||
* This is a basic byte in an UTF-8 encoded string.
|
||||
* It's unsigned allowing to pinpoint case where char * are assigned
|
||||
* to xmlChar * (possibly making serialization back impossible).
|
||||
*/
|
||||
typedef unsigned char xmlChar;
|
||||
|
||||
/**
|
||||
* BAD_CAST:
|
||||
*
|
||||
* Macro to cast a string to an xmlChar * when one know its safe.
|
||||
*/
|
||||
#define BAD_CAST (xmlChar *)
|
||||
|
||||
/*
|
||||
* xmlChar handling
|
||||
*/
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlStrdup (const xmlChar *cur);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlStrndup (const xmlChar *cur,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCharStrndup (const char *cur,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlCharStrdup (const char *cur);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlStrsub (const xmlChar *str,
|
||||
int start,
|
||||
int len);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlStrchr (const xmlChar *str,
|
||||
xmlChar val);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlStrstr (const xmlChar *str,
|
||||
const xmlChar *val);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlStrcasestr (const xmlChar *str,
|
||||
const xmlChar *val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStrcmp (const xmlChar *str1,
|
||||
const xmlChar *str2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStrncmp (const xmlChar *str1,
|
||||
const xmlChar *str2,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStrcasecmp (const xmlChar *str1,
|
||||
const xmlChar *str2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStrncasecmp (const xmlChar *str1,
|
||||
const xmlChar *str2,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStrEqual (const xmlChar *str1,
|
||||
const xmlChar *str2);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStrQEqual (const xmlChar *pref,
|
||||
const xmlChar *name,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStrlen (const xmlChar *str);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlStrcat (xmlChar *cur,
|
||||
const xmlChar *add);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlStrncat (xmlChar *cur,
|
||||
const xmlChar *add,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlStrncatNew (const xmlChar *str1,
|
||||
const xmlChar *str2,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStrPrintf (xmlChar *buf,
|
||||
int len,
|
||||
const xmlChar *msg,
|
||||
...);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlStrVPrintf (xmlChar *buf,
|
||||
int len,
|
||||
const xmlChar *msg,
|
||||
va_list ap);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlGetUTF8Char (const unsigned char *utf,
|
||||
int *len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlCheckUTF8 (const unsigned char *utf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlUTF8Strsize (const xmlChar *utf,
|
||||
int len);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlUTF8Strndup (const xmlChar *utf,
|
||||
int len);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlUTF8Strpos (const xmlChar *utf,
|
||||
int pos);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlUTF8Strloc (const xmlChar *utf,
|
||||
const xmlChar *utfchar);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlUTF8Strsub (const xmlChar *utf,
|
||||
int start,
|
||||
int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlUTF8Strlen (const xmlChar *utf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlUTF8Size (const xmlChar *utf);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlUTF8Charcmp (const xmlChar *utf1,
|
||||
const xmlChar *utf2);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __XML_STRING_H__ */
|
||||
202
cache/include/libxml/xmlunicode.h
vendored
202
cache/include/libxml/xmlunicode.h
vendored
@@ -1,202 +0,0 @@
|
||||
/*
|
||||
* Summary: Unicode character APIs
|
||||
* Description: API for the Unicode character APIs
|
||||
*
|
||||
* This file is automatically generated from the
|
||||
* UCS description files of the Unicode Character Database
|
||||
* http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
|
||||
* using the genUnicode.py Python script.
|
||||
*
|
||||
* Generation date: Mon Mar 27 11:09:52 2006
|
||||
* Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_UNICODE_H__
|
||||
#define __XML_UNICODE_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_UNICODE_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsAegeanNumbers (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsAlphabeticPresentationForms (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsArabic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsArmenian (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsArrows (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBasicLatin (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBengali (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBlockElements (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBopomofo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBopomofoExtended (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBoxDrawing (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBraillePatterns (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBuhid (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsByzantineMusicalSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibility (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityForms (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographs (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKRadicalsSupplement (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKSymbolsandPunctuation (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographs (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCherokee (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarks (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCombiningHalfMarks (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCombiningMarksforSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsControlPictures (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCurrencySymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCypriotSyllabary (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCyrillic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCyrillicSupplement (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsDeseret (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsDevanagari (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsDingbats (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsEnclosedAlphanumerics (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsEnclosedCJKLettersandMonths (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsEthiopic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGeneralPunctuation (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGeometricShapes (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGeorgian (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGothic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGreek (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGreekExtended (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGreekandCoptic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGujarati (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsGurmukhi (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHalfwidthandFullwidthForms (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHangulCompatibilityJamo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHangulJamo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHangulSyllables (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHanunoo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHebrew (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHighPrivateUseSurrogates (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHighSurrogates (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsHiragana (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsIPAExtensions (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsIdeographicDescriptionCharacters (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKanbun (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKangxiRadicals (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKannada (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKatakana (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKatakanaPhoneticExtensions (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKhmer (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsKhmerSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLao (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLatin1Supplement (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedAdditional (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLetterlikeSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLimbu (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLinearBIdeograms (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLinearBSyllabary (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsLowSurrogates (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMalayalam (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMathematicalAlphanumericSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMathematicalOperators (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbolsandArrows (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousTechnical (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMongolian (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMusicalSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsMyanmar (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsNumberForms (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsOgham (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsOldItalic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsOpticalCharacterRecognition (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsOriya (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsOsmanya (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsPhoneticExtensions (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsPrivateUse (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsPrivateUseArea (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsRunic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsShavian (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSinhala (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSmallFormVariants (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSpacingModifierLetters (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSpecials (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSuperscriptsandSubscripts (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSupplementalMathematicalOperators (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaA (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaB (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsSyriac (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTagalog (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTagbanwa (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTags (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTaiLe (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTaiXuanJingSymbols (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTamil (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTelugu (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsThaana (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsThai (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsTibetan (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsUgaritic (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectors (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectorsSupplement (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsYiRadicals (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsYiSyllables (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsYijingHexagramSymbols (int code);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsBlock (int code, const char *block);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatC (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatCc (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatCf (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatCo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatCs (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatL (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatLl (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatLm (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatLo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatLt (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatLu (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatM (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatMc (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatMe (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatMn (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatN (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatNd (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatNl (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatNo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatP (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPc (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPd (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPe (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPf (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPi (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatPs (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatS (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatSc (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatSk (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatSm (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatSo (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatZ (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatZl (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatZp (int code);
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCatZs (int code);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlUCSIsCat (int code, const char *cat);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_UNICODE_ENABLED */
|
||||
|
||||
#endif /* __XML_UNICODE_H__ */
|
||||
489
cache/include/libxml/xmlversion.h
vendored
489
cache/include/libxml/xmlversion.h
vendored
@@ -1,489 +0,0 @@
|
||||
/*
|
||||
* Summary: compile-time version informations
|
||||
* Description: compile-time version informations for the XML library
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_VERSION_H__
|
||||
#define __XML_VERSION_H__
|
||||
|
||||
#include <libxml/xmlexports.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* use those to be sure nothing nasty will happen if
|
||||
* your library and includes mismatch
|
||||
*/
|
||||
#ifndef LIBXML2_COMPILING_MSCCDEF
|
||||
XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
|
||||
#endif /* LIBXML2_COMPILING_MSCCDEF */
|
||||
|
||||
/**
|
||||
* LIBXML_DOTTED_VERSION:
|
||||
*
|
||||
* the version string like "1.2.3"
|
||||
*/
|
||||
#define LIBXML_DOTTED_VERSION "2.9.2"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION:
|
||||
*
|
||||
* the version number: 1.2.3 value is 10203
|
||||
*/
|
||||
#define LIBXML_VERSION 20902
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_STRING:
|
||||
*
|
||||
* the version number string, 1.2.3 value is "10203"
|
||||
*/
|
||||
#define LIBXML_VERSION_STRING "20902"
|
||||
|
||||
/**
|
||||
* LIBXML_VERSION_EXTRA:
|
||||
*
|
||||
* extra version information, used to show a CVS compilation
|
||||
*/
|
||||
#define LIBXML_VERSION_EXTRA ""
|
||||
|
||||
/**
|
||||
* LIBXML_TEST_VERSION:
|
||||
*
|
||||
* Macro to check that the libxml version in use is compatible with
|
||||
* the version the software has been compiled against
|
||||
*/
|
||||
#define LIBXML_TEST_VERSION xmlCheckVersion(20902);
|
||||
|
||||
#ifndef VMS
|
||||
#if 0
|
||||
/**
|
||||
* WITH_TRIO:
|
||||
*
|
||||
* defined if the trio support need to be configured in
|
||||
*/
|
||||
#define WITH_TRIO
|
||||
#else
|
||||
/**
|
||||
* WITHOUT_TRIO:
|
||||
*
|
||||
* defined if the trio support should not be configured in
|
||||
*/
|
||||
#define WITHOUT_TRIO
|
||||
#endif
|
||||
#else /* VMS */
|
||||
/**
|
||||
* WITH_TRIO:
|
||||
*
|
||||
* defined if the trio support need to be configured in
|
||||
*/
|
||||
#define WITH_TRIO 1
|
||||
#endif /* VMS */
|
||||
|
||||
/**
|
||||
* LIBXML_THREAD_ENABLED:
|
||||
*
|
||||
* Whether the thread support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#if defined(_REENTRANT) || defined(__MT__) || \
|
||||
(defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
|
||||
#define LIBXML_THREAD_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_THREAD_ALLOC_ENABLED:
|
||||
*
|
||||
* Whether the allocation hooks are per-thread
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_THREAD_ALLOC_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_TREE_ENABLED:
|
||||
*
|
||||
* Whether the DOM like tree manipulation API support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_TREE_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_OUTPUT_ENABLED:
|
||||
*
|
||||
* Whether the serialization/saving support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_OUTPUT_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_PUSH_ENABLED:
|
||||
*
|
||||
* Whether the push parsing interfaces are configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_PUSH_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_READER_ENABLED:
|
||||
*
|
||||
* Whether the xmlReader parsing interface is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_READER_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_PATTERN_ENABLED:
|
||||
*
|
||||
* Whether the xmlPattern node selection interface is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_PATTERN_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_WRITER_ENABLED:
|
||||
*
|
||||
* Whether the xmlWriter saving interface is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_WRITER_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_SAX1_ENABLED:
|
||||
*
|
||||
* Whether the older SAX1 interface is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_SAX1_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_FTP_ENABLED:
|
||||
*
|
||||
* Whether the FTP support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_FTP_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_HTTP_ENABLED:
|
||||
*
|
||||
* Whether the HTTP support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_HTTP_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_VALID_ENABLED:
|
||||
*
|
||||
* Whether the DTD validation support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_VALID_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_HTML_ENABLED:
|
||||
*
|
||||
* Whether the HTML support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_HTML_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_LEGACY_ENABLED:
|
||||
*
|
||||
* Whether the deprecated APIs are compiled in for compatibility
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_LEGACY_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_C14N_ENABLED:
|
||||
*
|
||||
* Whether the Canonicalization support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_C14N_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_CATALOG_ENABLED:
|
||||
*
|
||||
* Whether the Catalog support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_CATALOG_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_DOCB_ENABLED:
|
||||
*
|
||||
* Whether the SGML Docbook support is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_DOCB_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_XPATH_ENABLED:
|
||||
*
|
||||
* Whether XPath is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_XPATH_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_XPTR_ENABLED:
|
||||
*
|
||||
* Whether XPointer is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_XPTR_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_XINCLUDE_ENABLED:
|
||||
*
|
||||
* Whether XInclude is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_XINCLUDE_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ICONV_ENABLED:
|
||||
*
|
||||
* Whether iconv support is available
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_ICONV_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ICU_ENABLED:
|
||||
*
|
||||
* Whether icu support is available
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_ICU_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ISO8859X_ENABLED:
|
||||
*
|
||||
* Whether ISO-8859-* support is made available in case iconv is not
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_ISO8859X_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_DEBUG_ENABLED:
|
||||
*
|
||||
* Whether Debugging module is configured in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_DEBUG_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* DEBUG_MEMORY_LOCATION:
|
||||
*
|
||||
* Whether the memory debugging is configured in
|
||||
*/
|
||||
#if 0
|
||||
#define DEBUG_MEMORY_LOCATION
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_DEBUG_RUNTIME:
|
||||
*
|
||||
* Whether the runtime debugging is configured in
|
||||
*/
|
||||
#if 0
|
||||
#define LIBXML_DEBUG_RUNTIME
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_UNICODE_ENABLED:
|
||||
*
|
||||
* Whether the Unicode related interfaces are compiled in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_UNICODE_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_REGEXP_ENABLED:
|
||||
*
|
||||
* Whether the regular expressions interfaces are compiled in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_REGEXP_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_AUTOMATA_ENABLED:
|
||||
*
|
||||
* Whether the automata interfaces are compiled in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_AUTOMATA_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_EXPR_ENABLED:
|
||||
*
|
||||
* Whether the formal expressions interfaces are compiled in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_EXPR_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_SCHEMAS_ENABLED:
|
||||
*
|
||||
* Whether the Schemas validation interfaces are compiled in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_SCHEMAS_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_SCHEMATRON_ENABLED:
|
||||
*
|
||||
* Whether the Schematron validation interfaces are compiled in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_SCHEMATRON_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_MODULES_ENABLED:
|
||||
*
|
||||
* Whether the module interfaces are compiled in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_MODULES_ENABLED
|
||||
/**
|
||||
* LIBXML_MODULE_EXTENSION:
|
||||
*
|
||||
* the string suffix used by dynamic modules (usually shared libraries)
|
||||
*/
|
||||
#define LIBXML_MODULE_EXTENSION ".so"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ZLIB_ENABLED:
|
||||
*
|
||||
* Whether the Zlib support is compiled in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_ZLIB_ENABLED
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_LZMA_ENABLED:
|
||||
*
|
||||
* Whether the Lzma support is compiled in
|
||||
*/
|
||||
#if 1
|
||||
#define LIBXML_LZMA_ENABLED
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifdef HAVE_ANSIDECL_H
|
||||
#include <ansidecl.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
*
|
||||
* Macro used to signal to GCC unused function parameters
|
||||
*/
|
||||
|
||||
#ifndef ATTRIBUTE_UNUSED
|
||||
# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
|
||||
# define ATTRIBUTE_UNUSED __attribute__((unused))
|
||||
# else
|
||||
# define ATTRIBUTE_UNUSED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ATTR_ALLOC_SIZE:
|
||||
*
|
||||
* Macro used to indicate to GCC this is an allocator function
|
||||
*/
|
||||
|
||||
#ifndef LIBXML_ATTR_ALLOC_SIZE
|
||||
# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
|
||||
# else
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
# endif
|
||||
#else
|
||||
# define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* LIBXML_ATTR_FORMAT:
|
||||
*
|
||||
* Macro used to indicate to GCC the parameter are printf like
|
||||
*/
|
||||
|
||||
#ifndef LIBXML_ATTR_FORMAT
|
||||
# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
|
||||
# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
|
||||
# else
|
||||
# define LIBXML_ATTR_FORMAT(fmt,args)
|
||||
# endif
|
||||
#else
|
||||
# define LIBXML_ATTR_FORMAT(fmt,args)
|
||||
#endif
|
||||
|
||||
#else /* ! __GNUC__ */
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
*
|
||||
* Macro used to signal to GCC unused function parameters
|
||||
*/
|
||||
#define ATTRIBUTE_UNUSED
|
||||
/**
|
||||
* LIBXML_ATTR_ALLOC_SIZE:
|
||||
*
|
||||
* Macro used to indicate to GCC this is an allocator function
|
||||
*/
|
||||
#define LIBXML_ATTR_ALLOC_SIZE(x)
|
||||
/**
|
||||
* LIBXML_ATTR_FORMAT:
|
||||
*
|
||||
* Macro used to indicate to GCC the parameter are printf like
|
||||
*/
|
||||
#define LIBXML_ATTR_FORMAT(fmt,args)
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif
|
||||
|
||||
|
||||
488
cache/include/libxml/xmlwriter.h
vendored
488
cache/include/libxml/xmlwriter.h
vendored
@@ -1,488 +0,0 @@
|
||||
/*
|
||||
* Summary: text writing API for XML
|
||||
* Description: text writing API for XML
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Alfred Mickautsch <alfred@mickautsch.de>
|
||||
*/
|
||||
|
||||
#ifndef __XML_XMLWRITER_H__
|
||||
#define __XML_XMLWRITER_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_WRITER_ENABLED
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <libxml/xmlIO.h>
|
||||
#include <libxml/list.h>
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct _xmlTextWriter xmlTextWriter;
|
||||
typedef xmlTextWriter *xmlTextWriterPtr;
|
||||
|
||||
/*
|
||||
* Constructors & Destructor
|
||||
*/
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriter(xmlOutputBufferPtr out);
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriterFilename(const char *uri, int compression);
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriterMemory(xmlBufferPtr buf, int compression);
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression);
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriterDoc(xmlDocPtr * doc, int compression);
|
||||
XMLPUBFUN xmlTextWriterPtr XMLCALL
|
||||
xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node,
|
||||
int compression);
|
||||
XMLPUBFUN void XMLCALL xmlFreeTextWriter(xmlTextWriterPtr writer);
|
||||
|
||||
/*
|
||||
* Functions
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Document
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartDocument(xmlTextWriterPtr writer,
|
||||
const char *version,
|
||||
const char *encoding,
|
||||
const char *standalone);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* Comments
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
|
||||
writer);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(2,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* Elements
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar *
|
||||
namespaceURI);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* Elements conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(3,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar *
|
||||
content);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
|
||||
const xmlChar * prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar * namespaceURI,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(5,6);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
|
||||
const xmlChar * prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar * namespaceURI,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(5,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar *
|
||||
namespaceURI,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* Text
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
|
||||
const char *format, va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(2,0);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
|
||||
const xmlChar * content, int len);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
|
||||
const xmlChar * content);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
|
||||
writer,
|
||||
const char
|
||||
*format, ...)
|
||||
LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
|
||||
writer,
|
||||
const char
|
||||
*format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(2,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
|
||||
const xmlChar *
|
||||
content);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
|
||||
const char *data,
|
||||
int start, int len);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
|
||||
const char *data,
|
||||
int start, int len);
|
||||
|
||||
/*
|
||||
* Attributes
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
|
||||
const xmlChar * name);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
prefix,
|
||||
const xmlChar *
|
||||
name,
|
||||
const xmlChar *
|
||||
namespaceURI);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* Attributes conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(3,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar *
|
||||
content);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
|
||||
const xmlChar * prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar * namespaceURI,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(5,6);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
|
||||
const xmlChar * prefix,
|
||||
const xmlChar * name,
|
||||
const xmlChar * namespaceURI,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(5,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
prefix,
|
||||
const xmlChar *
|
||||
name,
|
||||
const xmlChar *
|
||||
namespaceURI,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* PI's
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartPI(xmlTextWriterPtr writer,
|
||||
const xmlChar * target);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
|
||||
|
||||
/*
|
||||
* PI conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
|
||||
const xmlChar * target,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
|
||||
const xmlChar * target,
|
||||
const char *format, va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(3,0);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWritePI(xmlTextWriterPtr writer,
|
||||
const xmlChar * target,
|
||||
const xmlChar * content);
|
||||
|
||||
/**
|
||||
* xmlTextWriterWriteProcessingInstruction:
|
||||
*
|
||||
* This macro maps to xmlTextWriterWritePI
|
||||
*/
|
||||
#define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI
|
||||
|
||||
/*
|
||||
* CDATA
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
|
||||
|
||||
/*
|
||||
* CDATA conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(2,3);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
|
||||
const char *format, va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(2,0);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
|
||||
const xmlChar * content);
|
||||
|
||||
/*
|
||||
* DTD
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartDTD(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
|
||||
|
||||
/*
|
||||
* DTD conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(5,6);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid,
|
||||
const char *format, va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(5,0);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid,
|
||||
const xmlChar * subset);
|
||||
|
||||
/**
|
||||
* xmlTextWriterWriteDocType:
|
||||
*
|
||||
* this macro maps to xmlTextWriterWriteDTD
|
||||
*/
|
||||
#define xmlTextWriterWriteDocType xmlTextWriterWriteDTD
|
||||
|
||||
/*
|
||||
* DTD element definition
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* DTD element definition conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(3,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
name,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* DTD attribute list definition
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
|
||||
const xmlChar * name);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* DTD attribute list definition conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(3,4);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(3,0);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar *
|
||||
name,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* DTD entity definition
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
|
||||
int pe, const xmlChar * name);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
|
||||
writer);
|
||||
|
||||
/*
|
||||
* DTD entity definition conveniency functions
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
|
||||
int pe,
|
||||
const xmlChar * name,
|
||||
const char *format, ...)
|
||||
LIBXML_ATTR_FORMAT(4,5);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
|
||||
int pe,
|
||||
const xmlChar * name,
|
||||
const char *format,
|
||||
va_list argptr)
|
||||
LIBXML_ATTR_FORMAT(4,0);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
|
||||
int pe,
|
||||
const xmlChar * name,
|
||||
const xmlChar * content);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
|
||||
int pe,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid,
|
||||
const xmlChar * ndataid);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
|
||||
writer,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid,
|
||||
const xmlChar *
|
||||
ndataid);
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
|
||||
writer, int pe,
|
||||
const xmlChar * name,
|
||||
const xmlChar *
|
||||
pubid,
|
||||
const xmlChar *
|
||||
sysid,
|
||||
const xmlChar *
|
||||
ndataid,
|
||||
const xmlChar *
|
||||
content);
|
||||
|
||||
/*
|
||||
* DTD notation definition
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
|
||||
const xmlChar * name,
|
||||
const xmlChar * pubid,
|
||||
const xmlChar * sysid);
|
||||
|
||||
/*
|
||||
* Indentation
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
|
||||
const xmlChar * str);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar);
|
||||
|
||||
|
||||
/*
|
||||
* misc
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_WRITER_ENABLED */
|
||||
|
||||
#endif /* __XML_XMLWRITER_H__ */
|
||||
557
cache/include/libxml/xpath.h
vendored
557
cache/include/libxml/xpath.h
vendored
@@ -1,557 +0,0 @@
|
||||
/*
|
||||
* Summary: XML Path Language implementation
|
||||
* Description: API for the XML Path Language implementation
|
||||
*
|
||||
* XML Path Language implementation
|
||||
* XPath is a language for addressing parts of an XML document,
|
||||
* designed to be used by both XSLT and XPointer
|
||||
* http://www.w3.org/TR/xpath
|
||||
*
|
||||
* Implements
|
||||
* W3C Recommendation 16 November 1999
|
||||
* http://www.w3.org/TR/1999/REC-xpath-19991116
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_XPATH_H__
|
||||
#define __XML_XPATH_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/hash.h>
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
|
||||
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
|
||||
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
|
||||
typedef struct _xmlXPathContext xmlXPathContext;
|
||||
typedef xmlXPathContext *xmlXPathContextPtr;
|
||||
typedef struct _xmlXPathParserContext xmlXPathParserContext;
|
||||
typedef xmlXPathParserContext *xmlXPathParserContextPtr;
|
||||
|
||||
/**
|
||||
* The set of XPath error codes.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
XPATH_EXPRESSION_OK = 0,
|
||||
XPATH_NUMBER_ERROR,
|
||||
XPATH_UNFINISHED_LITERAL_ERROR,
|
||||
XPATH_START_LITERAL_ERROR,
|
||||
XPATH_VARIABLE_REF_ERROR,
|
||||
XPATH_UNDEF_VARIABLE_ERROR,
|
||||
XPATH_INVALID_PREDICATE_ERROR,
|
||||
XPATH_EXPR_ERROR,
|
||||
XPATH_UNCLOSED_ERROR,
|
||||
XPATH_UNKNOWN_FUNC_ERROR,
|
||||
XPATH_INVALID_OPERAND,
|
||||
XPATH_INVALID_TYPE,
|
||||
XPATH_INVALID_ARITY,
|
||||
XPATH_INVALID_CTXT_SIZE,
|
||||
XPATH_INVALID_CTXT_POSITION,
|
||||
XPATH_MEMORY_ERROR,
|
||||
XPTR_SYNTAX_ERROR,
|
||||
XPTR_RESOURCE_ERROR,
|
||||
XPTR_SUB_RESOURCE_ERROR,
|
||||
XPATH_UNDEF_PREFIX_ERROR,
|
||||
XPATH_ENCODING_ERROR,
|
||||
XPATH_INVALID_CHAR_ERROR,
|
||||
XPATH_INVALID_CTXT,
|
||||
XPATH_STACK_ERROR,
|
||||
XPATH_FORBID_VARIABLE_ERROR
|
||||
} xmlXPathError;
|
||||
|
||||
/*
|
||||
* A node-set (an unordered collection of nodes without duplicates).
|
||||
*/
|
||||
typedef struct _xmlNodeSet xmlNodeSet;
|
||||
typedef xmlNodeSet *xmlNodeSetPtr;
|
||||
struct _xmlNodeSet {
|
||||
int nodeNr; /* number of nodes in the set */
|
||||
int nodeMax; /* size of the array as allocated */
|
||||
xmlNodePtr *nodeTab; /* array of nodes in no particular order */
|
||||
/* @@ with_ns to check wether namespace nodes should be looked at @@ */
|
||||
};
|
||||
|
||||
/*
|
||||
* An expression is evaluated to yield an object, which
|
||||
* has one of the following four basic types:
|
||||
* - node-set
|
||||
* - boolean
|
||||
* - number
|
||||
* - string
|
||||
*
|
||||
* @@ XPointer will add more types !
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
XPATH_UNDEFINED = 0,
|
||||
XPATH_NODESET = 1,
|
||||
XPATH_BOOLEAN = 2,
|
||||
XPATH_NUMBER = 3,
|
||||
XPATH_STRING = 4,
|
||||
XPATH_POINT = 5,
|
||||
XPATH_RANGE = 6,
|
||||
XPATH_LOCATIONSET = 7,
|
||||
XPATH_USERS = 8,
|
||||
XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */
|
||||
} xmlXPathObjectType;
|
||||
|
||||
typedef struct _xmlXPathObject xmlXPathObject;
|
||||
typedef xmlXPathObject *xmlXPathObjectPtr;
|
||||
struct _xmlXPathObject {
|
||||
xmlXPathObjectType type;
|
||||
xmlNodeSetPtr nodesetval;
|
||||
int boolval;
|
||||
double floatval;
|
||||
xmlChar *stringval;
|
||||
void *user;
|
||||
int index;
|
||||
void *user2;
|
||||
int index2;
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlXPathConvertFunc:
|
||||
* @obj: an XPath object
|
||||
* @type: the number of the target type
|
||||
*
|
||||
* A conversion function is associated to a type and used to cast
|
||||
* the new type to primitive values.
|
||||
*
|
||||
* Returns -1 in case of error, 0 otherwise
|
||||
*/
|
||||
typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
|
||||
|
||||
/*
|
||||
* Extra type: a name and a conversion function.
|
||||
*/
|
||||
|
||||
typedef struct _xmlXPathType xmlXPathType;
|
||||
typedef xmlXPathType *xmlXPathTypePtr;
|
||||
struct _xmlXPathType {
|
||||
const xmlChar *name; /* the type name */
|
||||
xmlXPathConvertFunc func; /* the conversion function */
|
||||
};
|
||||
|
||||
/*
|
||||
* Extra variable: a name and a value.
|
||||
*/
|
||||
|
||||
typedef struct _xmlXPathVariable xmlXPathVariable;
|
||||
typedef xmlXPathVariable *xmlXPathVariablePtr;
|
||||
struct _xmlXPathVariable {
|
||||
const xmlChar *name; /* the variable name */
|
||||
xmlXPathObjectPtr value; /* the value */
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlXPathEvalFunc:
|
||||
* @ctxt: an XPath parser context
|
||||
* @nargs: the number of arguments passed to the function
|
||||
*
|
||||
* An XPath evaluation function, the parameters are on the XPath context stack.
|
||||
*/
|
||||
|
||||
typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
|
||||
/*
|
||||
* Extra function: a name and a evaluation function.
|
||||
*/
|
||||
|
||||
typedef struct _xmlXPathFunct xmlXPathFunct;
|
||||
typedef xmlXPathFunct *xmlXPathFuncPtr;
|
||||
struct _xmlXPathFunct {
|
||||
const xmlChar *name; /* the function name */
|
||||
xmlXPathEvalFunc func; /* the evaluation function */
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlXPathAxisFunc:
|
||||
* @ctxt: the XPath interpreter context
|
||||
* @cur: the previous node being explored on that axis
|
||||
*
|
||||
* An axis traversal function. To traverse an axis, the engine calls
|
||||
* the first time with cur == NULL and repeat until the function returns
|
||||
* NULL indicating the end of the axis traversal.
|
||||
*
|
||||
* Returns the next node in that axis or NULL if at the end of the axis.
|
||||
*/
|
||||
|
||||
typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
|
||||
xmlXPathObjectPtr cur);
|
||||
|
||||
/*
|
||||
* Extra axis: a name and an axis function.
|
||||
*/
|
||||
|
||||
typedef struct _xmlXPathAxis xmlXPathAxis;
|
||||
typedef xmlXPathAxis *xmlXPathAxisPtr;
|
||||
struct _xmlXPathAxis {
|
||||
const xmlChar *name; /* the axis name */
|
||||
xmlXPathAxisFunc func; /* the search function */
|
||||
};
|
||||
|
||||
/**
|
||||
* xmlXPathFunction:
|
||||
* @ctxt: the XPath interprestation context
|
||||
* @nargs: the number of arguments
|
||||
*
|
||||
* An XPath function.
|
||||
* The arguments (if any) are popped out from the context stack
|
||||
* and the result is pushed on the stack.
|
||||
*/
|
||||
|
||||
typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
|
||||
|
||||
/*
|
||||
* Function and Variable Lookup.
|
||||
*/
|
||||
|
||||
/**
|
||||
* xmlXPathVariableLookupFunc:
|
||||
* @ctxt: an XPath context
|
||||
* @name: name of the variable
|
||||
* @ns_uri: the namespace name hosting this variable
|
||||
*
|
||||
* Prototype for callbacks used to plug variable lookup in the XPath
|
||||
* engine.
|
||||
*
|
||||
* Returns the XPath object value or NULL if not found.
|
||||
*/
|
||||
typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri);
|
||||
|
||||
/**
|
||||
* xmlXPathFuncLookupFunc:
|
||||
* @ctxt: an XPath context
|
||||
* @name: name of the function
|
||||
* @ns_uri: the namespace name hosting this function
|
||||
*
|
||||
* Prototype for callbacks used to plug function lookup in the XPath
|
||||
* engine.
|
||||
*
|
||||
* Returns the XPath function or NULL if not found.
|
||||
*/
|
||||
typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri);
|
||||
|
||||
/**
|
||||
* xmlXPathFlags:
|
||||
* Flags for XPath engine compilation and runtime
|
||||
*/
|
||||
/**
|
||||
* XML_XPATH_CHECKNS:
|
||||
*
|
||||
* check namespaces at compilation
|
||||
*/
|
||||
#define XML_XPATH_CHECKNS (1<<0)
|
||||
/**
|
||||
* XML_XPATH_NOVAR:
|
||||
*
|
||||
* forbid variables in expression
|
||||
*/
|
||||
#define XML_XPATH_NOVAR (1<<1)
|
||||
|
||||
/**
|
||||
* xmlXPathContext:
|
||||
*
|
||||
* Expression evaluation occurs with respect to a context.
|
||||
* he context consists of:
|
||||
* - a node (the context node)
|
||||
* - a node list (the context node list)
|
||||
* - a set of variable bindings
|
||||
* - a function library
|
||||
* - the set of namespace declarations in scope for the expression
|
||||
* Following the switch to hash tables, this need to be trimmed up at
|
||||
* the next binary incompatible release.
|
||||
* The node may be modified when the context is passed to libxml2
|
||||
* for an XPath evaluation so you may need to initialize it again
|
||||
* before the next call.
|
||||
*/
|
||||
|
||||
struct _xmlXPathContext {
|
||||
xmlDocPtr doc; /* The current document */
|
||||
xmlNodePtr node; /* The current node */
|
||||
|
||||
int nb_variables_unused; /* unused (hash table) */
|
||||
int max_variables_unused; /* unused (hash table) */
|
||||
xmlHashTablePtr varHash; /* Hash table of defined variables */
|
||||
|
||||
int nb_types; /* number of defined types */
|
||||
int max_types; /* max number of types */
|
||||
xmlXPathTypePtr types; /* Array of defined types */
|
||||
|
||||
int nb_funcs_unused; /* unused (hash table) */
|
||||
int max_funcs_unused; /* unused (hash table) */
|
||||
xmlHashTablePtr funcHash; /* Hash table of defined funcs */
|
||||
|
||||
int nb_axis; /* number of defined axis */
|
||||
int max_axis; /* max number of axis */
|
||||
xmlXPathAxisPtr axis; /* Array of defined axis */
|
||||
|
||||
/* the namespace nodes of the context node */
|
||||
xmlNsPtr *namespaces; /* Array of namespaces */
|
||||
int nsNr; /* number of namespace in scope */
|
||||
void *user; /* function to free */
|
||||
|
||||
/* extra variables */
|
||||
int contextSize; /* the context size */
|
||||
int proximityPosition; /* the proximity position */
|
||||
|
||||
/* extra stuff for XPointer */
|
||||
int xptr; /* is this an XPointer context? */
|
||||
xmlNodePtr here; /* for here() */
|
||||
xmlNodePtr origin; /* for origin() */
|
||||
|
||||
/* the set of namespace declarations in scope for the expression */
|
||||
xmlHashTablePtr nsHash; /* The namespaces hash table */
|
||||
xmlXPathVariableLookupFunc varLookupFunc;/* variable lookup func */
|
||||
void *varLookupData; /* variable lookup data */
|
||||
|
||||
/* Possibility to link in an extra item */
|
||||
void *extra; /* needed for XSLT */
|
||||
|
||||
/* The function name and URI when calling a function */
|
||||
const xmlChar *function;
|
||||
const xmlChar *functionURI;
|
||||
|
||||
/* function lookup function and data */
|
||||
xmlXPathFuncLookupFunc funcLookupFunc;/* function lookup func */
|
||||
void *funcLookupData; /* function lookup data */
|
||||
|
||||
/* temporary namespace lists kept for walking the namespace axis */
|
||||
xmlNsPtr *tmpNsList; /* Array of namespaces */
|
||||
int tmpNsNr; /* number of namespaces in scope */
|
||||
|
||||
/* error reporting mechanism */
|
||||
void *userData; /* user specific data block */
|
||||
xmlStructuredErrorFunc error; /* the callback in case of errors */
|
||||
xmlError lastError; /* the last error */
|
||||
xmlNodePtr debugNode; /* the source node XSLT */
|
||||
|
||||
/* dictionary */
|
||||
xmlDictPtr dict; /* dictionary if any */
|
||||
|
||||
int flags; /* flags to control compilation */
|
||||
|
||||
/* Cache for reusal of XPath objects */
|
||||
void *cache;
|
||||
};
|
||||
|
||||
/*
|
||||
* The structure of a compiled expression form is not public.
|
||||
*/
|
||||
|
||||
typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
|
||||
typedef xmlXPathCompExpr *xmlXPathCompExprPtr;
|
||||
|
||||
/**
|
||||
* xmlXPathParserContext:
|
||||
*
|
||||
* An XPath parser context. It contains pure parsing informations,
|
||||
* an xmlXPathContext, and the stack of objects.
|
||||
*/
|
||||
struct _xmlXPathParserContext {
|
||||
const xmlChar *cur; /* the current char being parsed */
|
||||
const xmlChar *base; /* the full expression */
|
||||
|
||||
int error; /* error code */
|
||||
|
||||
xmlXPathContextPtr context; /* the evaluation context */
|
||||
xmlXPathObjectPtr value; /* the current value */
|
||||
int valueNr; /* number of values stacked */
|
||||
int valueMax; /* max number of values stacked */
|
||||
xmlXPathObjectPtr *valueTab; /* stack of values */
|
||||
|
||||
xmlXPathCompExprPtr comp; /* the precompiled expression */
|
||||
int xptr; /* it this an XPointer expression */
|
||||
xmlNodePtr ancestor; /* used for walking preceding axis */
|
||||
|
||||
int valueFrame; /* used to limit Pop on the stack */
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Public API *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* Objects and Nodesets handling
|
||||
*/
|
||||
|
||||
XMLPUBVAR double xmlXPathNAN;
|
||||
XMLPUBVAR double xmlXPathPINF;
|
||||
XMLPUBVAR double xmlXPathNINF;
|
||||
|
||||
/* These macros may later turn into functions */
|
||||
/**
|
||||
* xmlXPathNodeSetGetLength:
|
||||
* @ns: a node-set
|
||||
*
|
||||
* Implement a functionality similar to the DOM NodeList.length.
|
||||
*
|
||||
* Returns the number of nodes in the node-set.
|
||||
*/
|
||||
#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
|
||||
/**
|
||||
* xmlXPathNodeSetItem:
|
||||
* @ns: a node-set
|
||||
* @index: index of a node in the set
|
||||
*
|
||||
* Implements a functionality similar to the DOM NodeList.item().
|
||||
*
|
||||
* Returns the xmlNodePtr at the given @index in @ns or NULL if
|
||||
* @index is out of range (0 to length-1)
|
||||
*/
|
||||
#define xmlXPathNodeSetItem(ns, index) \
|
||||
((((ns) != NULL) && \
|
||||
((index) >= 0) && ((index) < (ns)->nodeNr)) ? \
|
||||
(ns)->nodeTab[(index)] \
|
||||
: NULL)
|
||||
/**
|
||||
* xmlXPathNodeSetIsEmpty:
|
||||
* @ns: a node-set
|
||||
*
|
||||
* Checks whether @ns is empty or not.
|
||||
*
|
||||
* Returns %TRUE if @ns is an empty node-set.
|
||||
*/
|
||||
#define xmlXPathNodeSetIsEmpty(ns) \
|
||||
(((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
|
||||
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeObject (xmlXPathObjectPtr obj);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeSetCreate (xmlNodePtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeNodeSet (xmlNodeSetPtr obj);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathObjectCopy (xmlXPathObjectPtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCmpNodes (xmlNodePtr node1,
|
||||
xmlNodePtr node2);
|
||||
/**
|
||||
* Conversion functions to basic types.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCastNumberToBoolean (double val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCastStringToBoolean (const xmlChar * val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCastToBoolean (xmlXPathObjectPtr val);
|
||||
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathCastBooleanToNumber (int val);
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathCastStringToNumber (const xmlChar * val);
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathCastNodeToNumber (xmlNodePtr node);
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathCastToNumber (xmlXPathObjectPtr val);
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathCastBooleanToString (int val);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathCastNumberToString (double val);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathCastNodeToString (xmlNodePtr node);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathCastToString (xmlXPathObjectPtr val);
|
||||
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathConvertBoolean (xmlXPathObjectPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathConvertNumber (xmlXPathObjectPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathConvertString (xmlXPathObjectPtr val);
|
||||
|
||||
/**
|
||||
* Context handling.
|
||||
*/
|
||||
XMLPUBFUN xmlXPathContextPtr XMLCALL
|
||||
xmlXPathNewContext (xmlDocPtr doc);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeContext (xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
|
||||
int active,
|
||||
int value,
|
||||
int options);
|
||||
/**
|
||||
* Evaluation functions.
|
||||
*/
|
||||
XMLPUBFUN long XMLCALL
|
||||
xmlXPathOrderDocElems (xmlDocPtr doc);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathSetContextNode (xmlNodePtr node,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNodeEval (xmlNodePtr node,
|
||||
const xmlChar *str,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathEval (const xmlChar *str,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathEvalExpression (const xmlChar *str,
|
||||
xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
|
||||
xmlXPathObjectPtr res);
|
||||
/**
|
||||
* Separate compilation/evaluation entry points.
|
||||
*/
|
||||
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
|
||||
xmlXPathCompile (const xmlChar *str);
|
||||
XMLPUBFUN xmlXPathCompExprPtr XMLCALL
|
||||
xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *str);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
|
||||
xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathInit (void);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathIsNaN (double val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathIsInf (double val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED*/
|
||||
#endif /* ! __XML_XPATH_H__ */
|
||||
632
cache/include/libxml/xpathInternals.h
vendored
632
cache/include/libxml/xpathInternals.h
vendored
@@ -1,632 +0,0 @@
|
||||
/*
|
||||
* Summary: internal interfaces for XML Path Language implementation
|
||||
* Description: internal interfaces for XML Path Language implementation
|
||||
* used to build new modules on top of XPath like XPointer and
|
||||
* XSLT
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_XPATH_INTERNALS_H__
|
||||
#define __XML_XPATH_INTERNALS_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
#include <libxml/xpath.h>
|
||||
|
||||
#ifdef LIBXML_XPATH_ENABLED
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Helpers *
|
||||
* *
|
||||
************************************************************************/
|
||||
|
||||
/*
|
||||
* Many of these macros may later turn into functions. They
|
||||
* shouldn't be used in #ifdef's preprocessor instructions.
|
||||
*/
|
||||
/**
|
||||
* xmlXPathSetError:
|
||||
* @ctxt: an XPath parser context
|
||||
* @err: an xmlXPathError code
|
||||
*
|
||||
* Raises an error.
|
||||
*/
|
||||
#define xmlXPathSetError(ctxt, err) \
|
||||
{ xmlXPatherror((ctxt), __FILE__, __LINE__, (err)); \
|
||||
if ((ctxt) != NULL) (ctxt)->error = (err); }
|
||||
|
||||
/**
|
||||
* xmlXPathSetArityError:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Raises an XPATH_INVALID_ARITY error.
|
||||
*/
|
||||
#define xmlXPathSetArityError(ctxt) \
|
||||
xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
|
||||
|
||||
/**
|
||||
* xmlXPathSetTypeError:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Raises an XPATH_INVALID_TYPE error.
|
||||
*/
|
||||
#define xmlXPathSetTypeError(ctxt) \
|
||||
xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
|
||||
|
||||
/**
|
||||
* xmlXPathGetError:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Get the error code of an XPath context.
|
||||
*
|
||||
* Returns the context error.
|
||||
*/
|
||||
#define xmlXPathGetError(ctxt) ((ctxt)->error)
|
||||
|
||||
/**
|
||||
* xmlXPathCheckError:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Check if an XPath error was raised.
|
||||
*
|
||||
* Returns true if an error has been raised, false otherwise.
|
||||
*/
|
||||
#define xmlXPathCheckError(ctxt) ((ctxt)->error != XPATH_EXPRESSION_OK)
|
||||
|
||||
/**
|
||||
* xmlXPathGetDocument:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Get the document of an XPath context.
|
||||
*
|
||||
* Returns the context document.
|
||||
*/
|
||||
#define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc)
|
||||
|
||||
/**
|
||||
* xmlXPathGetContextNode:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Get the context node of an XPath context.
|
||||
*
|
||||
* Returns the context node.
|
||||
*/
|
||||
#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathPopString (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void * XMLCALL
|
||||
xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
|
||||
|
||||
/**
|
||||
* xmlXPathReturnBoolean:
|
||||
* @ctxt: an XPath parser context
|
||||
* @val: a boolean
|
||||
*
|
||||
* Pushes the boolean @val on the context stack.
|
||||
*/
|
||||
#define xmlXPathReturnBoolean(ctxt, val) \
|
||||
valuePush((ctxt), xmlXPathNewBoolean(val))
|
||||
|
||||
/**
|
||||
* xmlXPathReturnTrue:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Pushes true on the context stack.
|
||||
*/
|
||||
#define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1)
|
||||
|
||||
/**
|
||||
* xmlXPathReturnFalse:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Pushes false on the context stack.
|
||||
*/
|
||||
#define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0)
|
||||
|
||||
/**
|
||||
* xmlXPathReturnNumber:
|
||||
* @ctxt: an XPath parser context
|
||||
* @val: a double
|
||||
*
|
||||
* Pushes the double @val on the context stack.
|
||||
*/
|
||||
#define xmlXPathReturnNumber(ctxt, val) \
|
||||
valuePush((ctxt), xmlXPathNewFloat(val))
|
||||
|
||||
/**
|
||||
* xmlXPathReturnString:
|
||||
* @ctxt: an XPath parser context
|
||||
* @str: a string
|
||||
*
|
||||
* Pushes the string @str on the context stack.
|
||||
*/
|
||||
#define xmlXPathReturnString(ctxt, str) \
|
||||
valuePush((ctxt), xmlXPathWrapString(str))
|
||||
|
||||
/**
|
||||
* xmlXPathReturnEmptyString:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Pushes an empty string on the stack.
|
||||
*/
|
||||
#define xmlXPathReturnEmptyString(ctxt) \
|
||||
valuePush((ctxt), xmlXPathNewCString(""))
|
||||
|
||||
/**
|
||||
* xmlXPathReturnNodeSet:
|
||||
* @ctxt: an XPath parser context
|
||||
* @ns: a node-set
|
||||
*
|
||||
* Pushes the node-set @ns on the context stack.
|
||||
*/
|
||||
#define xmlXPathReturnNodeSet(ctxt, ns) \
|
||||
valuePush((ctxt), xmlXPathWrapNodeSet(ns))
|
||||
|
||||
/**
|
||||
* xmlXPathReturnEmptyNodeSet:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Pushes an empty node-set on the context stack.
|
||||
*/
|
||||
#define xmlXPathReturnEmptyNodeSet(ctxt) \
|
||||
valuePush((ctxt), xmlXPathNewNodeSet(NULL))
|
||||
|
||||
/**
|
||||
* xmlXPathReturnExternal:
|
||||
* @ctxt: an XPath parser context
|
||||
* @val: user data
|
||||
*
|
||||
* Pushes user data on the context stack.
|
||||
*/
|
||||
#define xmlXPathReturnExternal(ctxt, val) \
|
||||
valuePush((ctxt), xmlXPathWrapExternal(val))
|
||||
|
||||
/**
|
||||
* xmlXPathStackIsNodeSet:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Check if the current value on the XPath stack is a node set or
|
||||
* an XSLT value tree.
|
||||
*
|
||||
* Returns true if the current object on the stack is a node-set.
|
||||
*/
|
||||
#define xmlXPathStackIsNodeSet(ctxt) \
|
||||
(((ctxt)->value != NULL) \
|
||||
&& (((ctxt)->value->type == XPATH_NODESET) \
|
||||
|| ((ctxt)->value->type == XPATH_XSLT_TREE)))
|
||||
|
||||
/**
|
||||
* xmlXPathStackIsExternal:
|
||||
* @ctxt: an XPath parser context
|
||||
*
|
||||
* Checks if the current value on the XPath stack is an external
|
||||
* object.
|
||||
*
|
||||
* Returns true if the current object on the stack is an external
|
||||
* object.
|
||||
*/
|
||||
#define xmlXPathStackIsExternal(ctxt) \
|
||||
((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
|
||||
|
||||
/**
|
||||
* xmlXPathEmptyNodeSet:
|
||||
* @ns: a node-set
|
||||
*
|
||||
* Empties a node-set.
|
||||
*/
|
||||
#define xmlXPathEmptyNodeSet(ns) \
|
||||
{ while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; }
|
||||
|
||||
/**
|
||||
* CHECK_ERROR:
|
||||
*
|
||||
* Macro to return from the function if an XPath error was detected.
|
||||
*/
|
||||
#define CHECK_ERROR \
|
||||
if (ctxt->error != XPATH_EXPRESSION_OK) return
|
||||
|
||||
/**
|
||||
* CHECK_ERROR0:
|
||||
*
|
||||
* Macro to return 0 from the function if an XPath error was detected.
|
||||
*/
|
||||
#define CHECK_ERROR0 \
|
||||
if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
|
||||
|
||||
/**
|
||||
* XP_ERROR:
|
||||
* @X: the error code
|
||||
*
|
||||
* Macro to raise an XPath error and return.
|
||||
*/
|
||||
#define XP_ERROR(X) \
|
||||
{ xmlXPathErr(ctxt, X); return; }
|
||||
|
||||
/**
|
||||
* XP_ERROR0:
|
||||
* @X: the error code
|
||||
*
|
||||
* Macro to raise an XPath error and return 0.
|
||||
*/
|
||||
#define XP_ERROR0(X) \
|
||||
{ xmlXPathErr(ctxt, X); return(0); }
|
||||
|
||||
/**
|
||||
* CHECK_TYPE:
|
||||
* @typeval: the XPath type
|
||||
*
|
||||
* Macro to check that the value on top of the XPath stack is of a given
|
||||
* type.
|
||||
*/
|
||||
#define CHECK_TYPE(typeval) \
|
||||
if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
|
||||
XP_ERROR(XPATH_INVALID_TYPE)
|
||||
|
||||
/**
|
||||
* CHECK_TYPE0:
|
||||
* @typeval: the XPath type
|
||||
*
|
||||
* Macro to check that the value on top of the XPath stack is of a given
|
||||
* type. Return(0) in case of failure
|
||||
*/
|
||||
#define CHECK_TYPE0(typeval) \
|
||||
if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
|
||||
XP_ERROR0(XPATH_INVALID_TYPE)
|
||||
|
||||
/**
|
||||
* CHECK_ARITY:
|
||||
* @x: the number of expected args
|
||||
*
|
||||
* Macro to check that the number of args passed to an XPath function matches.
|
||||
*/
|
||||
#define CHECK_ARITY(x) \
|
||||
if (ctxt == NULL) return; \
|
||||
if (nargs != (x)) \
|
||||
XP_ERROR(XPATH_INVALID_ARITY); \
|
||||
if (ctxt->valueNr < ctxt->valueFrame + (x)) \
|
||||
XP_ERROR(XPATH_STACK_ERROR);
|
||||
|
||||
/**
|
||||
* CAST_TO_STRING:
|
||||
*
|
||||
* Macro to try to cast the value on the top of the XPath stack to a string.
|
||||
*/
|
||||
#define CAST_TO_STRING \
|
||||
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \
|
||||
xmlXPathStringFunction(ctxt, 1);
|
||||
|
||||
/**
|
||||
* CAST_TO_NUMBER:
|
||||
*
|
||||
* Macro to try to cast the value on the top of the XPath stack to a number.
|
||||
*/
|
||||
#define CAST_TO_NUMBER \
|
||||
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \
|
||||
xmlXPathNumberFunction(ctxt, 1);
|
||||
|
||||
/**
|
||||
* CAST_TO_BOOLEAN:
|
||||
*
|
||||
* Macro to try to cast the value on the top of the XPath stack to a boolean.
|
||||
*/
|
||||
#define CAST_TO_BOOLEAN \
|
||||
if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \
|
||||
xmlXPathBooleanFunction(ctxt, 1);
|
||||
|
||||
/*
|
||||
* Variable Lookup forwarding.
|
||||
*/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
|
||||
xmlXPathVariableLookupFunc f,
|
||||
void *data);
|
||||
|
||||
/*
|
||||
* Function Lookup forwarding.
|
||||
*/
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
|
||||
xmlXPathFuncLookupFunc f,
|
||||
void *funcCtxt);
|
||||
|
||||
/*
|
||||
* Error reporting.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPatherror (xmlXPathParserContextPtr ctxt,
|
||||
const char *file,
|
||||
int line,
|
||||
int no);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathErr (xmlXPathParserContextPtr ctxt,
|
||||
int error);
|
||||
|
||||
#ifdef LIBXML_DEBUG_ENABLED
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathDebugDumpObject (FILE *output,
|
||||
xmlXPathObjectPtr cur,
|
||||
int depth);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathDebugDumpCompExpr(FILE *output,
|
||||
xmlXPathCompExprPtr comp,
|
||||
int depth);
|
||||
#endif
|
||||
/**
|
||||
* NodeSet handling.
|
||||
*/
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathNodeSetContains (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathDifference (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathIntersection (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathDistinct (xmlNodeSetPtr nodes);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeLeading (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathLeading (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
|
||||
xmlNodePtr node);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathTrailing (xmlNodeSetPtr nodes1,
|
||||
xmlNodeSetPtr nodes2);
|
||||
|
||||
|
||||
/**
|
||||
* Extending a context.
|
||||
*/
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *ns_uri);
|
||||
XMLPUBFUN const xmlChar * XMLCALL
|
||||
xmlXPathNsLookup (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *prefix);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
|
||||
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlXPathFunction f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri,
|
||||
xmlXPathFunction f);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
xmlXPathObjectPtr value);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri,
|
||||
xmlXPathObjectPtr value);
|
||||
XMLPUBFUN xmlXPathFunction XMLCALL
|
||||
xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlXPathFunction XMLCALL
|
||||
xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *ns_uri);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
|
||||
|
||||
/**
|
||||
* Utilities to extend XPath.
|
||||
*/
|
||||
XMLPUBFUN xmlXPathParserContextPtr XMLCALL
|
||||
xmlXPathNewParserContext (const xmlChar *str,
|
||||
xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
|
||||
|
||||
/* TODO: remap to xmlXPathValuePop and Push. */
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
valuePop (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL
|
||||
valuePush (xmlXPathParserContextPtr ctxt,
|
||||
xmlXPathObjectPtr value);
|
||||
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewString (const xmlChar *val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewCString (const char *val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathWrapString (xmlChar *val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathWrapCString (char * val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewFloat (double val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewBoolean (int val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewNodeSet (xmlNodePtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewValueTree (xmlNodePtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
|
||||
xmlNodePtr node,
|
||||
xmlNsPtr ns);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathNodeSetSort (xmlNodeSetPtr set);
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRoot (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathParseName (xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN xmlChar * XMLCALL
|
||||
xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
|
||||
|
||||
/*
|
||||
* Existing functions.
|
||||
*/
|
||||
XMLPUBFUN double XMLCALL
|
||||
xmlXPathStringEvalNumber (const xmlChar *str);
|
||||
XMLPUBFUN int XMLCALL
|
||||
xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
|
||||
xmlXPathObjectPtr res);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
|
||||
XMLPUBFUN xmlNodeSetPtr XMLCALL
|
||||
xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
|
||||
xmlNodeSetPtr val2);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathNodeSetDel (xmlNodeSetPtr cur,
|
||||
xmlNodePtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
|
||||
int val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathNewNodeSetList (xmlNodeSetPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathWrapNodeSet (xmlNodeSetPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPathWrapExternal (void *val);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN int XMLCALL xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
|
||||
XMLPUBFUN void XMLCALL xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
|
||||
XMLPUBFUN void XMLCALL xmlXPathModValues(xmlXPathParserContextPtr ctxt);
|
||||
|
||||
XMLPUBFUN int XMLCALL xmlXPathIsNodeType(const xmlChar *name);
|
||||
|
||||
/*
|
||||
* Some of the axis navigation routines.
|
||||
*/
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
|
||||
xmlNodePtr cur);
|
||||
/*
|
||||
* The official core of XPath functions.
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
|
||||
|
||||
/**
|
||||
* Really internal functions
|
||||
*/
|
||||
XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_XPATH_ENABLED */
|
||||
#endif /* ! __XML_XPATH_INTERNALS_H__ */
|
||||
114
cache/include/libxml/xpointer.h
vendored
114
cache/include/libxml/xpointer.h
vendored
@@ -1,114 +0,0 @@
|
||||
/*
|
||||
* Summary: API to handle XML Pointers
|
||||
* Description: API to handle XML Pointers
|
||||
* Base implementation was made accordingly to
|
||||
* W3C Candidate Recommendation 7 June 2000
|
||||
* http://www.w3.org/TR/2000/CR-xptr-20000607
|
||||
*
|
||||
* Added support for the element() scheme described in:
|
||||
* W3C Proposed Recommendation 13 November 2002
|
||||
* http://www.w3.org/TR/2002/PR-xptr-element-20021113/
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Daniel Veillard
|
||||
*/
|
||||
|
||||
#ifndef __XML_XPTR_H__
|
||||
#define __XML_XPTR_H__
|
||||
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#ifdef LIBXML_XPTR_ENABLED
|
||||
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/xpath.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* A Location Set
|
||||
*/
|
||||
typedef struct _xmlLocationSet xmlLocationSet;
|
||||
typedef xmlLocationSet *xmlLocationSetPtr;
|
||||
struct _xmlLocationSet {
|
||||
int locNr; /* number of locations in the set */
|
||||
int locMax; /* size of the array as allocated */
|
||||
xmlXPathObjectPtr *locTab;/* array of locations */
|
||||
};
|
||||
|
||||
/*
|
||||
* Handling of location sets.
|
||||
*/
|
||||
|
||||
XMLPUBFUN xmlLocationSetPtr XMLCALL
|
||||
xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
|
||||
XMLPUBFUN xmlLocationSetPtr XMLCALL
|
||||
xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
|
||||
xmlLocationSetPtr val2);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRange (xmlNodePtr start,
|
||||
int startindex,
|
||||
xmlNodePtr end,
|
||||
int endindex);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRangeNodePoint (xmlNodePtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
|
||||
xmlNodePtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRangeNodes (xmlNodePtr start,
|
||||
xmlNodePtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewLocationSetNodes (xmlNodePtr start,
|
||||
xmlNodePtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewRangeNodeObject (xmlNodePtr start,
|
||||
xmlXPathObjectPtr end);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrNewCollapsedRange (xmlNodePtr start);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
|
||||
xmlXPathObjectPtr val);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
|
||||
xmlXPathObjectPtr val);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
|
||||
int val);
|
||||
|
||||
/*
|
||||
* Functions.
|
||||
*/
|
||||
XMLPUBFUN xmlXPathContextPtr XMLCALL
|
||||
xmlXPtrNewContext (xmlDocPtr doc,
|
||||
xmlNodePtr here,
|
||||
xmlNodePtr origin);
|
||||
XMLPUBFUN xmlXPathObjectPtr XMLCALL
|
||||
xmlXPtrEval (const xmlChar *str,
|
||||
xmlXPathContextPtr ctx);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
|
||||
int nargs);
|
||||
XMLPUBFUN xmlNodePtr XMLCALL
|
||||
xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
|
||||
XMLPUBFUN void XMLCALL
|
||||
xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* LIBXML_XPTR_ENABLED */
|
||||
#endif /* __XML_XPTR_H__ */
|
||||
8
cache/include/tango_cache_client.h
vendored
8
cache/include/tango_cache_client.h
vendored
@@ -4,8 +4,8 @@
|
||||
#include <event2/event.h>
|
||||
#include <event.h>
|
||||
|
||||
#include "tfe_future.h"
|
||||
#include "proxy_cache.h"
|
||||
#include <tfe_future.h>
|
||||
#include "tango_cache_pending.h"
|
||||
|
||||
#define USER_TAG_MAX_LEN 1518
|
||||
|
||||
@@ -105,9 +105,9 @@ struct tango_cache_instance *tango_cache_instance_new(struct event_base* evbase,
|
||||
//<2F>ɹ<EFBFBD>ʱ<EFBFBD>ص<EFBFBD>promise_success, resultΪNULLʱ<4C><CAB1>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//ʧ<><CAA7>ʱ<EFBFBD>ص<EFBFBD>promise_failed(<28><>һ<EFBFBD><D2BB>)<29><>ʹ<EFBFBD><CAB9>get_last_error<6F><72>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>룻
|
||||
//future<72><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪNULL
|
||||
int tango_cache_fetch_object(struct tango_cache_instance *instance, struct future* future, struct tango_cache_meta *meta);
|
||||
int tango_cache_fetch_object(struct tango_cache_instance *instance, struct future* f, struct tango_cache_meta *meta);
|
||||
//<2F><>promise_success<73><73>result<6C><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
|
||||
struct tango_cache_result *tango_cache_read_result(void *promise_result);
|
||||
struct tango_cache_result *tango_cache_read_result(future_result_t *result);
|
||||
|
||||
|
||||
/* DELETE<54>ӿڵ<D3BF>API*/
|
||||
|
||||
4
cache/include/tango_cache_pending.h
vendored
4
cache/include/tango_cache_pending.h
vendored
@@ -43,7 +43,7 @@ ALLOWED ,//允许使用缓存作为该请求的响应
|
||||
FORBIDDEN,//禁止使用缓存作为该请求的响应,需要向源服务器请求
|
||||
VERIFY,//禁止使用未验证有效性的缓存作为该请求的响应
|
||||
*/
|
||||
enum cache_pending_action tfe_cache_get_pending(const struct tfe_http_field *request, size_t n_fields,struct request_freshness* restrict);
|
||||
enum cache_pending_action tfe_cache_get_pending(const struct tfe_http_half *request, struct request_freshness* restrict);
|
||||
|
||||
|
||||
|
||||
@@ -59,4 +59,4 @@ UNDEFINED = 0,//响应字段中未定义缓存的行为
|
||||
ALLOWED ,//允许缓存该响应
|
||||
FORBIDDEN,//禁止缓存该响应
|
||||
*/
|
||||
enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_field *response, size_t n_fields, struct response_freshness* freshness);
|
||||
enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_half *response, struct response_freshness* freshness);
|
||||
BIN
cache/pangu_tango_cache.a
vendored
BIN
cache/pangu_tango_cache.a
vendored
Binary file not shown.
50
cache/src/tango_cache_pending.cpp
vendored
50
cache/src/tango_cache_pending.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
#include"proxy_cache.h"
|
||||
#include"tango_cache_pending.h"
|
||||
#include<assert.h>
|
||||
#include<string.h>
|
||||
#include<stdlib.h>
|
||||
@@ -63,19 +63,17 @@ enum cache_pending_action request_cache_control(const char* value, struct reques
|
||||
}
|
||||
|
||||
|
||||
bool cache_vertify(const struct tfe_http_field *http_fields, size_t n_fields)
|
||||
bool cache_vertify(const struct tfe_http_half *request)
|
||||
{
|
||||
int i = 0;
|
||||
for (; i < n_fields; i++)
|
||||
{
|
||||
if ( http_fields[i].http_field == TLF_HTTP_IF_MATCH ||
|
||||
http_fields[i].http_field == TLF_HTTP_IF_NONE_MATCH ||
|
||||
http_fields[i].http_field == TLF_HTTP_IF_MODIFIED_SINCE ||
|
||||
http_fields[i].http_field == TLF_HTTP_IF_UNMODIFIED_SINCE )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if( !tfe_http_std_field_read(request,TFE_HTTP_IF_MATCH) ||
|
||||
!tfe_http_std_field_read(request,TFE_HTTP_IF_NONE_MATCH) ||
|
||||
!tfe_http_std_field_read(request,TFE_HTTP_IF_MODIFIED_SINCE) ||
|
||||
!tfe_http_std_field_read(request,TFE_HTTP_IF_UNMODIFIED_SINCE)
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -105,28 +103,28 @@ enum cache_pending_action get_pragma_action(const char * value)
|
||||
}
|
||||
|
||||
|
||||
enum cache_pending_action tfe_cache_get_pending(const struct tfe_http_field *request, size_t n_fields, struct request_freshness* restrict)
|
||||
enum cache_pending_action tfe_cache_get_pending(const struct tfe_http_half *request, struct request_freshness* restrict)
|
||||
{
|
||||
enum cache_pending_action res = UNDEFINED;
|
||||
int i = 0;
|
||||
int index = 0;
|
||||
const char *value = NULL;
|
||||
memset(restrict,0,sizeof(struct request_freshness));
|
||||
value = get_head_value(request, n_fields, TFE_HTTP_PRAGMA);
|
||||
value = tfe_http_std_field_read(request, TFE_HTTP_PRAGMA);
|
||||
if (value != NULL)
|
||||
{
|
||||
res = get_pragma_action(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = get_head_value(request, n_fields, TFE_HTTP_CACHE_CONTROL);
|
||||
value = tfe_http_std_field_read(request, TFE_HTTP_CACHE_CONTROL);
|
||||
if (value != NULL)
|
||||
{
|
||||
res = request_cache_control(value, restrict);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cache_vertify(request, n_fields))
|
||||
if (cache_vertify(request))
|
||||
{
|
||||
res = VERIFY;
|
||||
}
|
||||
@@ -199,13 +197,13 @@ time_t get_response_maxage(const char* cache_ctl)
|
||||
}
|
||||
|
||||
|
||||
void get_response_freshness(const struct tfe_http_field *response, size_t n_fields, struct response_freshness* freshness)
|
||||
void get_response_freshness(const struct tfe_http_half *response, struct response_freshness* freshness)
|
||||
{
|
||||
time_t expire_rel_time = 0;
|
||||
time_t cur_rel_time = 0;
|
||||
struct tm cur_gmt_time;
|
||||
const char* field_value = NULL;
|
||||
field_value = get_head_value(response, n_fields, TFE_HTTP_CACHE_CONTROL);
|
||||
field_value = tfe_http_std_field_read(response, TFE_HTTP_CACHE_CONTROL);
|
||||
if (field_value != NULL)
|
||||
{
|
||||
freshness->timeout = get_response_s_maxage(field_value);
|
||||
@@ -216,7 +214,7 @@ void get_response_freshness(const struct tfe_http_field *response, size_t n_fiel
|
||||
}
|
||||
else
|
||||
{
|
||||
field_value = get_head_value(response, n_fields, TFE_HTTP_EXPIRES);
|
||||
field_value = tfe_http_std_field_read(response, TFE_HTTP_EXPIRES);
|
||||
if (field_value != NULL)
|
||||
{
|
||||
assert(is_standard_gmt_format(field_value));
|
||||
@@ -230,13 +228,13 @@ void get_response_freshness(const struct tfe_http_field *response, size_t n_fiel
|
||||
freshness->timeout = expire_rel_time - cur_rel_time;
|
||||
}
|
||||
}
|
||||
field_value = get_head_value(response, n_fields, TFE_HTTP_DATE);
|
||||
field_value = tfe_http_std_field_read(response, TFE_HTTP_DATE);
|
||||
if (field_value != NULL)
|
||||
{
|
||||
assert(is_standard_gmt_format(field_value));
|
||||
freshness->date = absolute_to_relative_time(field_value);;
|
||||
}
|
||||
field_value = get_head_value(response, n_fields, TLF_HTTP_LAST_MODIFIED);
|
||||
field_value = tfe_http_std_field_read(response, TFE_HTTP_LAST_MODIFIED);
|
||||
if (field_value != NULL)
|
||||
{
|
||||
assert(is_standard_gmt_format(field_value));
|
||||
@@ -268,28 +266,28 @@ enum cache_pending_action response_cache_control(const char* value)
|
||||
}
|
||||
|
||||
|
||||
enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_field *response, size_t n_fields, struct response_freshness* freshness)
|
||||
enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_half *response, struct response_freshness* freshness)
|
||||
{
|
||||
enum cache_pending_action res = UNDEFINED;
|
||||
int i = 0;
|
||||
int index = 0;
|
||||
const char *value = NULL;
|
||||
memset(freshness,0,sizeof(struct response_freshness));
|
||||
value = get_head_value(response, n_fields, TFE_HTTP_PRAGMA);
|
||||
value = tfe_http_std_field_read(response, TFE_HTTP_PRAGMA);
|
||||
if (value != NULL)
|
||||
{
|
||||
res = get_pragma_action(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = get_head_value(response, n_fields, TFE_HTTP_CACHE_CONTROL);
|
||||
value = tfe_http_std_field_read(response, TFE_HTTP_CACHE_CONTROL);
|
||||
if (value != NULL)
|
||||
{
|
||||
res = response_cache_control(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
value = get_head_value(response, n_fields, TFE_HTTP_EXPIRES);
|
||||
value = tfe_http_std_field_read(response, TFE_HTTP_EXPIRES);
|
||||
if (value != NULL)
|
||||
{
|
||||
res = ALLOWED;
|
||||
@@ -298,7 +296,7 @@ enum cache_pending_action tfe_cache_put_pending(const struct tfe_http_field *res
|
||||
}
|
||||
if (res == ALLOWED)
|
||||
{
|
||||
get_response_freshness(response, n_fields, freshness);
|
||||
get_response_freshness(response, freshness);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user