mod_xml2enc.h revision f4d3a92b319b23e2b8d67298acc289d52bc1c517
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq/* Licensed to the Apache Software Foundation (ASF) under one or more
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq * contributor license agreements. See the NOTICE file distributed with
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq * this work for additional information regarding copyright ownership.
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq * The ASF licenses this file to You under the Apache License, Version 2.0
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq * (the "License"); you may not use this file except in compliance with
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq * the License. You may obtain a copy of the License at
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq *
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq * http://www.apache.org/licenses/LICENSE-2.0
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq *
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq * Unless required by applicable law or agreed to in writing, software
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq * distributed under the License is distributed on an "AS IS" BASIS,
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq * See the License for the specific language governing permissions and
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq * limitations under the License.
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq */
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#ifndef MOD_XML2ENC
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define MOD_XML2ENC
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define ENCIO_INPUT 0x01
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define ENCIO_OUTPUT 0x02
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define ENCIO_INPUT_CHECKS 0x04
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define ENCIO (ENCIO_INPUT|ENCIO_OUTPUT|ENCIO_INPUT_CHECKS)
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define ENCIO_SKIPTO 0x10
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq/* declarations to deal with WIN32 compile-flag-in-source-code crap */
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#if !defined(WIN32)
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE(type) type
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE_NONSTD(type) type
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE_DATA
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#elif defined(XML2ENC_DECLARE_STATIC)
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE(type) type __stdcall
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE_NONSTD(type) type
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE_DATA
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#elif defined(XML2ENC_DECLARE_EXPORT)
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE(type) __declspec(dllexport) type __stdcall
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE_NONSTD(type) __declspec(dllexport) type
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE_DATA __declspec(dllexport)
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#else
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE(type) __declspec(dllimport) type __stdcall
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE_NONSTD(type) __declspec(dllimport) type
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#define XML2ENC_DECLARE_DATA __declspec(dllimport)
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#endif
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq
f4d3a92b319b23e2b8d67298acc289d52bc1c517niqAPR_DECLARE_OPTIONAL_FN(apr_status_t, xml2enc_charset,
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq (request_rec* r, xmlCharEncoding* enc,
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq const char** cenc));
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq
f4d3a92b319b23e2b8d67298acc289d52bc1c517niqAPR_DECLARE_OPTIONAL_FN(apr_status_t, xml2enc_filter,
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq (request_rec* r, const char* enc, unsigned int mode));
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq
f4d3a92b319b23e2b8d67298acc289d52bc1c517niqAPR_DECLARE_EXTERNAL_HOOK(xml2enc, XML2ENC, int, preprocess,
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq (ap_filter_t *f, char** bufp, apr_size_t* bytesp))
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq
f4d3a92b319b23e2b8d67298acc289d52bc1c517niq#endif