diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-05-23 00:11:59 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-05-24 06:16:24 +0800 |
commit | 5b646fc3807f889f3113d62d113e4e21f25db74e (patch) | |
tree | 7470802350dcf595d38dffda4e464a8ee2a2a342 /e-util/e-attachment.h | |
parent | 2d1ecb2c04629eb0ba6a52fbde16feae21b01484 (diff) | |
download | gsoc2013-evolution-5b646fc3807f889f3113d62d113e4e21f25db74e.tar gsoc2013-evolution-5b646fc3807f889f3113d62d113e4e21f25db74e.tar.gz gsoc2013-evolution-5b646fc3807f889f3113d62d113e4e21f25db74e.tar.bz2 gsoc2013-evolution-5b646fc3807f889f3113d62d113e4e21f25db74e.tar.lz gsoc2013-evolution-5b646fc3807f889f3113d62d113e4e21f25db74e.tar.xz gsoc2013-evolution-5b646fc3807f889f3113d62d113e4e21f25db74e.tar.zst gsoc2013-evolution-5b646fc3807f889f3113d62d113e4e21f25db74e.zip |
Make EAttachment a little more thread-safe.
EAttachment is now used from worker threads by EMailFormatterAttachment,
so add some thread-safe accessor functions to eliminate potential races.
Added thread-safe functions:
e_attachment_dup_disposition()
e_attachment_ref_file()
e_attachment_ref_file_info()
e_attachment_ref_icon()
e_attachment_ref_mime_part()
e_attachment_dup_description()
e_attachment_dup_thumbnail_path()
Renamed functions:
e_attachment_get_mime_type() -> e_attachment_dup_mime_type()
Removed non-thread-safe functions:
e_attachment_get_file()
e_attachment_get_file_info()
e_attachment_get_icon()
e_attachment_get_mime_part()
e_attachment_get_description()
e_attachment_get_thumbnail_path()
(cherry picked from commit 9058c6f85dc49f9500e7e67819acfd8c0d2d369c)
Diffstat (limited to 'e-util/e-attachment.h')
-rw-r--r-- | e-util/e-attachment.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/e-util/e-attachment.h b/e-util/e-attachment.h index 0da2c9d883..b21a0f2899 100644 --- a/e-util/e-attachment.h +++ b/e-util/e-attachment.h @@ -76,18 +76,19 @@ gboolean e_attachment_get_can_show (EAttachment *attachment); void e_attachment_set_can_show (EAttachment *attachment, gboolean can_show); const gchar * e_attachment_get_disposition (EAttachment *attachment); +gchar * e_attachment_dup_disposition (EAttachment *attachment); void e_attachment_set_disposition (EAttachment *attachment, const gchar *disposition); -GFile * e_attachment_get_file (EAttachment *attachment); +GFile * e_attachment_ref_file (EAttachment *attachment); void e_attachment_set_file (EAttachment *attachment, GFile *file); -GFileInfo * e_attachment_get_file_info (EAttachment *attachment); +GFileInfo * e_attachment_ref_file_info (EAttachment *attachment); void e_attachment_set_file_info (EAttachment *attachment, GFileInfo *file_info); -gchar * e_attachment_get_mime_type (EAttachment *attachment); -GIcon * e_attachment_get_icon (EAttachment *attachment); +gchar * e_attachment_dup_mime_type (EAttachment *attachment); +GIcon * e_attachment_ref_icon (EAttachment *attachment); gboolean e_attachment_get_loading (EAttachment *attachment); -CamelMimePart * e_attachment_get_mime_part (EAttachment *attachment); +CamelMimePart * e_attachment_ref_mime_part (EAttachment *attachment); void e_attachment_set_mime_part (EAttachment *attachment, CamelMimePart *mime_part); gint e_attachment_get_percent (EAttachment *attachment); @@ -107,8 +108,8 @@ camel_cipher_validity_sign_t e_attachment_get_signed (EAttachment *attachment); void e_attachment_set_signed (EAttachment *attachment, camel_cipher_validity_sign_t signed_); -const gchar * e_attachment_get_description (EAttachment *attachment); -const gchar * e_attachment_get_thumbnail_path (EAttachment *attachment); +gchar * e_attachment_dup_description (EAttachment *attachment); +gchar * e_attachment_dup_thumbnail_path (EAttachment *attachment); gboolean e_attachment_is_rfc822 (EAttachment *attachment); GList * e_attachment_list_apps (EAttachment *attachment); |