src/blacklist.h
author fdik
Thu, 03 Mar 2016 19:27:46 +0100
changeset 494 ddf4130d00a0
child 506 66b92bca4133
permissions -rw-r--r--
Added blacklist
fdik@494
     1
#pragma once
fdik@494
     2
fdik@494
     3
#include "pEpEngine.h"
fdik@494
     4
fdik@494
     5
#ifdef __cplusplus
fdik@494
     6
extern "C" {
fdik@494
     7
#endif
fdik@494
     8
fdik@494
     9
// blacklist_add() - add to blacklist
fdik@494
    10
//
fdik@494
    11
//  parameters:
fdik@494
    12
//      session (in)        session to use
fdik@494
    13
//      fpr (in)            fingerprint of key to blacklist
fdik@494
    14
fdik@494
    15
DYNAMIC_API PEP_STATUS blacklist_add(PEP_SESSION session, const char *fpr);
fdik@494
    16
fdik@494
    17
fdik@494
    18
// blacklist_delete() - delete from blacklist
fdik@494
    19
//
fdik@494
    20
//  parameters:
fdik@494
    21
//      session (in)        session to use
fdik@494
    22
//      fpr (in)            fingerprint of key to blacklist
fdik@494
    23
fdik@494
    24
DYNAMIC_API PEP_STATUS blacklist_delete(PEP_SESSION session, const char *fpr);
fdik@494
    25
fdik@494
    26
fdik@494
    27
// blacklist_is_listed() - is_listed from blacklist
fdik@494
    28
//
fdik@494
    29
//  parameters:
fdik@494
    30
//      session (in)        session to use
fdik@494
    31
//      fpr (in)            fingerprint of key to blacklist
fdik@494
    32
fdik@494
    33
DYNAMIC_API PEP_STATUS blacklist_is_listed(
fdik@494
    34
        PEP_SESSION session,
fdik@494
    35
        const char *fpr,
fdik@494
    36
        bool *listed
fdik@494
    37
    );
fdik@494
    38
fdik@494
    39
fdik@494
    40
// blacklist_retrieve() - retrieve full blacklist of key fingerprints
fdik@494
    41
//
fdik@494
    42
//  parameters:
fdik@494
    43
//      session (in)        session to use
fdik@494
    44
//      blacklist (out)     copy of blacklist
fdik@494
    45
//
fdik@494
    46
//  caveat:
fdik@494
    47
//      the ownership of the copy of blacklist goes to the caller
fdik@494
    48
fdik@494
    49
DYNAMIC_API PEP_STATUS blacklist_retrieve(
fdik@494
    50
        PEP_SESSION session,
fdik@494
    51
        stringlist_t **blacklist
fdik@494
    52
    );
fdik@494
    53
fdik@494
    54
fdik@494
    55
#ifdef __cplusplus
fdik@494
    56
}
fdik@494
    57
#endif
fdik@494
    58