citrus_db_factory.h revision 219019
13199Sjkh/* $FreeBSD: head/lib/libc/iconv/citrus_db_factory.h 219019 2011-02-25 00:04:39Z gabor $ */ 23199Sjkh/* $NetBSD: citrus_db_factory.h,v 1.3 2008/02/09 14:56:20 junyoung Exp $ */ 33199Sjkh 43199Sjkh/*- 53199Sjkh * Copyright (c)2003 Citrus Project, 63199Sjkh * All rights reserved. 73199Sjkh * 83199Sjkh * Redistribution and use in source and binary forms, with or without 93199Sjkh * modification, are permitted provided that the following conditions 103199Sjkh * are met: 113199Sjkh * 1. Redistributions of source code must retain the above copyright 123199Sjkh * notice, this list of conditions and the following disclaimer. 133199Sjkh * 2. Redistributions in binary form must reproduce the above copyright 1482229Sdd * notice, this list of conditions and the following disclaimer in the 153199Sjkh * documentation and/or other materials provided with the distribution. 163199Sjkh * 173199Sjkh * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 183199Sjkh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 193199Sjkh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 203199Sjkh * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 213199Sjkh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 223199Sjkh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 233199Sjkh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 243199Sjkh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 253199Sjkh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 263199Sjkh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2750476Speter * SUCH DAMAGE. 283199Sjkh */ 29131570Ssimon 3072762Sru#ifndef _CITRUS_DB_FACTORY_H_ 3179538Sru#define _CITRUS_DB_FACTORY_H_ 323199Sjkh 333199Sjkhstruct _citrus_db_factory; 3413502Swollmantypedef uint32_t (*_citrus_db_hash_func_t)(struct _citrus_region *); 353199Sjkh 36158762Sbrueffer__BEGIN_DECLS 37158762Sbruefferint _citrus_db_factory_create(struct _citrus_db_factory **, 38158762Sbrueffer _citrus_db_hash_func_t, void *); 39158762Sbrueffervoid _citrus_db_factory_free(struct _citrus_db_factory *); 40158762Sbruefferint _citrus_db_factory_add(struct _citrus_db_factory *, 41158762Sbrueffer struct _citrus_region *, int, struct _citrus_region *, int); 42158762Sbruefferint _citrus_db_factory_add_by_string(struct _citrus_db_factory *, 43158762Sbrueffer const char *, struct _citrus_region *, int); 44158762Sbruefferint _citrus_db_factory_add8_by_string(struct _citrus_db_factory *, 45158762Sbrueffer const char *, uint8_t); 46158762Sbruefferint _citrus_db_factory_add16_by_string(struct _citrus_db_factory *, 47158762Sbrueffer const char *, uint16_t); 48158762Sbruefferint _citrus_db_factory_add32_by_string(struct _citrus_db_factory *, 49158762Sbrueffer const char *, uint32_t); 503199Sjkhint _citrus_db_factory_add_string_by_string(struct _citrus_db_factory *, 5113502Swollman const char *, const char *); 5213502Swollmansize_t _citrus_db_factory_calc_size(struct _citrus_db_factory *); 5379727Sschweikhint _citrus_db_factory_serialize(struct _citrus_db_factory *, 54131570Ssimon const char *, struct _citrus_region *); 5513502Swollman__END_DECLS 5640442Sken 5782327Sdd#endif 58131570Ssimon