From c6ef76e79c677c0095e75d2183b199f6c2205910 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. --- trunk/NEWS | 11 +++++++++++ trunk/TODO | 4 ++++ trunk/doc/ChangeLog | 5 +++++ trunk/doc/gpgme.texi | 3 +++ trunk/gpgme/ChangeLog | 5 +++++ trunk/gpgme/gpgme.h | 27 +++++++++++++++++---------- trunk/gpgme/keylist.c | 1 + 7 files changed, 46 insertions(+), 10 deletions(-) diff --git a/trunk/NEWS b/trunk/NEWS index 9950670..7fd510c 100644 --- a/trunk/NEWS +++ b/trunk/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/trunk/TODO b/trunk/TODO index 01b4a10..f8ddae4 100644 --- a/trunk/TODO +++ b/trunk/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/trunk/doc/ChangeLog b/trunk/doc/ChangeLog index 0a76093..c472cc0 100644 --- a/trunk/doc/ChangeLog +++ b/trunk/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/trunk/doc/gpgme.texi b/trunk/doc/gpgme.texi index 86e45a7..5f9501b 100644 --- a/trunk/doc/gpgme.texi +++ b/trunk/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/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index 0bb086a..60eeb43 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/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/trunk/gpgme/gpgme.h b/trunk/gpgme/gpgme.h index 71883bd..2604677 100644 --- a/trunk/gpgme/gpgme.h +++ b/trunk/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/trunk/gpgme/keylist.c b/trunk/gpgme/keylist.c index e65abae..57dda54 100644 --- a/trunk/gpgme/keylist.c +++ b/trunk/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