src/openpgp_compat.h
branchENGINE-73
changeset 1030 4354451338cd
child 1032 b4004d33c2a2
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/openpgp_compat.h	Thu Aug 18 13:23:15 2016 +0200
     1.3 @@ -0,0 +1,47 @@
     1.4 +// openpgp_compat.h
     1.5 +//
     1.6 +// These functions are the exposure of non-generic PGP-specific functionality (largely related to PGP
     1.7 +// keyrings) to adapters that need them without polluting the engine interface.
     1.8 +//
     1.9 +#pragma once
    1.10 +
    1.11 +#ifdef __cplusplus
    1.12 +extern "C" {
    1.13 +#endif
    1.14 +
    1.15 +#include <stddef.h>
    1.16 +#include <stdint.h>
    1.17 +#include <stdbool.h>
    1.18 +    
    1.19 +#include "dynamic_api.h"
    1.20 +#include "stringpair.h"    
    1.21 +
    1.22 +#ifdef USE_GPG
    1.23 +#include "pgp_gpg.h"
    1.24 +#else
    1.25 +#ifdef USE_NETPGP
    1.26 +#include "pgp_netpgp.h"
    1.27 +#endif
    1.28 +#endif    
    1.29 +    
    1.30 +//  OpenPGP_list_keyinfo() - get a key/UID list for pattern matches in keyring (NULL
    1.31 +//                           to return entire keyring)
    1.32 +//
    1.33 +//  parameters:
    1.34 +//      session (in)          session handle
    1.35 +//      show_revoked (in)     true if identities with revoked primary keys should also
    1.36 +//                            be listed; false if only valid keys should be shown
    1.37 +//      keyinfo_list (out)    list of identities for each available key 
    1.38 +//
    1.39 +//  caveat: FIXME
    1.40 +//        the ownership of the identity list goes to the caller
    1.41 +//        the caller must use free_identity_list() to free it
    1.42 +//        identity objects derived from the keyring only have the available information
    1.43 +//           from the keyring; some fields may be NULL
    1.44 +DYNAMIC_API PEP_STATUS OpenPGP_list_keyinfo (
    1.45 +        PEP_SESSION session, stringpair_list_t** keyinfo_list, char* search_pattern
    1.46 +    );
    1.47 +    
    1.48 +#ifdef __cplusplus
    1.49 +}
    1.50 +#endif
    1.51 \ No newline at end of file