Index: libabac/abac_external.h
===================================================================
--- libabac/abac_external.h	(revision 2e9455f11fea0205b8b4b1306b5d0804cda72e10)
+++ libabac/abac_external.h	(revision 2e9455f11fea0205b8b4b1306b5d0804cda72e10)
@@ -0,0 +1,152 @@
+#ifndef __ABAC_X_H__
+#define __ABAC_X_H__
+
+/* forward from abac_util */
+extern char *abac_version();
+extern char *abac_xstrdup(char*);
+extern void abac_errx(int eval, const char *msg);
+
+/* abac functions that are used in abac.hh */
+extern void show_yap_db(const char *);
+extern void show_debug_info(const char *);
+extern void abac_constraint_add_integer_max(abac_condition_t *cond,int val);
+extern void abac_constraint_add_integer_min(abac_condition_t *cond,int val);
+extern void abac_constraint_add_integer_target(abac_condition_t *cond,int val);
+extern void abac_constraint_add_float_max(abac_condition_t *cond,float val);
+extern void abac_constraint_add_float_min(abac_condition_t *cond,float val);
+extern void abac_constraint_add_float_target(abac_condition_t *cond,float val);
+extern void abac_constraint_add_time_max(abac_condition_t *cond,char* val);
+extern void abac_constraint_add_time_min(abac_condition_t *cond,char* val);
+extern void abac_constraint_add_time_target(abac_condition_t *cond,char* val);
+extern void abac_constraint_add_urn_target(abac_condition_t *cond,char* val);
+extern void abac_constraint_add_string_target(abac_condition_t *cond,char* val);
+extern void abac_constraint_add_boolean_target(abac_condition_t *cond, char* val);
+extern abac_condition_t *abac_constraint_from_role(abac_aspect_t *ptr);
+extern abac_condition_t *abac_constraint_create(char *vtype);
+extern abac_condition_t *abac_constraint_from_oset(abac_aspect_t *);
+extern char *abac_constraint_typed_string(abac_condition_t *);
+extern char *abac_constraint_string(abac_condition_t *);
+extern abac_aspect_t *abac_role_principal_create(char *);
+extern abac_aspect_t *abac_role_create(char *, char *);
+extern abac_aspect_t *abac_oset_create(char *, char *);
+extern abac_aspect_t *abac_oset_linked_create(char *principal_name, char *linked_role_name, char *oset_name);
+extern abac_aspect_t *abac_role_linked_create(char *principal_name, char *linked_role_name, char *role_name);
+extern abac_aspect_t *abac_oset_object_create(abac_term_t *object);
+extern int abac_oset_is_object(abac_aspect_t *ptr);
+extern int abac_oset_is_principal(abac_aspect_t *ptr);
+extern int abac_role_is_principal(abac_aspect_t *ptr);
+extern int abac_oset_is_linking(abac_aspect_t *ptr);
+extern int abac_role_is_linking(abac_aspect_t *ptr);
+extern char *abac_role_linked_role(abac_aspect_t *ptr);
+extern char *abac_oset_linked_role(abac_aspect_t *ptr);
+extern char *abac_role_name(abac_aspect_t *ptr);
+extern char *abac_oset_name(abac_aspect_t *ptr);
+extern char *abac_role_principal(abac_aspect_t *ptr);
+extern char *abac_oset_principal(abac_aspect_t *ptr);
+extern void abac_role_add_data_term(abac_aspect_t *ptr, abac_term_t *param);
+extern void abac_oset_add_data_term(abac_aspect_t *ptr, abac_term_t *param);
+extern void abac_role_add_linked_data_term(abac_aspect_t *ptr, abac_term_t *param);
+extern void abac_oset_add_linked_data_term(abac_aspect_t *ptr, abac_term_t *param);
+extern char *abac_oset_object(abac_aspect_t *ptr);
+extern char *abac_oset_typed_string(abac_aspect_t *ptr);
+extern char *abac_oset_string(abac_aspect_t *ptr);
+extern char *abac_role_typed_string(abac_aspect_t *ptr);
+extern char *abac_role_string(abac_aspect_t *ptr);
+extern abac_term_t **abac_oset_get_data_terms(abac_aspect_t *ptr);
+extern abac_term_t **abac_oset_get_linked_data_terms(abac_aspect_t *ptr);
+extern abac_term_t **abac_role_get_data_terms(abac_aspect_t *ptr);
+extern abac_term_t **abac_role_get_linked_data_terms(abac_aspect_t *ptr);
+extern void abac_id_write_cert_fname(abac_id_t *ptr,char *filename);
+extern void abac_id_write_privkey_fname(abac_id_t *ptr,char *filename);
+extern char *abac_head_string(abac_attribute_t *ptr);
+extern char *abac_tail_string(abac_attribute_t *ptr);
+extern char *abac_head_typed_string(abac_attribute_t *ptr);
+extern char *abac_tail_typed_string(abac_attribute_t *ptr);
+extern void abac_attribute_write_cert_fname(abac_attribute_t *ptr,char *filename);
+extern abac_aspect_t **abac_attribute_role_tails(abac_attribute_t *ptr);
+extern abac_aspect_t **abac_attribute_oset_tails(abac_attribute_t *ptr);
+extern int abac_context_principal_count(abac_context_t *ptr);
+extern int abac_context_credential_count(abac_context_t *ptr);
+extern int abac_context_load_id(abac_context_t *ptr, abac_id_t *id);
+extern int abac_context_load_id_idkey_file(abac_context_t *ptr, char *filename);
+extern int abac_context_load_id_files(abac_context_t *ptr, char *filename, char *keyfilename);
+extern int abac_context_load_encrypted_id_file(abac_context_t *ptr, char *filename, char *pfile);
+extern int abac_context_load_encrypted_id_files(abac_context_t *ptr, char *filename, char *keyfilename, char *pfile);
+extern abac_aspect_t *abac_aspect_dup(abac_aspect_t*);
+extern void abac_aspect_free(abac_aspect_t*);
+extern void abac_aspects_free(abac_aspect_t **);
+extern abac_attribute_t *abac_attribute_add_tail(abac_attribute_t*, abac_aspect_t *);
+extern int abac_attribute_bake(abac_attribute_t*);
+extern int abac_attribute_baked(abac_attribute_t*);
+extern abac_chunk_t abac_attribute_cert_chunk(abac_attribute_t*);
+extern int abac_attribute_create(abac_attribute_t **ret,abac_aspect_t *head, abac_aspect_t *tail,int validity);
+extern abac_attribute_t *abac_attribute_dup(abac_attribute_t *);
+extern void abac_attribute_free(abac_attribute_t *);
+extern abac_attribute_t *abac_attribute_from_chunk(abac_chunk_t achunk);
+extern abac_aspect_t *abac_attribute_head(abac_attribute_t *);
+extern int abac_attribute_is_role(abac_attribute_t *);
+extern char *abac_attribute_string(abac_attribute_t*);
+extern char *abac_attribute_typed_string(abac_attribute_t*);
+extern int abac_attribute_write_cert(abac_attribute_t*, FILE *out);
+extern abac_condition_t *abac_condition_dup(abac_condition_t *);
+extern void abac_condition_free(abac_condition_t *);
+extern abac_credential_t **abac_context_credentials(abac_context_t *);
+extern void abac_free_credentials(abac_credential_t **);
+extern abac_context_t *abac_context_dup(abac_context_t *);
+extern void abac_context_free(abac_context_t*);
+extern int abac_context_load_attribute_chunk(abac_context_t*, abac_chunk_t);
+extern void abac_context_load_directory(abac_context_t*, char*);
+extern void abac_context_load_principals(abac_context_t*, char*);
+extern abac_context_t *abac_context_new();
+extern abac_context_t *abac_context_named_new(char*);
+extern abac_id_credential_t *abac_context_principal_lookup(abac_context_t*, char*);
+extern abac_id_credential_t **abac_context_principals(abac_context_t *);
+extern void abac_free_principals(abac_id_credential_t **);
+extern abac_credential_t **abac_context_query(abac_context_t*, char*, char*, int*);
+extern void abac_context_set_no_partial_proof(abac_context_t*);
+extern void abac_context_set_want_partial_proof(abac_context_t*);
+extern abac_attribute_t *abac_credential_attribute(abac_credential_t *);
+extern abac_chunk_t abac_id_cert_chunk(abac_id_t *);
+extern char *abac_id_cn(abac_id_t *);
+extern abac_id_t *abac_id_credential_id(abac_id_credential_t*);
+extern abac_id_t *abac_id_dup(abac_id_t *);
+extern void abac_id_free(abac_id_t *);
+extern abac_id_t *abac_id_from_chunk(abac_chunk_t);
+extern abac_id_t *abac_id_from_file(char *filename);
+extern int abac_id_generate(abac_id_t **ret, char *cn, int validity);
+extern int abac_id_generate_with_key(abac_id_t **ret, char *cn, int validity, char *keyfile, char *pfile);
+extern int abac_id_has_privkey(abac_id_t *id);
+extern char *abac_id_keyid(abac_id_t *id);
+extern int abac_id_load_privkey_file(abac_id_t *id, char *filename);
+extern abac_chunk_t abac_id_privkey_chunk(abac_id_t *id);
+extern char *abac_id_string(abac_id_t *id);
+extern void abac_id_write_cert(abac_id_t *id, FILE *out);
+extern int abac_id_write_privkey(abac_id_t *id, FILE *out);
+extern abac_term_t *abac_term_add_constraint(abac_term_t*, abac_condition_t*);
+extern abac_term_t *abac_term_create(char*,char*,abac_condition_t*);
+extern abac_term_t *abac_term_dup(abac_term_t*);
+extern void abac_term_free(abac_term_t*);
+extern abac_term_t *abac_term_id_create(abac_id_t *);
+extern int abac_term_is_integer(abac_term_t*);
+extern int abac_term_is_string(abac_term_t*);
+extern int abac_term_is_time(abac_term_t*);
+extern int abac_term_is_urn(abac_term_t*);
+extern void abac_terms_free(abac_term_t **);
+extern char *abac_term_string(abac_term_t*);
+extern int abac_context_load_attribute_file(abac_context_t *ctx, char *filename);
+extern int abac_context_load_id_chunk(abac_context_t *ctx, abac_chunk_t cert);
+extern int abac_context_load_id_enc_privkey_chunk(abac_context_t *ctx,abac_chunk_t cert, abac_chunk_t privkey, char *pfile);
+extern int abac_context_load_id_privkey_chunk(abac_context_t *ctx, abac_chunk_t cert, abac_chunk_t privkey);
+extern abac_credential_t **abac_context_query_again(abac_context_t *ctx, int *success);
+extern abac_credential_t **abac_context_query_with_structure(abac_context_t*, abac_aspect_t*, abac_aspect_t*, int*);
+extern int abac_id_load_enc_privkey_file(abac_id_t *ptr, char *keyfile, char *pfile);
+extern abac_term_t *abac_term_named_create(char *name);
+extern char *abac_term_typed_string(abac_term_t *ptr);
+extern int abac_term_type(abac_term_t *term);
+extern abac_aspect_t *abac_oset_principal_create(char *principal_name);
+extern int abac_context_load_attribute(abac_context_t *ptr, abac_attribute_t *attr);
+extern char *abac_term_name(abac_term_t *term);
+
+extern void abac_attribute_set_using_this(abac_attribute_t *,int);
+
+#endif /* __ABAC_X_H__ */
