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