GME  13
apr_iconv.h
Go to the documentation of this file.
00001 /*-
00002  * Copyright (c) 1999,2000
00003  *      Konstantin Chuguev.  All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  * 1. Redistributions of source code must retain the above copyright
00009  *    notice, this list of conditions and the following disclaimer.
00010  * 2. Redistributions in binary form must reproduce the above copyright
00011  *    notice, this list of conditions and the following disclaimer in the
00012  *    documentation and/or other materials provided with the distribution.
00013  * 3. All advertising materials mentioning features or use of this software
00014  *    must display the following acknowledgement:
00015  *      This product includes software developed by Konstantin Chuguev
00016  *      and its contributors.
00017  *
00018  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
00019  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
00022  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00023  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00024  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00025  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00026  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00027  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00028  * SUCH DAMAGE.
00029  *
00030  */
00031 
00032 #ifndef APR_ICONV_H
00033 #define APR_ICONV_H
00034 
00040 #include "apr.h"
00041 #include "apr_pools.h"
00042 #include <stddef.h>
00043 
00044 #ifdef __cplusplus
00045 extern "C" {
00046 #endif /* __cplusplus */
00047 
00067 #if defined(DOXYGEN) || !defined(WIN32)
00068 
00075 #define API_DECLARE(type)            type
00076 
00082 #define API_DECLARE_NONSTD(type)     type
00083 
00091 #define API_DECLARE_DATA
00092 #elif defined(API_DECLARE_STATIC)
00093 #define API_DECLARE(type)            type __stdcall
00094 #define API_DECLARE_NONSTD(type)     type __cdecl
00095 #define API_DECLARE_DATA
00096 #elif defined(API_DECLARE_EXPORT)
00097 #define API_DECLARE(type)            __declspec(dllexport) type __stdcall
00098 #define API_DECLARE_NONSTD(type)     __declspec(dllexport) type __cdecl
00099 #define API_DECLARE_DATA             __declspec(dllexport)
00100 #else
00101 #define API_DECLARE(type)            __declspec(dllimport) type __stdcall
00102 #define API_DECLARE_NONSTD(type)     __declspec(dllimport) type __cdecl
00103 #define API_DECLARE_DATA             __declspec(dllimport)
00104 #endif
00105 
00106 /*
00107  * apr_iconv_t: charset conversion descriptor type
00108  */
00109 typedef void *apr_iconv_t;
00110 
00111 /* __BEGIN_DECLS */
00112 
00120 API_DECLARE(apr_status_t) apr_iconv_open(const char *to, const char *from,
00121                                          apr_pool_t *pool, apr_iconv_t *cd);
00131 API_DECLARE(apr_status_t) apr_iconv(apr_iconv_t cd,
00132                           const char **inbuf, apr_size_t *inbytesleft,
00133                           char **outbuf, apr_size_t *outbytesleft,
00134                           apr_size_t *translated);
00140 API_DECLARE(apr_status_t) apr_iconv_close(apr_iconv_t cd, apr_pool_t *pool);
00141 
00142 /* __END_DECLS */
00143 
00146 #ifdef __cplusplus
00147 }
00148 #endif
00149 
00150 #endif /* APR_ICONV_H */