@deftypefun {const char *} gpgme_key_get_string_attr (@w{GpgmeKey @var{key}}, @w{GpgmeAttr @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}})
The function @code{gpgme_key_get_string_attr} returns the value of the
string-representable attribute @var{what} of key @var{key}. If the
-attribute occurs more than once in the key, the index is specified by
-@var{idx}. This applies to attributes of sub keys and user IDs. The
-argument @var{reserved} is reserved for later use and should be
-@code{NULL}.
+attribute is an attribute of a sub key or an user ID, @var{idx}
+specifies the sub key or user ID of which the attribute value is
+returned. The argument @var{reserved} is reserved for later use and
+should be @code{NULL}.
The string returned is only valid as long as the key is valid.
@deftypefun {unsigned long} gpgme_key_get_ulong_attr (@w{GpgmeKey @var{key}}, @w{GpgmeAttr @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}})
The function @code{gpgme_key_get_ulong_attr} returns the value of the
number-representable attribute @var{what} of key @var{key}. If the
-attribute occurs more than once in the key, the index is specified by
-@var{idx}. This applies to attributes of sub keys and user IDs. The
-argument @var{reserved} is reserved for later use and should be
-@code{NULL}.
+attribute is an attribute of a sub key or an user ID, @var{idx}
+specifies the sub key or user ID of which the attribute value is
+returned. The argument @var{reserved} is reserved for later use and
+should be @code{NULL}.
The function returns @code{0} if the attribute can't be returned as a
number, @var{key} is not a valid pointer, @var{idx} out of range,
@deftypefun {const char *} gpgme_trust_item_get_string_attr (@w{GpgmeTrustItem @var{item}}, @w{GpgmeAttr @var{what}}, @w{const void *@var{reserved}}, @w{int @var{idx}})
The function @code{gpgme_trust_item_get_string_attr} returns the value
of the string-representable attribute @var{what} of trust item
-@var{item}. If the attribute occurs more than once in the trust
-items, the index is specified by @var{idx}. However, currently no
-such attributes exists, so @var{idx} should be @code{0}. The argument
-@var{reserved} is reserved for later use and should be @code{NULL}.
+@var{item}. The arguments @var{idx} and @var{reserved} are reserved
+for later use and should be @code{0} and @code{NULL} respectively.
The string returned is only valid as long as the key is valid.
to retrieve more detailed information. @var{ctx} should be the context
used for the last signature verification, @var{idx} is used to enumerate
over all signatures starting with @code{0} and @var{whatidx} should be
-@code{0} for unless otherwise stated.
+@code{0} unless otherwise stated.
The following values may be used for @var{what}:
@table @code
for attributes which can be represented by an @code{unsigned long} data
type. @var{ctx} should be the context used for the last signature
verification, @var{idx} is used to enumerate over all signatures
-starting with @code{0} and @var{whatidx} should be @code{0} for unless
+starting with @code{0} and @var{whatidx} should be @code{0} unless
otherwise stated.
The following values may be used for @var{what}:
char *gpgme_key_get_as_xml (GpgmeKey key);
/* Return the value of the attribute WHAT of KEY, which has to be
- representable by a string. IDX specifies a running index if the
- attribute appears more than once in the key. */
+ representable by a string. IDX specifies the sub key or
+ user ID for attributes related to sub keys or user IDs. */
const char *gpgme_key_get_string_attr (GpgmeKey key, GpgmeAttr what,
const void *reserved, int idx);
/* Return the value of the attribute WHAT of KEY, which has to be
- representable by an unsigned integer. IDX specifies a running
- index if the attribute appears more than once in the key. */
+ representable by an unsigned integer. IDX specifies the sub key or
+ user ID for attributes related to sub keys or user IDs. */
unsigned long gpgme_key_get_ulong_attr (GpgmeKey key, GpgmeAttr what,
const void *reserved, int idx);
void gpgme_trust_item_release (GpgmeTrustItem item);
/* Return the value of the attribute WHAT of ITEM, which has to be
- representable by a string. IDX specifies a running index if the
- attribute appears more than once in the key. */
+ representable by a string. */
const char *gpgme_trust_item_get_string_attr (GpgmeTrustItem item,
GpgmeAttr what,
const void *reserved, int idx);