[gmime] more attributes
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] more attributes
- Date: Thu, 30 Mar 2017 23:16:08 +0000 (UTC)
commit 547fa03f77eb93e2bb285a5d7c7bee476e98763c
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date: Thu Mar 30 16:25:46 2017 -0400
more attributes
gmime/gmime-application-pkcs7-mime.c | 14 +++++++-------
gmime/gmime-charset.c | 14 +++++++-------
gmime/gmime-content-type.c | 2 +-
gmime/gmime-crypto-context.c | 8 ++++----
gmime/gmime-disposition.c | 2 --
gmime/gmime-message-partial.c | 4 ++--
gmime/gmime-multipart-encrypted.c | 10 +++++-----
gmime/gmime-multipart-signed.c | 6 +++---
gmime/gmime-parser.c | 6 +++---
gmime/gmime-part.c | 14 ++++++--------
gmime/gmime-utils.c | 16 ++++++++--------
gmime/internet-address.c | 18 +++++++++---------
12 files changed, 55 insertions(+), 59 deletions(-)
---
diff --git a/gmime/gmime-application-pkcs7-mime.c b/gmime/gmime-application-pkcs7-mime.c
index 464f092..a0816bb 100644
--- a/gmime/gmime-application-pkcs7-mime.c
+++ b/gmime/gmime-application-pkcs7-mime.c
@@ -224,8 +224,8 @@ g_mime_application_pkcs7_mime_decompress (GMimeApplicationPkcs7Mime *pkcs7_mime,
* Attempts to encrypt the @entity MIME part to the public keys of @recipients
* using S/MIME. If successful, a new application/pkcs7-mime object is returned.
*
- * Returns: (transfer full): a new #GMimeApplicationPkcs7Mime object on success or
- * %NULL on fail. If encrypting fails, an exception will be set on @err to provide
+ * Returns: (nullable) (transfer full): a new #GMimeApplicationPkcs7Mime object on success
+ * or %NULL on fail. If encrypting fails, an exception will be set on @err to provide
* information as to why the failure occured.
**/
GMimeApplicationPkcs7Mime *
@@ -304,7 +304,7 @@ g_mime_application_pkcs7_mime_encrypt (GMimeObject *entity, GMimeEncryptFlags fl
* status information as well as a list of recipients that the part was
* encrypted to.
*
- * Returns: (transfer full): the decrypted MIME part on success or
+ * Returns: (nullable) (transfer full): the decrypted MIME part on success or
* %NULL on fail. If the decryption fails, an exception will be set on
* @err to provide information as to why the failure occured.
**/
@@ -395,8 +395,8 @@ g_mime_application_pkcs7_mime_decrypt (GMimeApplicationPkcs7Mime *pkcs7_mime,
* Attempts to sign the @entity MIME part with @userid's private key using
* S/MIME. If successful, a new application/pkcs7-mime object is returned.
*
- * Returns: (transfer full): a new #GMimeApplicationPkcs7Mime object on success or
- * %NULL on fail. If signing fails, an exception will be set on @err to provide
+ * Returns: (nullable) (transfer full): a new #GMimeApplicationPkcs7Mime object on success
+ * or %NULL on fail. If signing fails, an exception will be set on @err to provide
* information as to why the failure occured.
**/
GMimeApplicationPkcs7Mime *
@@ -459,13 +459,13 @@ g_mime_application_pkcs7_mime_sign (GMimeObject *entity, const char *userid, GEr
* g_mime_application_pkcs7_mime_verify:
* @pkcs7_mime: a #GMimeApplicationPkcs7Mime
* @flags: a #GMimeVerifyFlags
- * @entity: the extracted entity
+ * @entity: (out) (transfer full): the extracted entity
* @err: a #GError
*
* Attempts to verify the signed @pkcs7_mime part and extract the original
* MIME entity.
*
- * Returns: (transfer full): a new #GMimeSignatureList object on
+ * Returns: (nullable) (transfer full): a new #GMimeSignatureList object on
* success or %NULL on fail. If the verification fails, an exception
* will be set on @err to provide information as to why the failure
* occured.
diff --git a/gmime/gmime-charset.c b/gmime/gmime-charset.c
index 3c23d45..e77bcb5 100644
--- a/gmime/gmime-charset.c
+++ b/gmime/gmime-charset.c
@@ -370,7 +370,7 @@ g_mime_locale_charset (void)
*
* Gets the user's locale language code (or %NULL by default).
*
- * Returns: the user's locale language code (or %NULL by default).
+ * Returns: (nullable): the user's locale language code (or %NULL by default).
**/
const char *
g_mime_locale_language (void)
@@ -387,8 +387,8 @@ g_mime_locale_language (void)
* @charset. Currently only handles CJK and Russian/Ukranian
* charset->lang mapping. Everything else will return %NULL.
*
- * Returns: a language code that is specific to @charset, or %NULL on
- * fail.
+ * Returns: (nullable): a language code that is specific to @charset,
+ * or %NULL on fail.
**/
const char *
g_mime_charset_language (const char *charset)
@@ -787,8 +787,8 @@ charset_best_mask (unsigned int mask)
*
* Gets the best charset name based on the charset mask @charset.
*
- * Returns: a pointer to a string containing the best charset name that
- * can represent the charset mask @charset.
+ * Returns: (nullable): the charset name that best represents the charset
+ * mask @charset or %NULL for us-ascii.
**/
const char *
g_mime_charset_best_name (GMimeCharset *charset)
@@ -809,8 +809,8 @@ g_mime_charset_best_name (GMimeCharset *charset)
*
* Computes the best charset to use to encode this text buffer.
*
- * Returns: the charset name best suited for the input text or %NULL if
- * it is US-ASCII safe.
+ * Returns: (nullable): the charset name best suited for the input text
+ * or %NULL if it is ascii-safe.
**/
const char *
g_mime_charset_best (const char *inbuf, size_t inlen)
diff --git a/gmime/gmime-content-type.c b/gmime/gmime-content-type.c
index fc7abbc..c44dc48 100644
--- a/gmime/gmime-content-type.c
+++ b/gmime/gmime-content-type.c
@@ -288,7 +288,7 @@ g_mime_content_type_encode (GMimeContentType *content_type, GMimeFormatOptions *
* Compares the given type and subtype with that of the given mime
* type object.
*
- * Returns: TRUE if the MIME types match or FALSE otherwise. You may
+ * Returns: %TRUE if the MIME types match or %FALSE otherwise. You may
* use "*" in place of @type and/or @subtype as a wilcard.
**/
gboolean
diff --git a/gmime/gmime-crypto-context.c b/gmime/gmime-crypto-context.c
index db0db19..c2803b7 100644
--- a/gmime/gmime-crypto-context.c
+++ b/gmime/gmime-crypto-context.c
@@ -400,8 +400,8 @@ crypto_verify (GMimeCryptoContext *ctx, GMimeVerifyFlags flags, GMimeStream *ist
* @ctx: a #GMimeCryptoContext
* @flags: a #GMimeVerifyFlags
* @istream: input stream
- * @sigstream: (optional): detached-signature stream
- * @ostream: (optional): output stream for use with encapsulated signature input streams
+ * @sigstream: (nullable): detached-signature stream
+ * @ostream: (nullable): output stream for use with encapsulated signature input streams
* @err: a #GError
*
* Verifies the signature. If @istream is a clearsigned stream, you
@@ -439,7 +439,7 @@ crypto_encrypt (GMimeCryptoContext *ctx, gboolean sign, const char *userid, GMim
* g_mime_crypto_context_encrypt:
* @ctx: a #GMimeCryptoContext
* @sign: sign as well as encrypt
- * @userid: the key id (or email address) to use when signing (assuming @sign is %TRUE)
+ * @userid: (nullable): the key id (or email address) to use when signing (assuming @sign is %TRUE)
* @flags: a set of #GMimeEncryptFlags
* @recipients: (element-type utf8): an array of recipient key ids and/or email addresses
* @istream: cleartext input stream
@@ -478,7 +478,7 @@ crypto_decrypt (GMimeCryptoContext *ctx, GMimeDecryptFlags flags, const char *se
* g_mime_crypto_context_decrypt:
* @ctx: a #GMimeCryptoContext
* @flags: a set of #GMimeDecryptFlags
- * @session_key: (optional): the session key to use or %NULL
+ * @session_key: (nullable): the session key to use or %NULL
* @istream: input/ciphertext stream
* @ostream: output/cleartext stream
* @err: a #GError
diff --git a/gmime/gmime-disposition.c b/gmime/gmime-disposition.c
index 8b84d26..253afd4 100644
--- a/gmime/gmime-disposition.c
+++ b/gmime/gmime-disposition.c
@@ -291,8 +291,6 @@ g_mime_content_disposition_get_parameter (GMimeContentDisposition *disposition,
* Determines if a Content-Disposition has a value of "attachment".
*
* Returns: %TRUE if the value matches "attachment", otherwise %FALSE.
- *
- * Since: 2.6.21
**/
gboolean
g_mime_content_disposition_is_attachment (GMimeContentDisposition *disposition)
diff --git a/gmime/gmime-message-partial.c b/gmime/gmime-message-partial.c
index 26dd17c..570fb14 100644
--- a/gmime/gmime-message-partial.c
+++ b/gmime/gmime-message-partial.c
@@ -352,14 +352,14 @@ message_partial_message_new (GMimeMessage *base)
* g_mime_message_partial_split_message:
* @message: message object
* @max_size: max size
- * @nparts: number of parts
+ * @nparts: (out): number of parts
*
* Splits @message into an array of #GMimeMessage objects each
* containing a single #GMimeMessagePartial object containing
* @max_size bytes or fewer. @nparts is set to the number of
* #GMimeMessagePartial objects created.
*
- * Returns: (transfer full): an array of #GMimeMessage objects and
+ * Returns: (nullable) (transfer full): an array of #GMimeMessage objects and
* sets @nparts to the number of messages returned or %NULL on fail.
**/
GMimeMessage **
diff --git a/gmime/gmime-multipart-encrypted.c b/gmime/gmime-multipart-encrypted.c
index eacd0a8..dcbbab8 100644
--- a/gmime/gmime-multipart-encrypted.c
+++ b/gmime/gmime-multipart-encrypted.c
@@ -142,7 +142,7 @@ g_mime_multipart_encrypted_new (void)
* @ctx: a #GMimeCryptoContext
* @entity: MIME part to encrypt
* @sign: %TRUE if the content should also be signed or %FALSE otherwise
- * @userid: user id to use for signing (only used if @sign is %TRUE)
+ * @userid: (nullable): user id to use for signing (only used if @sign is %TRUE)
* @flags: a #GMimeEncryptFlags
* @recipients: (element-type utf8): an array of recipients to encrypt to
* @err: a #GError
@@ -151,8 +151,8 @@ g_mime_multipart_encrypted_new (void)
* to the public keys of @recipients using the @ctx encryption
* context. If successful, a new multipart/encrypted object is returned.
*
- * Returns: (transfer full): a new #GMimeMultipartEncrypted object on success or
- * %NULL on fail. If encrypting fails, an exception will be set on @err to provide
+ * Returns: (nullable) (transfer full): a new #GMimeMultipartEncrypted object on success
+ * or %NULL on fail. If encrypting fails, an exception will be set on @err to provide
* information as to why the failure occured.
**/
GMimeMultipartEncrypted *
@@ -238,7 +238,7 @@ g_mime_multipart_encrypted_encrypt (GMimeCryptoContext *ctx, GMimeObject *entity
* @encrypted: a #GMimeMultipartEncrypted
* @flags: a #GMimeDecryptFlags
* @session_key: session key to use or %NULL
- * @result: a #GMimeDecryptionResult
+ * @result: (out) (transfer full): a #GMimeDecryptionResult
* @err: a #GError
*
* Attempts to decrypt the encrypted MIME part contained within the
@@ -254,7 +254,7 @@ g_mime_multipart_encrypted_encrypt (GMimeCryptoContext *ctx, GMimeObject *entity
* status information as well as a list of recipients that the part was
* encrypted to.
*
- * Returns: (transfer full): the decrypted MIME part on success or
+ * Returns: (nullable) (transfer full): the decrypted MIME part on success or
* %NULL on fail. If the decryption fails, an exception will be set on
* @err to provide information as to why the failure occured.
**/
diff --git a/gmime/gmime-multipart-signed.c b/gmime/gmime-multipart-signed.c
index 9438c2f..b269eb6 100644
--- a/gmime/gmime-multipart-signed.c
+++ b/gmime/gmime-multipart-signed.c
@@ -204,8 +204,8 @@ sign_prepare (GMimeObject *mime_part)
* using the @ctx signing context. If successful, a new multipart/signed
* object is returned.
*
- * Returns: (transfer full): a new #GMimeMultipartSigned object on success or
- * %NULL on fail. If signing fails, an exception will be set on @err to provide
+ * Returns: (nullable) (transfer full): a new #GMimeMultipartSigned object on success
+ * or %NULL on fail. If signing fails, an exception will be set on @err to provide
* information as to why the failure occured.
**/
GMimeMultipartSigned *
@@ -362,7 +362,7 @@ check_protocol_supported (const char *protocol, const char *supported)
* Attempts to verify the signed MIME part contained within the
* multipart/signed object @mps.
*
- * Returns: (transfer full): a new #GMimeSignatureList object on
+ * Returns: (nullable) (transfer full): a new #GMimeSignatureList object on
* success or %NULL on fail. If the verification fails, an exception
* will be set on @err to provide information as to why the failure
* occured.
diff --git a/gmime/gmime-parser.c b/gmime/gmime-parser.c
index f1b15a7..7e9aea0 100644
--- a/gmime/gmime-parser.c
+++ b/gmime/gmime-parser.c
@@ -1902,7 +1902,7 @@ parser_construct_part (GMimeParser *parser, GMimeParserOptions *options)
*
* Constructs a MIME part from @parser.
*
- * Returns: (transfer full): a MIME part based on @parser or %NULL on
+ * Returns: (nullable) (transfer full): a MIME part based on @parser or %NULL on
* fail.
**/
GMimeObject *
@@ -1996,7 +1996,7 @@ parser_construct_message (GMimeParser *parser, GMimeParserOptions *options)
*
* Constructs a MIME message from @parser.
*
- * Returns: (transfer full): a MIME message or %NULL on fail.
+ * Returns: (nullable) (transfer full): a MIME message or %NULL on fail.
**/
GMimeMessage *
g_mime_parser_construct_message (GMimeParser *parser, GMimeParserOptions *options)
@@ -2014,7 +2014,7 @@ g_mime_parser_construct_message (GMimeParser *parser, GMimeParserOptions *option
* Gets the mbox-style From-line of the most recently parsed message
* (gotten from g_mime_parser_construct_message()).
*
- * Returns: the mbox-style From-line of the most recently parsed
+ * Returns: (nullable): the mbox-style From-line of the most recently parsed
* message or %NULL on error.
**/
char *
diff --git a/gmime/gmime-part.c b/gmime/gmime-part.c
index fa5a07e..4ec5ba3 100644
--- a/gmime/gmime-part.c
+++ b/gmime/gmime-part.c
@@ -866,8 +866,6 @@ g_mime_part_get_best_content_encoding (GMimePart *mime_part, GMimeEncodingConstr
* value of the Content-Disposition header.
*
* Returns: %TRUE if the part is an attachment, otherwise %FALSE.
- *
- * Since: 2.6.21
**/
gboolean
g_mime_part_is_attachment (GMimePart *mime_part)
@@ -1019,7 +1017,7 @@ g_mime_part_get_openpgp_data (GMimePart *mime_part)
* g_mime_part_openpgp_encrypt:
* @mime_part: a #GMimePart
* @sign: %TRUE if the content should also be signed; otherwise, %FALSE
- * @userid: the key id (or email address) to use when signing (assuming @sign is %TRUE)
+ * @userid: (nullable): the key id (or email address) to use when signing (assuming @sign is %TRUE)
* @flags: a set of #GMimeEncryptFlags
* @recipients: (element-type utf8): an array of recipient key ids and/or email addresses
* @err: a #GError
@@ -1081,13 +1079,13 @@ g_mime_part_openpgp_encrypt (GMimePart *mime_part, gboolean sign, const char *us
* g_mime_part_openpgp_decrypt:
* @mime_part: a #GMimePart
* @flags: a set of #GMimeDecryptFlags
- * @session_key: the session key to use or %NULL
+ * @session_key: (nullable): the session key to use or %NULL
* @err: a #GError
*
* Decrypts the content of the @mime_part and then replaces the content with
* the new, decrypted, content.
*
- * Returns: (transfer full): a #GMimeDecryptResult on success or %NULL on error.
+ * Returns: (nullable) (transfer full): a #GMimeDecryptResult on success or %NULL on error.
**/
GMimeDecryptResult *
g_mime_part_openpgp_decrypt (GMimePart *mime_part, GMimeDecryptFlags flags, const char *session_key, GError
**err)
@@ -1114,7 +1112,7 @@ g_mime_part_openpgp_decrypt (GMimePart *mime_part, GMimeDecryptFlags flags, cons
istream = g_mime_stream_mem_new ();
g_mime_data_wrapper_write_to_stream (mime_part->content, istream);
g_mime_stream_reset (istream);
-
+
result = g_mime_crypto_context_decrypt (ctx, flags, session_key, istream, decrypted, err);
g_object_unref (istream);
g_object_unref (ctx);
@@ -1202,7 +1200,7 @@ g_mime_part_openpgp_sign (GMimePart *mime_part, const char *userid, GError **err
* Verifies the OpenPGP signature of the @mime_part and then replaces the content
* with the original, raw, content.
*
- * Returns: (transfer full): a #GMimeSignatureList on success or %NULL on error.
+ * Returns: (nullable) (transfer full): a #GMimeSignatureList on success or %NULL on error.
**/
GMimeSignatureList *
g_mime_part_openpgp_verify (GMimePart *mime_part, GMimeVerifyFlags flags, GError **err)
@@ -1229,7 +1227,7 @@ g_mime_part_openpgp_verify (GMimePart *mime_part, GMimeVerifyFlags flags, GError
istream = g_mime_stream_mem_new ();
g_mime_data_wrapper_write_to_stream (mime_part->content, istream);
g_mime_stream_reset (istream);
-
+
signatures = g_mime_crypto_context_verify (ctx, flags, istream, NULL, extracted, err);
g_object_unref (istream);
g_object_unref (ctx);
diff --git a/gmime/gmime-utils.c b/gmime/gmime-utils.c
index de3987c..39ebc1b 100644
--- a/gmime/gmime-utils.c
+++ b/gmime/gmime-utils.c
@@ -730,8 +730,8 @@ gmime_datetok_table_init (void)
*
* Parses the rfc822 date string.
*
- * Returns: the #GDateTime representation of the date string specified by
- * @str or %NULL on error.
+ * Returns: (nullable) (transfer full): the #GDateTime representation of the date
+ * string specified by @str or %NULL on error.
**/
GDateTime *
g_mime_utils_header_decode_date (const char *str)
@@ -991,7 +991,7 @@ g_mime_utils_unquote_string (char *str)
/**
* g_mime_utils_text_is_8bit:
- * @text: text to check for 8bit chars
+ * @text: (array length=len) (element-type guint8): text to check for 8bit chars
* @len: text length
*
* Determines if @text contains 8bit characters within the first @len
@@ -1019,7 +1019,7 @@ g_mime_utils_text_is_8bit (const unsigned char *text, size_t len)
/**
* g_mime_utils_best_encoding:
- * @text: text to encode
+ * @text: (array length=len) (element-type guint8): text to encode
* @len: text length
*
* Determines the best content encoding for the first @len bytes of
@@ -1861,7 +1861,7 @@ rfc2047_decode_tokens (GMimeParserOptions *options, rfc2047_token *tokens, size_
* _g_mime_utils_header_decode_text:
* @text: header text to decode
* @options: (nullable): a #GMimeParserOptions or %NULL
- * @charset: if non-%NULL, this will be set to the charset used in the rfc2047 encoded-word tokens
+ * @charset: (optional): if non-%NULL, this will be set to the charset used in the rfc2047 encoded-word
tokens
*
* Decodes an rfc2047 encoded 'text' header.
*
@@ -1911,7 +1911,7 @@ g_mime_utils_header_decode_text (GMimeParserOptions *options, const char *text)
* _g_mime_utils_header_decode_phrase:
* @phrase: header to decode
* @options: (nullable): a #GMimeParserOptions or %NULL
- * @charset: if non-%NULL, this will be set to the charset used in the rfc2047 encoded-word tokens
+ * @charset: (optional): if non-%NULL, this will be set to the charset used in the rfc2047 encoded-word
tokens
*
* Decodes an rfc2047 encoded 'phrase' header.
*
@@ -2403,7 +2403,7 @@ rfc2047_encode (GMimeFormatOptions *options, const char *in, gushort safemask, c
* g_mime_utils_header_encode_phrase:
* @options: (nullable): a #GMimeFormatOptions or %NULL
* @phrase: phrase to encode
- * @charset: the charset to use or %NULL to use the default
+ * @charset: (nullable): the charset to use or %NULL to use the default
*
* Encodes a 'phrase' header according to the rules in rfc2047.
*
@@ -2424,7 +2424,7 @@ g_mime_utils_header_encode_phrase (GMimeFormatOptions *options, const char *phra
* g_mime_utils_header_encode_text:
* @options: (nullable): a #GMimeFormatOptions or %NULL
* @text: text to encode
- * @charset: the charset to use or %NULL to use the default
+ * @charset: (nullable): the charset to use or %NULL to use the default
*
* Encodes a 'text' header according to the rules in rfc2047.
*
diff --git a/gmime/internet-address.c b/gmime/internet-address.c
index e2af784..5161153 100644
--- a/gmime/internet-address.c
+++ b/gmime/internet-address.c
@@ -196,8 +196,8 @@ internet_address_set_name (InternetAddress *ia, const char *name)
*
* Gets the display name of the #InternetAddress.
*
- * Returns: the name of the mailbox or group in a form suitable for
- * display if available or %NULL otherwise. If the name is available,
+ * Returns: (nullable): the name of the mailbox or group in a form suitable
+ * for display if available or %NULL otherwise. If the name is available,
* the returned string will be in UTF-8.
**/
const char *
@@ -212,7 +212,7 @@ internet_address_get_name (InternetAddress *ia)
/**
* internet_address_set_charset:
* @ia: a #InternetAddress
- * @charset: the charset to use when encoding the name or %NULL to use the defaults
+ * @charset: (nullable): the charset to use when encoding the name or %NULL to use the defaults
*
* Set the charset to use for encoding the name of the mailbox or group.
**/
@@ -223,7 +223,7 @@ internet_address_set_charset (InternetAddress *ia, const char *charset)
g_return_if_fail (IS_INTERNET_ADDRESS (ia));
- buf = g_strdup (charset);
+ buf = charset ? g_strdup (charset) : NULL;
g_free (ia->charset);
ia->charset = buf;
@@ -237,8 +237,8 @@ internet_address_set_charset (InternetAddress *ia, const char *charset)
*
* Gets the charset to be used when encoding the name of the mailbox or group.
*
- * Returns: the charset to be used when encoding the name of the mailbox or
- * group if available or %NULL otherwise.
+ * Returns: (nullable): the charset to be used when encoding the name of the
+ * mailbox or group if available or %NULL otherwise.
**/
const char *
internet_address_get_charset (InternetAddress *ia)
@@ -1246,8 +1246,8 @@ group_to_string (InternetAddress *ia, GMimeFormatOptions *options, guint32 flags
* Allocates a string buffer containing the rfc822 formatted addresses
* in @list.
*
- * Returns: a string containing the list of addresses in rfc822 format
- * or %NULL if no addresses are contained in the list.
+ * Returns: (nullable): a string containing the list of addresses in rfc822
+ * format or %NULL if no addresses are contained in the list.
**/
char *
internet_address_list_to_string (InternetAddressList *list, GMimeFormatOptions *options, gboolean encode)
@@ -2003,7 +2003,7 @@ address_list_parse (InternetAddressList *list, GMimeParserOptions *options, cons
*
* Construct a list of internet addresses from the given string.
*
- * Returns: (transfer full): a #InternetAddressList or %NULL if the
+ * Returns: (nullable) (transfer full): a #InternetAddressList or %NULL if the
* input string does not contain any addresses.
**/
InternetAddressList *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]