1 /*	$NetBSD: result.h,v 1.1.1.3 2014/12/10 03:34:44 christos Exp $	*/
2 
3 /*
4  * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
5  *
6  * Permission to use, copy, modify, and/or distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef PK11_RESULT_H
20 #define PK11_RESULT_H 1
21 
22 /*! \file pk11/result.h */
23 
24 #include <isc/lang.h>
25 #include <isc/resultclass.h>
26 
27 /*
28  * Nothing in this file truly depends on <isc/result.h>, but the
29  * PK11 result codes are considered to be publicly derived from
30  * the ISC result codes, so including this file buys you the ISC_R_
31  * namespace too.
32  */
33 #include <isc/result.h>		/* Contractual promise. */
34 
35 #define PK11_R_INITFAILED		(ISC_RESULTCLASS_PK11 + 0)
36 #define PK11_R_NOPROVIDER		(ISC_RESULTCLASS_PK11 + 1)
37 #define PK11_R_NORANDOMSERVICE		(ISC_RESULTCLASS_PK11 + 2)
38 #define PK11_R_NODIGESTSERVICE		(ISC_RESULTCLASS_PK11 + 3)
39 #define PK11_R_NOAESSERVICE		(ISC_RESULTCLASS_PK11 + 4)
40 
41 #define PK11_R_NRESULTS			5	/* Number of results */
42 
43 ISC_LANG_BEGINDECLS
44 
45 LIBISC_EXTERNAL_DATA extern isc_msgcat_t *pk11_msgcat;
46 
47 void
48 pk11_initmsgcat(void);
49 
50 const char *
51 pk11_result_totext(isc_result_t);
52 
53 void
54 pk11_result_register(void);
55 
56 ISC_LANG_ENDDECLS
57 
58 #endif /* PK11_RESULT_H */
59