Make constructors use the Message.from_gmime where possible. Merge that
and stock_from_gmime so it's clear the stocking only happens in the
ctor. Update stocking to use high-level GMime APIs where available to
avoid re-parsing header values.
Split Geary.RFC822.MessageData interface up into DecodedMessageData and
EncodedMessageData so the difference between the two is clear and they
can't be used interchangeably.
Add `DecodedMessageData::to_rfc822_string` to provide a common interface
for round-tripping decoded data.
Update all classes to implement one of these and follow the same general
API patterns.
Add some doc comments, fix some methods to ensure the class is actually
immutable, remove some unused methods, add ctor from the GMime
equivalent object.
Mark the service as unreachable if a connectivity check error occurs
since if we can't determine it is reachable, we probably can't connect
to it either.
When a general error occurs checking connectivity of a remote server,
only treat it as an error if GNetworkMonitor indicates the network is
available (i.e. that a default route exists). If there is no network,
it's not surprising that the error occurred.
This fixes a spurious error when the delayed check runs but the host
is offline.
Ensure that if stopping the conversation monitor while it is waiting
for the folder to open that the folder isn't closed, and if an error
is thrown when opening the folder that it gets thrown by
::start_monitoring anyway.
Hopefully fixes#741
When loading an account for the first time, folders may not be processed
such that parents are handled first, leading to phantom folders created
for them.
This is particularly noticeable for GMail accounts, where the `[GMail]`
folder would typically show up, since it was created twice.
Add `create_personal_folder` method, implement it in
ImapEngine.GenericAccount. Use this when creating required special
folders to reduce code duplication.
Set local folder special use when they are loaded rather than doing it
in two steps, so that when client code is notified of the folders
being available, they will already have the correct special type.
Use a simple list of strings to store path steps, since we don't know
what the root will be in advance, and this leads to errors if callers
try to compare the info's paths to (say) an actual IMAP path.
Store path steps in a SpecialUse to path step map property, rather than
as individual properties for each special use, to reduce repetition.
Replace open method with an async ctor, so we can make a few properties
non-null by default, and callers need to call one less call. Make
destination folder configurable, and require email flags passed in
via the ctor, not every time when saving.
Even just logging SQL queries is extremely verbose, and pushes a lot
of logging messages off the end of the buffer. So rework result logging
flag and code to apply to both again.
Re-merge Application.Client's SQL logging command line flags back into
one again.
Rather than scheduling calling a registered log_listener on the default
main loop context, let the listener implementation handle that in
whatever way they want.
Make `suppress_domain`/`unsuppress_domain` return whether they actually
added or removed the suppression. Add `is_suppresed_domain` to allow
determining this at other times.
Blacklisting now prevents records from being created, where as
suppression now simply prevents them from being printed.
This means records are created for all log messages, regardless of
whether they are displayed.
Update API docs for a bunch of methods to make this clear, and to make
the requirements for getting log records in the first place is also
clear.
Update the db's logging to log SQL statements normally, but add a
special case flag to enable logging query results as well, since these
are particularly verbose.
Now that the flags code is gone, move the remaining code from
`src/engine/api/geary-logging.vala` into
`src/engine/util/util-logging.vala`, and remove the former source file.
Now that we have classes logging on sub-domains, and the ability to
suppress specific domains, remove flags and switch over to doing
domain suppression for manipulating debug settings in the client.
The `SpecialFolderType` was somewhat mis-named, since the special use
does not (in most cases) confer any special type, rather it's simply
defines what a particular folder is used /for/.
As such, rename the enum to to `Geary.Folder.SpecialUse`, moving it in
to the `Folder` class, since it relates specifically to folders, also
rename `Folder::special_folder_type` and
`Folder::special_folder_type_changed` reflect the above and not
duplicate the type name, and similarly rename
`Account::folders_special_type`.
Update the many call sites.
Remove `Geary.Folder::get_display_name` method, and
`display-name-changed` signal, and
`Geary.SpecialFolderType::get_display_name`. Add new equivalent methods
for client in `Util.I18n` and use those instead.