1178525Sjb/*
2178525Sjb * CDDL HEADER START
3178525Sjb *
4178525Sjb * The contents of this file are subject to the terms of the
5178525Sjb * Common Development and Distribution License (the "License").
6178525Sjb * You may not use this file except in compliance with the License.
7178525Sjb *
8178525Sjb * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9178525Sjb * or http://www.opensolaris.org/os/licensing.
10178525Sjb * See the License for the specific language governing permissions
11178525Sjb * and limitations under the License.
12178525Sjb *
13178525Sjb * When distributing Covered Code, include this CDDL HEADER in each
14178525Sjb * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15178525Sjb * If applicable, add the following below this CDDL HEADER, with the
16178525Sjb * fields enclosed by brackets "[]" replaced with your own identifying
17178525Sjb * information: Portions Copyright [yyyy] [name of copyright owner]
18178525Sjb *
19178525Sjb * CDDL HEADER END
20178525Sjb */
21178525Sjb/*
22178525Sjb * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23178525Sjb * Use is subject to license terms.
24178525Sjb */
25178525Sjb
26178525Sjb#ifndef	_STRING_TABLE_DOT_H
27178525Sjb#define	_STRING_TABLE_DOT_H
28178525Sjb
29178525Sjb#pragma ident	"%Z%%M%	%I%	%E% SMI"
30178525Sjb
31178525Sjb#include <sys/types.h>
32178525Sjb
33178525Sjb#ifdef __cplusplus
34178525Sjbextern "C" {
35178525Sjb#endif
36178525Sjb
37178525Sjb/*
38178525Sjb * Exported, opaque string table handle.
39178525Sjb */
40178525Sjbtypedef struct str_tbl	Str_tbl;
41178525Sjb
42178525Sjb/*
43178525Sjb * Exported string table functions.
44178525Sjb */
45178525Sjbextern int		st_delstring(Str_tbl *, const char *);
46178525Sjbextern void		st_destroy(Str_tbl *);
47178525Sjbextern size_t		st_getstrtab_sz(Str_tbl *);
48178525Sjbextern const char	*st_getstrbuf(Str_tbl *);
49178525Sjbextern int		st_insert(Str_tbl *, const char *);
50178525Sjbextern Str_tbl		*st_new(uint_t);
51178525Sjbextern int		st_setstrbuf(Str_tbl *, char *, size_t);
52178525Sjbextern int		st_setstring(Str_tbl *, const char *, size_t *);
53178525Sjb
54178525Sjb/*
55178525Sjb * Exported flags values for st_new().
56178525Sjb */
57178525Sjb#define	FLG_STNEW_COMPRESS	0x01	/* compressed string table */
58178525Sjb
59178525Sjb#ifdef __cplusplus
60178525Sjb}
61178525Sjb#endif
62178525Sjb
63178525Sjb#endif /* _STRING_TABLE_DOT_H */
64