1139815Simp#-
2206361Sjoel# Copyright (c) 2000-2001 Boris Popov
375332Sbp# All rights reserved.
475332Sbp#
575332Sbp# Redistribution and use in source and binary forms, with or without
675332Sbp# modification, are permitted provided that the following conditions
775332Sbp# are met:
875332Sbp# 1. Redistributions of source code must retain the above copyright
975332Sbp#    notice, this list of conditions and the following disclaimer.
1075332Sbp# 2. Redistributions in binary form must reproduce the above copyright
1175332Sbp#    notice, this list of conditions and the following disclaimer in the
1275332Sbp#    documentation and/or other materials provided with the distribution.
1375332Sbp#
1475332Sbp# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1575332Sbp# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1675332Sbp# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1775332Sbp# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1875332Sbp# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1975332Sbp# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2075332Sbp# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2175332Sbp# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2275332Sbp# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2375332Sbp# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2475332Sbp# SUCH DAMAGE.
2575332Sbp#
2675332Sbp# $FreeBSD$
2775332Sbp#
2875332Sbp
2975332Sbp#include <sys/iconv.h>
3075332Sbp
3175332SbpINTERFACE iconv_converter;
3275332Sbp
3375332SbpSTATICMETHOD int open {
3475332Sbp	struct iconv_converter_class *dcp;
3575332Sbp	struct iconv_cspair *cspto;
3675332Sbp	struct iconv_cspair *cspfrom;
3775332Sbp	void **hpp;
3875332Sbp};
3975332Sbp
4075332SbpMETHOD int close {
4175332Sbp	void *handle;
4275332Sbp};
4375332Sbp
4475332SbpMETHOD int conv {
4575332Sbp	void *handle;
4675332Sbp	const char **inbuf;
4775332Sbp        size_t *inbytesleft;
4875332Sbp	char **outbuf;
4975332Sbp	size_t *outbytesleft;
50120492Sfjoe	int convchar;
51120492Sfjoe	int casetype;
5275332Sbp};
5375332Sbp
5475332SbpSTATICMETHOD int init {
5575332Sbp	struct iconv_converter_class *dcp;
5675332Sbp} DEFAULT iconv_converter_initstub;
5775332Sbp
58194665SdelphijSTATICMETHOD int done {
5975332Sbp	struct iconv_converter_class *dcp;
6075332Sbp} DEFAULT iconv_converter_donestub;
6175332Sbp
6275332SbpSTATICMETHOD const char * name {
6375332Sbp	struct iconv_converter_class *dcp;
6475332Sbp};
65194638Sdelphij
66194638SdelphijMETHOD int tolower {
67194638Sdelphij	void *handle;
68194638Sdelphij	int c;
69194638Sdelphij} DEFAULT iconv_converter_tolowerstub;
70194638Sdelphij
71194638SdelphijMETHOD int toupper {
72194638Sdelphij	void *handle;
73194638Sdelphij	int c;
74194638Sdelphij} DEFAULT iconv_converter_tolowerstub;
75