[gmime] Renamed g_mime_part_[get, set]_content_object() to [get, set]_content()



commit d9576cf49fa68590dae9d59cc5870086fd48a9c7
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date:   Sat Mar 11 08:09:30 2017 -0500

    Renamed g_mime_part_[get,set]_content_object() to [get,set]_content()

 PORTING                              |    3 +++
 examples/imap-example.c              |    2 +-
 gmime/gmime-application-pkcs7-mime.c |    8 ++++----
 gmime/gmime-message-partial.c        |    4 ++--
 gmime/gmime-multipart-encrypted.c    |    6 +++---
 gmime/gmime-multipart-signed.c       |    4 ++--
 gmime/gmime-parser.c                 |    2 +-
 gmime/gmime-part.c                   |   18 +++++++++---------
 gmime/gmime-part.h                   |    6 +++---
 gmime/gmime-text-part.c              |    4 ++--
 10 files changed, 30 insertions(+), 27 deletions(-)
---
diff --git a/PORTING b/PORTING
index f9dbbb8..c0622b2 100644
--- a/PORTING
+++ b/PORTING
@@ -120,6 +120,9 @@ Porting from GMime 2.6 to GMime 3.0
   now a GMimeTextPart who's g_mime_text_part_new() returns a
   GMimeTextPart with a Content-Type of "text/plain".
 
+- g_mime_part_[get,set]_content_object() have been renamed to
+  g_mime_part_[get,set]_content().
+
 
 Porting from GMime 2.4 to GMime 2.6
 -----------------------------------
diff --git a/examples/imap-example.c b/examples/imap-example.c
index 530850e..3a1ff46 100644
--- a/examples/imap-example.c
+++ b/examples/imap-example.c
@@ -743,7 +743,7 @@ reconstruct_part_content (GMimePart *part, const char *uid, const char *spec)
        content = g_mime_data_wrapper_new_with_stream (stream, part->encoding);
        g_object_unref (stream);
        
-       g_mime_part_set_content_object (part, content);
+       g_mime_part_set_content (part, content);
 }
 
 static void
diff --git a/gmime/gmime-application-pkcs7-mime.c b/gmime/gmime-application-pkcs7-mime.c
index d6f0604..0b087cb 100644
--- a/gmime/gmime-application-pkcs7-mime.c
+++ b/gmime/gmime-application-pkcs7-mime.c
@@ -274,7 +274,7 @@ g_mime_application_pkcs7_mime_encrypt (GMimeObject *entity, GMimeEncryptFlags fl
        /* construct the application/pkcs7-mime part */
        pkcs7_mime = g_mime_application_pkcs7_mime_new (GMIME_SECURE_MIME_TYPE_ENVELOPED_DATA);
        content = g_mime_data_wrapper_new_with_stream (ciphertext, GMIME_CONTENT_ENCODING_DEFAULT);
-       g_mime_part_set_content_object (GMIME_PART (pkcs7_mime), content);
+       g_mime_part_set_content (GMIME_PART (pkcs7_mime), content);
        g_object_unref (ciphertext);
        g_object_unref (content);
        
@@ -332,7 +332,7 @@ g_mime_application_pkcs7_mime_decrypt (GMimeApplicationPkcs7Mime *pkcs7_mime,
        }
        
        /* get the ciphertext stream */
-       content = g_mime_part_get_content_object (GMIME_PART (pkcs7_mime));
+       content = g_mime_part_get_content (GMIME_PART (pkcs7_mime));
        ciphertext = g_mime_stream_mem_new ();
        g_mime_data_wrapper_write_to_stream (content, ciphertext);
        g_mime_stream_reset (ciphertext);
@@ -446,7 +446,7 @@ g_mime_application_pkcs7_mime_sign (GMimeObject *entity, const char *userid, GMi
        /* construct the application/pkcs7-mime part */
        pkcs7_mime = g_mime_application_pkcs7_mime_new (GMIME_SECURE_MIME_TYPE_SIGNED_DATA);
        content = g_mime_data_wrapper_new_with_stream (ciphertext, GMIME_CONTENT_ENCODING_DEFAULT);
-       g_mime_part_set_content_object (GMIME_PART (pkcs7_mime), content);
+       g_mime_part_set_content (GMIME_PART (pkcs7_mime), content);
        g_object_unref (ciphertext);
        g_object_unref (content);
        
@@ -488,7 +488,7 @@ g_mime_application_pkcs7_mime_verify (GMimeApplicationPkcs7Mime *pkcs7_mime, GMi
        }
        
        /* get the ciphertext stream */
-       content = g_mime_part_get_content_object (GMIME_PART (pkcs7_mime));
+       content = g_mime_part_get_content (GMIME_PART (pkcs7_mime));
        ciphertext = g_mime_stream_mem_new ();
        g_mime_data_wrapper_write_to_stream (content, ciphertext);
        g_mime_stream_reset (ciphertext);
diff --git a/gmime/gmime-message-partial.c b/gmime/gmime-message-partial.c
index 7b01c2f..d2125f1 100644
--- a/gmime/gmime-message-partial.c
+++ b/gmime/gmime-message-partial.c
@@ -329,7 +329,7 @@ g_mime_message_partial_reconstruct_message (GMimeMessagePartial **partials, size
                if ((size_t) number != i + 1)
                        goto exception;
                
-               wrapper = g_mime_part_get_content_object (GMIME_PART (partial));
+               wrapper = g_mime_part_get_content (GMIME_PART (partial));
                stream = g_mime_data_wrapper_get_stream (wrapper);
                
                g_mime_stream_reset (stream);
@@ -467,7 +467,7 @@ g_mime_message_partial_split_message (GMimeMessage *message, size_t max_size, si
                wrapper = g_mime_data_wrapper_new_with_stream (GMIME_STREAM (parts->pdata[i]),
                                                               GMIME_CONTENT_ENCODING_DEFAULT);
                g_object_unref (parts->pdata[i]);
-               g_mime_part_set_content_object (GMIME_PART (partial), wrapper);
+               g_mime_part_set_content (GMIME_PART (partial), wrapper);
                g_object_unref (wrapper);
                
                parts->pdata[i] = message_partial_message_new (message);
diff --git a/gmime/gmime-multipart-encrypted.c b/gmime/gmime-multipart-encrypted.c
index 9c003a7..5793654 100644
--- a/gmime/gmime-multipart-encrypted.c
+++ b/gmime/gmime-multipart-encrypted.c
@@ -216,7 +216,7 @@ g_mime_multipart_encrypted_encrypt (GMimeMultipartEncrypted *mpe, GMimeObject *c
        g_mime_part_set_content_encoding (version_part, GMIME_CONTENT_ENCODING_7BIT);
        stream = g_mime_stream_mem_new_with_buffer ("Version: 1\n", strlen ("Version: 1\n"));
        wrapper = g_mime_data_wrapper_new_with_stream (stream, GMIME_CONTENT_ENCODING_7BIT);
-       g_mime_part_set_content_object (version_part, wrapper);
+       g_mime_part_set_content (version_part, wrapper);
        g_object_unref (wrapper);
        g_object_unref (stream);
        
@@ -224,7 +224,7 @@ g_mime_multipart_encrypted_encrypt (GMimeMultipartEncrypted *mpe, GMimeObject *c
        encrypted_part = g_mime_part_new_with_type ("application", "octet-stream");
        g_mime_part_set_content_encoding (encrypted_part, GMIME_CONTENT_ENCODING_7BIT);
        wrapper = g_mime_data_wrapper_new_with_stream (ciphertext, GMIME_CONTENT_ENCODING_7BIT);
-       g_mime_part_set_content_object (encrypted_part, wrapper);
+       g_mime_part_set_content (encrypted_part, wrapper);
        g_object_unref (ciphertext);
        g_object_unref (wrapper);
        
@@ -344,7 +344,7 @@ g_mime_multipart_encrypted_decrypt (GMimeMultipartEncrypted *mpe, GMimeDecryptFl
        }
        
        /* get the ciphertext stream */
-       content = g_mime_part_get_content_object (GMIME_PART (encrypted));
+       content = g_mime_part_get_content (GMIME_PART (encrypted));
        ciphertext = g_mime_stream_mem_new ();
        g_mime_data_wrapper_write_to_stream (content, ciphertext);
        g_mime_stream_reset (ciphertext);
diff --git a/gmime/gmime-multipart-signed.c b/gmime/gmime-multipart-signed.c
index 3277ae7..0632c9a 100644
--- a/gmime/gmime-multipart-signed.c
+++ b/gmime/gmime-multipart-signed.c
@@ -299,7 +299,7 @@ g_mime_multipart_signed_sign (GMimeMultipartSigned *mps, GMimeObject *content,
        
        wrapper = g_mime_data_wrapper_new ();
        g_mime_data_wrapper_set_stream (wrapper, sigstream);
-       g_mime_part_set_content_object (signature, wrapper);
+       g_mime_part_set_content (signature, wrapper);
        g_object_unref (sigstream);
        g_object_unref (wrapper);
        
@@ -450,7 +450,7 @@ g_mime_multipart_signed_verify (GMimeMultipartSigned *mps, GMimeVerifyFlags flag
        g_mime_stream_reset (stream);
        
        /* get the signature stream */
-       wrapper = g_mime_part_get_content_object (GMIME_PART (signature));
+       wrapper = g_mime_part_get_content (GMIME_PART (signature));
        
        sigstream = g_mime_stream_mem_new ();
        g_mime_data_wrapper_write_to_stream (wrapper, sigstream);
diff --git a/gmime/gmime-parser.c b/gmime/gmime-parser.c
index 032732a..3c63476 100644
--- a/gmime/gmime-parser.c
+++ b/gmime/gmime-parser.c
@@ -1569,7 +1569,7 @@ parser_scan_mime_part_content (GMimeParser *parser, GMimePart *mime_part, int *f
                stream = g_mime_stream_mem_new_with_byte_array (content);
        
        wrapper = g_mime_data_wrapper_new_with_stream (stream, encoding);
-       g_mime_part_set_content_object (mime_part, wrapper);
+       g_mime_part_set_content (mime_part, wrapper);
        g_object_unref (wrapper);
        g_object_unref (stream);
 }
diff --git a/gmime/gmime-part.c b/gmime/gmime-part.c
index d3628e4..f688823 100644
--- a/gmime/gmime-part.c
+++ b/gmime/gmime-part.c
@@ -67,7 +67,7 @@ static ssize_t mime_part_write_to_stream (GMimeObject *object, GMimeStream *stre
 static void mime_part_encode (GMimeObject *object, GMimeEncodingConstraint constraint);
 
 /* GMimePart class methods */
-static void set_content_object (GMimePart *mime_part, GMimeDataWrapper *content);
+static void set_content (GMimePart *mime_part, GMimeDataWrapper *content);
 
 
 static GMimeObjectClass *parent_class = NULL;
@@ -115,7 +115,7 @@ g_mime_part_class_init (GMimePartClass *klass)
        object_class->write_to_stream = mime_part_write_to_stream;
        object_class->encode = mime_part_encode;
        
-       klass->set_content_object = set_content_object;
+       klass->set_content = set_content;
 }
 
 static void
@@ -881,7 +881,7 @@ g_mime_part_get_filename (GMimePart *mime_part)
 
 
 static void
-set_content_object (GMimePart *mime_part, GMimeDataWrapper *content)
+set_content (GMimePart *mime_part, GMimeDataWrapper *content)
 {
        if (mime_part->content)
                g_object_unref (mime_part->content);
@@ -892,26 +892,26 @@ set_content_object (GMimePart *mime_part, GMimeDataWrapper *content)
 
 
 /**
- * g_mime_part_set_content_object:
+ * g_mime_part_set_content:
  * @mime_part: a #GMimePart object
  * @content: a #GMimeDataWrapper content object
  *
- * Sets the content object on the mime part.
+ * Sets the content on the mime part.
  **/
 void
-g_mime_part_set_content_object (GMimePart *mime_part, GMimeDataWrapper *content)
+g_mime_part_set_content (GMimePart *mime_part, GMimeDataWrapper *content)
 {
        g_return_if_fail (GMIME_IS_PART (mime_part));
        
        if (mime_part->content == content)
                return;
        
-       GMIME_PART_GET_CLASS (mime_part)->set_content_object (mime_part, content);
+       GMIME_PART_GET_CLASS (mime_part)->set_content (mime_part, content);
 }
 
 
 /**
- * g_mime_part_get_content_object:
+ * g_mime_part_get_content:
  * @mime_part: a #GMimePart object
  *
  * Gets the internal data-wrapper of the specified mime part, or %NULL
@@ -921,7 +921,7 @@ g_mime_part_set_content_object (GMimePart *mime_part, GMimeDataWrapper *content)
  * contents.
  **/
 GMimeDataWrapper *
-g_mime_part_get_content_object (GMimePart *mime_part)
+g_mime_part_get_content (GMimePart *mime_part)
 {
        g_return_val_if_fail (GMIME_IS_PART (mime_part), NULL);
        
diff --git a/gmime/gmime-part.h b/gmime/gmime-part.h
index 967e2ce..0391eef 100644
--- a/gmime/gmime-part.h
+++ b/gmime/gmime-part.h
@@ -67,7 +67,7 @@ struct _GMimePart {
 struct _GMimePartClass {
        GMimeObjectClass parent_class;
        
-       void (* set_content_object) (GMimePart *mime_part, GMimeDataWrapper *content);
+       void (* set_content) (GMimePart *mime_part, GMimeDataWrapper *content);
 };
 
 
@@ -101,8 +101,8 @@ gboolean g_mime_part_is_attachment (GMimePart *mime_part);
 void g_mime_part_set_filename (GMimePart *mime_part, const char *filename);
 const char *g_mime_part_get_filename (GMimePart *mime_part);
 
-void g_mime_part_set_content_object (GMimePart *mime_part, GMimeDataWrapper *content);
-GMimeDataWrapper *g_mime_part_get_content_object (GMimePart *mime_part);
+void g_mime_part_set_content (GMimePart *mime_part, GMimeDataWrapper *content);
+GMimeDataWrapper *g_mime_part_get_content (GMimePart *mime_part);
 
 G_END_DECLS
 
diff --git a/gmime/gmime-text-part.c b/gmime/gmime-text-part.c
index c47a452..644f42f 100644
--- a/gmime/gmime-text-part.c
+++ b/gmime/gmime-text-part.c
@@ -242,7 +242,7 @@ g_mime_text_part_set_text (GMimeTextPart *mime_part, const char *text)
        content = g_mime_data_wrapper_new_with_stream (stream, GMIME_CONTENT_ENCODING_DEFAULT);
        g_object_unref (stream);
        
-       g_mime_part_set_content_object ((GMimePart *) mime_part, content);
+       g_mime_part_set_content ((GMimePart *) mime_part, content);
        g_object_unref (content);
 }
 
@@ -268,7 +268,7 @@ g_mime_text_part_get_text (GMimeTextPart *mime_part)
        
        g_return_val_if_fail (GMIME_IS_TEXT_PART (mime_part), NULL);
        
-       if (!(content = g_mime_part_get_content_object ((GMimePart *) mime_part)))
+       if (!(content = g_mime_part_get_content ((GMimePart *) mime_part)))
                return NULL;
        
        content_type = g_mime_object_get_content_type ((GMimeObject *) mime_part);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]