From 6aeee0426a98e306974a0e06a6e85cbe69e16dff Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Fri, 21 May 2004 15:15:21 +0000 Subject: [PATCH] doc/ 2004-05-21 Marcus Brinkmann * gpgme.texi (Key Management): Add note about new field keylist_mode of gpgme_key_t. gpgme/ 2004-05-21 Marcus Brinkmann * gpgme.h (struct _gpgme_key): New member keylist_mode. * keylist.c (keylist_colon_handler): Set the keylist_mode of KEY. --- NEWS | 11 +++++++++++ TODO | 4 ++++ doc/ChangeLog | 5 +++++ doc/gpgme.texi | 3 +++ gpgme/ChangeLog | 5 +++++ gpgme/gpgme.h | 27 +++++++++++++++++---------- gpgme/keylist.c | 1 + 7 files changed, 46 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 9950670..7fd510c 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,14 @@ +Noteworthy changes in version 0.9.0 (unreleased) +------------------------------------------------ + + * The type gpgme_key_t has now a new field keylist_mode that contains + the keylist mode that was active at the time the key was retrieved. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +gpgme_key_t EXTENDED: New field keylist_mode. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Noteworthy changes in version 0.4.7 (2004-04-29) ------------------------------------------------ diff --git a/TODO b/TODO index 01b4a10..f8ddae4 100644 --- a/TODO +++ b/TODO @@ -8,6 +8,10 @@ Hey Emacs, this is -*- outline -*- mode! * ABI's to break: ** I/O and User Data could be made extensible. But this can be done without breaking the ABI hopefully. +** gpgme_keylist_mode_t should not be an enum. Maybe some other values + should also not be an enum. All enums that should be enums need to + have a maximum value to ensure a certain minimum width for + extensibility. ** Compatibility interfaces that can be removed in future versions: *** ath compatibility modules. *** gpgme_data_new_from_filepart diff --git a/doc/ChangeLog b/doc/ChangeLog index 0a76093..c472cc0 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2004-05-21 Marcus Brinkmann + + * gpgme.texi (Key Management): Add note about new field + keylist_mode of gpgme_key_t. + 2004-04-29 Marcus Brinkmann * gpgme.texi (Verify): Correct type of member wrong_key_usage. diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 86e45a7..5f9501b 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -2348,6 +2348,9 @@ The @code{gpgme_key_t} type is a pointer to a key object. It has the following members: @table @code +@item unsigned int keylist_mode +The keylist mode that was active when the key was retrieved. + @item unsigned int revoked : 1 This is true if the key is revoked. diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 0bb086a..60eeb43 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,8 @@ +2004-05-21 Marcus Brinkmann + + * gpgme.h (struct _gpgme_key): New member keylist_mode. + * keylist.c (keylist_colon_handler): Set the keylist_mode of KEY. + 2004-04-29 Marcus Brinkmann * gpgme.h (struct _gpgme_signature): Change member WRONG_KEY_USAGE diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h index 71883bd..2604677 100644 --- a/gpgme/gpgme.h +++ b/gpgme/gpgme.h @@ -304,6 +304,17 @@ typedef enum } gpgme_protocol_t; + +/* The available keylist mode flags. */ +typedef enum + { + GPGME_KEYLIST_MODE_LOCAL = 1, + GPGME_KEYLIST_MODE_EXTERN = 2, + GPGME_KEYLIST_MODE_SIGS = 4, + GPGME_KEYLIST_MODE_VALIDATE = 256 + } +gpgme_keylist_mode_t; + /* The possible stati for the edit operation. */ typedef enum @@ -639,6 +650,12 @@ struct _gpgme_key /* Internal to GPGME, do not use. */ gpgme_user_id_t _last_uid; + + /* The keylist mode that was active when listing the key. */ + /* Implementation note: We are using unsigned int here, and not + gpgme_keylist_mode_t, as the latter is currently an enum of + unknown size. */ + unsigned int keylist_mode; }; typedef struct _gpgme_key *gpgme_key_t; @@ -697,16 +714,6 @@ void gpgme_set_include_certs (gpgme_ctx_t ctx, int nr_of_certs); /* Return the number of certs to include in an S/MIME message. */ int gpgme_get_include_certs (gpgme_ctx_t ctx); -/* The available keylist mode flags. */ -typedef enum - { - GPGME_KEYLIST_MODE_LOCAL = 1, - GPGME_KEYLIST_MODE_EXTERN = 2, - GPGME_KEYLIST_MODE_SIGS = 4, - GPGME_KEYLIST_MODE_VALIDATE = 256 - } -gpgme_keylist_mode_t; - /* Set keylist mode in CTX to MODE. */ gpgme_error_t gpgme_set_keylist_mode (gpgme_ctx_t ctx, gpgme_keylist_mode_t mode); diff --git a/gpgme/keylist.c b/gpgme/keylist.c index e65abae..57dda54 100644 --- a/gpgme/keylist.c +++ b/gpgme/keylist.c @@ -430,6 +430,7 @@ keylist_colon_handler (void *priv, char *line) err = _gpgme_key_new (&key); if (err) return err; + key->keylist_mode = ctx->keylist_mode; err = _gpgme_key_add_subkey (key, &subkey); if (err) { -- 2.26.2