src/blacklist.h
changeset 494 ddf4130d00a0
child 506 66b92bca4133
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/blacklist.h	Thu Mar 03 19:27:46 2016 +0100
     1.3 @@ -0,0 +1,58 @@
     1.4 +#pragma once
     1.5 +
     1.6 +#include "pEpEngine.h"
     1.7 +
     1.8 +#ifdef __cplusplus
     1.9 +extern "C" {
    1.10 +#endif
    1.11 +
    1.12 +// blacklist_add() - add to blacklist
    1.13 +//
    1.14 +//  parameters:
    1.15 +//      session (in)        session to use
    1.16 +//      fpr (in)            fingerprint of key to blacklist
    1.17 +
    1.18 +DYNAMIC_API PEP_STATUS blacklist_add(PEP_SESSION session, const char *fpr);
    1.19 +
    1.20 +
    1.21 +// blacklist_delete() - delete from blacklist
    1.22 +//
    1.23 +//  parameters:
    1.24 +//      session (in)        session to use
    1.25 +//      fpr (in)            fingerprint of key to blacklist
    1.26 +
    1.27 +DYNAMIC_API PEP_STATUS blacklist_delete(PEP_SESSION session, const char *fpr);
    1.28 +
    1.29 +
    1.30 +// blacklist_is_listed() - is_listed from blacklist
    1.31 +//
    1.32 +//  parameters:
    1.33 +//      session (in)        session to use
    1.34 +//      fpr (in)            fingerprint of key to blacklist
    1.35 +
    1.36 +DYNAMIC_API PEP_STATUS blacklist_is_listed(
    1.37 +        PEP_SESSION session,
    1.38 +        const char *fpr,
    1.39 +        bool *listed
    1.40 +    );
    1.41 +
    1.42 +
    1.43 +// blacklist_retrieve() - retrieve full blacklist of key fingerprints
    1.44 +//
    1.45 +//  parameters:
    1.46 +//      session (in)        session to use
    1.47 +//      blacklist (out)     copy of blacklist
    1.48 +//
    1.49 +//  caveat:
    1.50 +//      the ownership of the copy of blacklist goes to the caller
    1.51 +
    1.52 +DYNAMIC_API PEP_STATUS blacklist_retrieve(
    1.53 +        PEP_SESSION session,
    1.54 +        stringlist_t **blacklist
    1.55 +    );
    1.56 +
    1.57 +
    1.58 +#ifdef __cplusplus
    1.59 +}
    1.60 +#endif
    1.61 +