Index: libabac/abac_c.c
===================================================================
--- libabac/abac_c.c	(revision 5d06689e2b01138202c40932797284b0fcdf7603)
+++ libabac/abac_c.c	(revision 5d06689e2b01138202c40932797284b0fcdf7603)
@@ -0,0 +1,126 @@
+
+#include "abac_internal.h"
+
+/* a very thin layer to libabac calls so c interface and c++ interface
+   looks about the same */
+
+/* CONSTRAINT->abac_condition_t */
+void abac_constraint_add_integer_max(abac_condition_t *cond,int val)
+{ abac_condition_add_range_integer_item(cond,abac_max_item_type(),val); }
+void abac_constraint_add_integer_min(abac_condition_t *cond,int val)
+{ abac_condition_add_range_integer_item(cond,abac_min_item_type(),val); }
+void abac_constraint_add_integer_target(abac_condition_t *cond,int val)
+{ abac_condition_add_range_integer_item(cond,abac_target_item_type(),val); }
+void abac_constraint_add_float_max(abac_condition_t *cond,float val)
+{ abac_condition_add_range_float_item(cond,abac_max_item_type(),val); }
+void abac_constraint_add_float_min(abac_condition_t *cond,float val)
+{ abac_condition_add_range_float_item(cond,abac_min_item_type(),val); }
+void abac_constraint_add_float_target(abac_condition_t *cond,float val)
+{ abac_condition_add_range_float_item(cond,abac_target_item_type(),val); }
+void abac_constraint_add_time_max(abac_condition_t *cond,char* val)
+{ abac_condition_add_range_time_item(cond,abac_max_item_type(),val); }
+void abac_constraint_add_time_min(abac_condition_t *cond,char* val)
+{ abac_condition_add_range_time_item(cond,abac_min_item_type(),val); }
+void abac_constraint_add_time_target(abac_condition_t *cond,char* val)
+{ abac_condition_add_range_time_item(cond,abac_target_item_type(),val); }
+void abac_constraint_add_urn_target(abac_condition_t *cond,char* val)
+{ abac_condition_add_range_urn_item(cond,val); }
+void abac_constraint_add_string_target(abac_condition_t *cond,char* val)
+{ abac_condition_add_range_string_item(cond,val); }
+void abac_constraint_add_boolean_target(abac_condition_t *cond, char* val)
+{ abac_condition_add_range_boolean_item(cond,val); }
+abac_condition_t *abac_constraint_from_role(abac_aspect_t *ptr)
+{ return abac_condition_create_from_aspect(ptr); }
+abac_condition_t *abac_constraint_from_oset(abac_aspect_t *ptr)
+{ return abac_condition_create_from_aspect(ptr); }
+
+/* ROLE/OSET -> abac_aspect_t */
+abac_aspect_t *abac_role_principal_create(char *principal_name)
+{ return abac_aspect_role_principal_create(principal_name); }
+abac_aspect_t *abac_oset_principal_create(char *principal_name)
+{ return abac_aspect_principal_new(e_ASPECTTYPE_OSET,principal_name); }
+abac_aspect_t *abac_oset_create(char *principal_name, char *oset_name)
+{ return abac_aspect_new(e_ASPECTTYPE_OSET,principal_name,oset_name); }
+abac_aspect_t *abac_role_create(char *principal_name, char *role_name)
+{ return abac_aspect_new(e_ASPECTTYPE_ROLE,principal_name,role_name); }
+abac_aspect_t *abac_oset_object_create(abac_term_t *object)
+{ return abac_aspect_object_new(e_ASPECTTYPE_OSET,object); }
+bool abac_oset_is_object(abac_aspect_t *ptr)
+{ return abac_aspect_is_object(ptr); }
+bool abac_oset_is_principal(abac_aspect_t *ptr)
+{ return abac_aspect_is_principal(ptr); }
+bool abac_role_is_principal(abac_aspect_t *ptr)
+{ return abac_aspect_is_principal(ptr); }
+bool abac_oset_is_linking(abac_aspect_t *ptr)
+{ return abac_aspect_is_linking(ptr); }
+bool abac_role_is_linking(abac_aspect_t *ptr)
+{ return abac_aspect_is_linking(ptr); }
+char *abac_role_linked_role(abac_aspect_t *ptr)
+{ return abac_aspect_linked_role_name(ptr); }
+char *abac_oset_linked_role(abac_aspect_t *ptr)
+{ return abac_aspect_linked_role_name(ptr); }
+char *abac_role_name(abac_aspect_t *ptr)
+{ return abac_aspect_aspect_name(ptr); }
+char *abac_oset_name(abac_aspect_t *ptr)
+{ return abac_aspect_aspect_name(ptr); }
+char *abac_role_principal(abac_aspect_t *ptr)
+{ return abac_aspect_principal_name(ptr); }
+char *abac_oset_principal(abac_aspect_t *ptr)
+{ return abac_aspect_principal_name(ptr); }
+void abac_role_add_data_term(abac_aspect_t *ptr, abac_term_t *param)
+{ abac_aspect_add_param(ptr, param); }
+void abac_oset_add_data_term(abac_aspect_t *ptr, abac_term_t *param)
+{ abac_aspect_add_param(ptr, param); }
+void abac_role_add_linked_data_term(abac_aspect_t *ptr, abac_term_t *param)
+{ abac_aspect_add_linked_param(ptr, param); }
+void abac_oset_add_linked_data_term(abac_aspect_t *ptr, abac_term_t *param)
+{ abac_aspect_add_linked_param(ptr, param); }
+char *abac_oset_object(abac_aspect_t *ptr)
+{ return abac_aspect_object_name(ptr); }
+
+/* ATTRIBUTE -> abac_attribute_t */
+char *abac_head_string(abac_attribute_t *ptr)
+{
+  abac_aspect_t *head=abac_attribute_head(ptr);
+  char *string=abac_aspect_string(head);
+  return string;
+}
+char *abac_tail_string(abac_attribute_t *ptr)
+{
+  abac_aspect_t *tail=abac_attribute_tail(ptr);
+  char *string=abac_aspect_string(tail);
+  return string;
+}
+char *abac_head_typed_string(abac_attribute_t *ptr)
+{
+  abac_aspect_t *head=abac_attribute_head(ptr);
+  char *string=abac_aspect_typed_string(head);
+  return string;
+}
+char *abac_tail_typed_string(abac_attribute_t *ptr)
+{
+  abac_aspect_t *tail=abac_attribute_tail(ptr);
+  char *string=abac_aspect_typed_string(tail);
+  return string;
+}
+
+/* CONTEXT -> abac_context_t */
+int abac_context_load_id(abac_context_t *ptr, abac_id_t *id)
+{ return abac_context_load_id_id(ptr, id); }
+int abac_context_load_id_file(abac_context_t *ptr, char *filename)
+{ return abac_context_load_id_idkey_file(ptr, filename); }
+int abac_context_load_id_files(abac_context_t *ptr, char *filename, char *keyfilename)
+{ return abac_context_load_id_id_file_key_file(ptr, filename, keyfilename); }
+int abac_context_load_attribute(abac_context_t *ptr, abac_attribute_t *attr)
+{ return abac_context_load_attribute_attribute(ptr, attr); }
+
+
+
+
+
+
+
+
+
+
+
