• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _SEPOL_DEBUG_H_
2 #define _SEPOL_DEBUG_H_
3 
4 #include <sepol/handle.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 /* Deprecated */
11 extern void sepol_debug(int on);
12 /* End deprecated */
13 
14 #define SEPOL_MSG_ERR  1
15 #define SEPOL_MSG_WARN 2
16 #define SEPOL_MSG_INFO 3
17 
18 extern int sepol_msg_get_level(sepol_handle_t * handle);
19 
20 extern const char *sepol_msg_get_channel(sepol_handle_t * handle);
21 
22 extern const char *sepol_msg_get_fname(sepol_handle_t * handle);
23 
24 /* Set the messaging callback.
25  * By the default, the callback will print
26  * the message on standard output, in a
27  * particular format. Passing NULL here
28  * indicates that messaging should be suppressed */
29 extern void sepol_msg_set_callback(sepol_handle_t * handle,
30 #ifdef __GNUC__
31 				   __attribute__ ((format(printf, 3, 4)))
32 #endif
33 				   void (*msg_callback) (void *varg,
34 							 sepol_handle_t *
35 							 handle,
36 							 const char *fmt, ...),
37 				   void *msg_callback_arg);
38 
39 #ifdef __cplusplus
40 }
41 #endif
42 
43 #endif
44