#ifndef __PL_YAP_H__ #define __PL_YAP_H__ #include "abac_internal.h" #include "abac_verifier.h" #define ABAC_PL_CRED_OK 0 // adding a credential succeeded #define ABAC_PL_CRED_INVALID -1 // the credential was invalid #define ABAC_PL_CRED_DUP -2 // the credential is already present typedef struct _abac_pl_t abac_pl_t; abac_pl_t *abac_pl_new(void); int abac_pl_add_credential(abac_pl_t *pl, abac_credential_t *cred); abac_pl_t *abac_pl_dup(abac_pl_t *pl); /* return a list of credentials */ abac_stack_t *abac_pl_query(abac_pl_t *pl, char *role, char *principal); abac_stack_t *abac_pl_query_again(abac_pl_t *pl); abac_stack_t *abac_pl_query_with_structure(abac_pl_t *pl, abac_aspect_t *head_aspect, abac_aspect_t *tail_aspect); void abac_pl_set_no_partial(abac_pl_t *pl); void abac_pl_set_want_partial(abac_pl_t *pl); int abac_pl_returning_partial(abac_pl_t *pl); /* return a list of all credentials in the pl file */ abac_stack_t *abac_pl_credentials(abac_pl_t *pl); abac_stack_t *abac_pl_principals(abac_pl_t *pl); void abac_pl_free(abac_pl_t *pl); #endif /* __PL_YAP_H__ */