2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _FM_DIAGCODE_H
2N/A#define _FM_DIAGCODE_H
2N/A
2N/A#include <sys/types.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * The following interfaces are private to Sun and should
2N/A * not be used by applications developed outside of Sun.
2N/A * They may change incompatibly or go away without notice.
2N/A */
2N/A
2N/A#define FM_DC_VERSION 1 /* pass to fm_dc_opendict() */
2N/A
2N/Atypedef struct fm_dc_handle fm_dc_handle_t;
2N/A
2N/A/* open a dictionary, return opaque handle */
2N/Afm_dc_handle_t *fm_dc_opendict(int version, const char *dirpath,
2N/A const char *dictname);
2N/A
2N/A/* close a dictionary */
2N/Avoid fm_dc_closedict(fm_dc_handle_t *dhp);
2N/A
2N/A/* return maximum length (in bytes) of diagcodes for a given dictionary */
2N/Asize_t fm_dc_codelen(fm_dc_handle_t *dhp);
2N/A
2N/A/* return number of strings in key for a given dictionary, plus 1 for null */
2N/Aint fm_dc_maxkey(fm_dc_handle_t *dhp);
2N/A
2N/A/* given a key, construct a diagcode */
2N/Aint fm_dc_key2code(fm_dc_handle_t *dhp,
2N/A const char *key[], char *code, size_t maxcode);
2N/A
2N/A/* given a diagcode, return the key (array of strings) */
2N/Aint fm_dc_code2key(fm_dc_handle_t *dhp, const char *code,
2N/A char *key[], int maxkey);
2N/A
2N/A/* return the right-hand side of a names property from the dict header */
2N/Aconst char *fm_dc_getprop(fm_dc_handle_t *dhp, const char *name);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _FM_DIAGCODE_H */