geary/test/engine
Michael James Gratton f1c797650f Ensure we always use the one, same codepath when decoding text content.
This introduces the Geary.RFC822.Part class, which provides a place to
MIME entity body decoding code so it can be reused when needed. It also
provides a place to put common GMime to Geary object conversion, and
apply some common policy decisions, such as what is the default content
type if none is specified.

* src/engine/rfc822/rfc822-part.vala: New Part class that represents a
  MIME entity. Move code for both decoding entity body from
  RFC822.Message and code for cleaning content filename from RFC822.Util
  to here. Convert GMime entity header objects into their Geary
  equivalents and make available as properties. Provide a common means of
  determining the content type of the part if not explicitly set.

* src/engine/rfc822/rfc822-message-data.vala (PreviewText.with_header):
  Construct a RFC822.Part and use that for decoding preview text. Swap
  args to make some more sense and update call sites.

* src/engine/rfc822/rfc822-message.vala (InlinePartReplacer): Simply pass
  through an instance of a RFC822.Part rather than the multi-arg list,
  since that has all the data needed by replacers.

* src/engine/imap-db/imap-db-attachment.vala (Attachment): Require and
  use RFC822.Part instances for obtaining attachment bodies rather than
  GMime.Part instances. Update call sites.
2018-05-10 13:53:24 +10:00
..
api Support default content types for both displayed and attached entities. 2018-05-10 13:53:24 +10:00
app Add unit tests for ConversationMonitor, fix a few issues. 2018-04-07 10:02:24 +10:00
db Make database classes more amenable to asynchronous use. 2018-05-08 12:24:48 +10:00
imap Tidy up unit test infrastructure and mock classes. 2018-04-07 09:41:18 +10:00
imap-db Ensure we always use the one, same codepath when decoding text content. 2018-05-10 13:53:24 +10:00
imap-engine Tidy up unit test infrastructure and mock classes. 2018-04-07 09:41:18 +10:00
mime-content-type-test.vala Support default content types for both displayed and attached entities. 2018-05-10 13:53:24 +10:00
rfc822-mailbox-address-test.vala Tidy up unit test infrastructure and mock classes. 2018-04-07 09:41:18 +10:00
rfc822-mailbox-addresses-test.vala Tidy up unit test infrastructure and mock classes. 2018-04-07 09:41:18 +10:00
rfc822-message-data-test.vala Ensure we always use the one, same codepath when decoding text content. 2018-05-10 13:53:24 +10:00
rfc822-message-test.vala Add unit tests for Geary.RFC822.Message body content, fix a few issues. 2018-05-10 13:53:24 +10:00
rfc822-part-test.vala Ensure we always use the one, same codepath when decoding text content. 2018-05-10 13:53:24 +10:00
rfc822-utils-test.vala Tidy up unit test infrastructure and mock classes. 2018-04-07 09:41:18 +10:00
util-html-test.vala Tidy up unit test infrastructure and mock classes. 2018-04-07 09:41:18 +10:00
util-idle-manager-test.vala Tidy up unit test infrastructure and mock classes. 2018-04-07 09:41:18 +10:00
util-inet-test.vala Tidy up unit test infrastructure and mock classes. 2018-04-07 09:41:18 +10:00
util-js-test.vala Tidy up unit test infrastructure and mock classes. 2018-04-07 09:41:18 +10:00
util-string-test.vala Tidy up unit test infrastructure and mock classes. 2018-04-07 09:41:18 +10:00
util-timeout-manager-test.vala Tidy up unit test infrastructure and mock classes. 2018-04-07 09:41:18 +10:00