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