Home | History | Annotate | Download | only in src
      1 /* Copyright (C) 2005 Red Hat, Inc. */
      2 
      3 struct semanage_bool;
      4 struct semanage_bool_key;
      5 typedef struct semanage_bool_key record_key_t;
      6 typedef struct semanage_bool record_t;
      7 #define DBASE_RECORD_DEFINED
      8 
      9 #include "boolean_internal.h"
     10 #include "handle.h"
     11 #include "database.h"
     12 
     13 int semanage_bool_query(semanage_handle_t * handle,
     14 			const semanage_bool_key_t * key,
     15 			semanage_bool_t ** response)
     16 {
     17 
     18 	dbase_config_t *dconfig = semanage_bool_dbase_policy(handle);
     19 	return dbase_query(handle, dconfig, key, response);
     20 }
     21 
     22 int semanage_bool_exists(semanage_handle_t * handle,
     23 			 const semanage_bool_key_t * key, int *response)
     24 {
     25 
     26 	dbase_config_t *dconfig = semanage_bool_dbase_policy(handle);
     27 	return dbase_exists(handle, dconfig, key, response);
     28 }
     29 
     30 int semanage_bool_count(semanage_handle_t * handle, unsigned int *response)
     31 {
     32 
     33 	dbase_config_t *dconfig = semanage_bool_dbase_policy(handle);
     34 	return dbase_count(handle, dconfig, response);
     35 }
     36 
     37 int semanage_bool_iterate(semanage_handle_t * handle,
     38 			  int (*handler) (const semanage_bool_t * record,
     39 					  void *varg), void *handler_arg)
     40 {
     41 
     42 	dbase_config_t *dconfig = semanage_bool_dbase_policy(handle);
     43 	return dbase_iterate(handle, dconfig, handler, handler_arg);
     44 }
     45 
     46 int semanage_bool_list(semanage_handle_t * handle,
     47 		       semanage_bool_t *** records, unsigned int *count)
     48 {
     49 
     50 	dbase_config_t *dconfig = semanage_bool_dbase_policy(handle);
     51 	return dbase_list(handle, dconfig, records, count);
     52 }
     53