Convert `Connection` into an interface, add two concrete implementations
that allow splitting up the database connection used generally, and the
connection passed to transactions. This allows limiting the API surface
that transactions have access to (so they can't e.g. create
sub-transactions) and perform transaction-specific work (e.g. better
logging when an error occurs).
Geary hasn't used compression for IMAP in a while now due to the
possibility of information leakage for secure connections, so remove
the command as well.
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.
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.
Move Capabilities to the api directory and make immutable.
Don't pass around out params to simply increment the revision and use a
field in ClientSession, just use the last capability instance. Ensure
after starting a TLS session capabilities are cleared. Add unit tests
for getting both implicit and explicity capaibilities when initiating
a client session.
It would be best to use meson feature option type for ytnef and unwind,
but for now fix the automagic dependency on ytnef with the existing
meson_options.txt setup.
It was adding ytnef to list of dependencies unconditionally, and then
also if tnef-support was enabled. So if the option was disabled, but the
pkg-config file was present, it would still link to it surprisingly.
Just remove the unconditional addition to dep, and rely on the already
existing conditional addition to deps.
Rename the search folder again to App.SearchFolder, move its id class
into it as an inner class. Remove search folder from the engine so the
application can manage it and it's policy in the future. Also remove
the outbox from the accout's list of local folders, so that code can
be removed altogether.
Move SearchFolder and search EmailIdentifier implementation out of
ImapDb and into its own package. Decouple both from ImapDB, and improve
the implementation, fixing a few inefficiencies. Merge search
FolderProperties into the SearchFoldern implementation as an inner
class.
Merge SearchTerm into ImapDB.SearchQuery as an inner class and move the
outer class's source down a level, since it was the only file left in
the imap-db/search dir.
Rename the class because we need to distinguish between logging sources
and logging state, for cases when the logged object's state may change
between being logged and being displayed.
Rename util souce file to match new name space per source code
convernstion.
When an EmailCommand is undone, select the folder, conversation and if
relevant scroll to the email in question so as to provide better
context.
This isn't 100% bulletproof, but is about 80% of the way there. The
remainer requires some major Engine rework to decouple local and remote
actions.
Part of https://gitlab.gnome.org/GNOME/Initiatives/issues/1;
Sets up dual installation for flatpaks, allowing us to
build and run geary without affecting our system install.
This will allow testing of nightlies and CI artifacts as well
via the flatpak, so we can iterate on designs and share
bundles to test with.
The only reason it was in the engine was so it could be used by both
the client and the web extension, without worrying about the
webkit2gtk and webkit2gtk_web_extension packages conflicting. However
it didn't really belong there, and added a dependency for the engine
on javascriptcoregtk which doesn't belong. So this fixes all that.
Replaces harvesting code in ImapDB code so as to be stand-alone and
reusable. Implement harvesting policy to only harvest from a set of
whitelisted special folder types (so junk and trash is not harvested)
and only harvest valid, non-spoofed, addresses.
Remove contact harvesting from DB version 005 (version 0.1.1), allowing
the implementation of both ContactStoreImpl and ImapDB.Database to be
cleaned up. Remove contact collection from ImapDB.Folder, reducing the
numer of Gee objects created when creating/merging messages. Finally,
remove the MessageAddresses object now that it is unused.
Prepare for doing composer autocomplete via queries by not loading all
contacts at startup in the engine. Update Geary.ContactStore API to that
end, and convert Geary.Account.get_contact_store accessor method to a
property.
In RFC822.Date, don't use duplicate time_t and GLib.DateTime properties
-- just use the latter, fix formatting of half-hour time zones, fix
where the that class refers to ISO 8601 instead of RFC822 strings since
that is just plain wrong, and finally when parsing an RFC 822 string,
take note of the timezone offset and store that in the DateTime object,
so it is round-tripped correctly.
Stop passing time_t around everywhere else, just use the UNIX time from
the DateTimes we store for protocol objects anyway, so the time zone is
obvious.
Add unit tests.
This allows either type to be used interchangably as a source of
header data. Add documentation comments for the headers, add missing
message_id property to RFC822.Message.
Instead of each top-level IMAP folder being a FolderRoot object, then
children of that being FolderPath objects, this makes FolderRoot an
"empty" FolderPath, so that both top-level and descendant folders are
plain FolderPath objects. Aside from being more technically correct,
this means that empty namespace roots can now be used interchangably
with non-empty namespace roots (addressing issue #181), and custom
folder implementations no longer need to provide their own trivial,
custom FolderRoot.
To support this, a notion of an IMAP root and a local root have been
added from which all remote and local folder paths are now derived,
existing places that assume top-level == root have been fixed, and
unit tests have been added.
Require ClientService implementations and ProblemReport use contexts
rather than bare errors. Move code for generating backtraces and and
formatting errors from ProblemReport to ErrorContext.
Outbox code now effectively does not depend on ImapDB, and no longer
contains any SMTP code, so this moves it to it's own top-level engine
package and removes SMTP from its name.
This splits off the sending part of SmtpOutboxFolder into a new
Smtp.ClientService class that uses the standard Folder APIs for managing
mail in the outbox, and makes SmtpOutboxFolder handle local mail
CRUD operations only. This enables removing SmtpOutboxFolder from
ImapDB.Account and managing it from GenericAccount instead.
Part three of a three part series.
Rename ClientSessionManager to ClientService, make it extend Geary.ClientService and implement
its signauture. Use this as GenericAccount's incoming client service.
Part two of a three part series.
This removes Endpoint from ServiceInformation and moves it to a new
ClientService class, since ServiceInformation is for apps to provide
configuration, and Endpoints are effectively implementation detail. The
new ClientService class is in effect an analoge to ServiceInformation
in the same way as Account is to AccountInformation, and so this is a
better place to store an account's endpoints. Two instances have been
added to Account as `incoming` and `outgoing` properties instead of imap
and SMTP to be a bit more generic and with an eye to supporting other
protocols in the future.
This is possble to implement now non-generic providers are populating
ServiceInformation classes rather than Endpoints directly, and reduces
the complexity of the code needed to manage endpoints since all of the
untrusted_host callback complexity in AccountInformation and the Engine
can be removed, and will also allow simplifing credentials and SMTP
codepaths somewhat.
This work has been broken up in to thee parts to make the changes
clearer.
E.g. https://gitlab.gnome.org/GNOME/geary/-/jobs/156541
On a sufficiently (non?) parallel system, targets that depend on
geary-engine.h may get built before the geary_engine_internal_vapi
custom target that fixes its location is executed. This removes the
workaround for b.g.o #731322 since that was fixed in 0.40, and updates
workaround for the internal VAPI to be minimally intrusive.
Since MailboxParameter inherited from StringParameter directly, it meant
that we could never send mailbox names as quoted strings. Also, the
modified-UTF-7 encoding used for mailbox names does not encode
atom-specials such as "\", so if a mailbox name contained one or more of
these, it would be sent to the mail server unquoted.
This removes the MailboxParameter class altogether, and does the
parameter conversion to/from appropriate StringParameter subclasses as
needed. Also adds unit tests for param conversion for ASCII,
atom-specials, and non-ASCII mailbox names.
Fixes issue #40