Commit Graph

10 Commits

Author SHA1 Message Date
7383843653 Reimplement mail_folder_cache_note_store().
* Use GIO-style async parameters.
* Add mail_folder_cache_note_store_finish().
* Do the bulk of the work in a thread so the logic is more readable.
* Queue multiple calls for the same CamelStore and share the results.
2013-07-19 08:36:56 -04:00
060bb07662 mail_folder_cache_get_folder_info_flags: Change parameters.
Take a CamelStore and folder name instead of a CamelFolder.

CamelStore and folder name can easily be obtained from either a folder
URI or a CamelFolder instance, and the function is more efficient with
separate parameters.
2013-07-17 12:08:46 -04:00
c36aa6b749 Add mail_folder_cache_ref_folder().
Replaces mail_folder_cache_get_folder_from_uri().

Returns the CamelFolder for the CamelStore and folder name if available,
or else NULL if a CamelFolder instance is not yet cached.  This function
does not block.
2013-07-17 12:08:46 -04:00
4de5726797 Add mail_folder_cache_has_folder_info().
Returns whether MailFolderCache has information about the folder
described by the CamelStore and folder name.  This does not necessarily
mean it has the CamelFolder instance, but it at least has some meta-data
about it.

You can use this function as a folder existence test.
2013-07-17 12:08:46 -04:00
079fc1a78d MailFolderCache: Add a read-only "main-context" property.
New functions:

  mail_folder_cache_ref_main_context()
2013-07-17 12:08:46 -04:00
3f2d55fb7f MailFolderCache: Remove the "session" property.
I considered replacing the "session" property with a "registry"
property, but that just complicates application startup even more.
Fact is, if we have a CamelStore then we can get the CamelSession
and even the ESourceRegistry from it.  Kinda dirty, but works.

It goes a little something like this...

  camel_service = CAMEL_SERVICE (camel_store);
  camel_session = camel_service_get_session (camel_service);
   mail_session = E_MAIL_SESSION (camel_session);
       registry = e_mail_session_get_registry (mail_session);

Removed functions:

  mail_folder_cache_get_session()
2013-07-17 12:08:46 -04:00
a877db3749 Remove unused mail_folder_cache_get_folder_has_children(). 2013-07-17 12:08:46 -04:00
a36294e7c7 Bug 677995 - Asks password for disabled mail account
Remove mail_folder_cache_service_added() and rely instead on
mail_folder_cache_service_enabled()/disabled().  Despite the function
names the folder cache doesn't actually care about enabled status, it
simply maintains a set of CamelStores to monitor.  We should refactor
the folder cache API to better reflect that.

EMailAccountStore always immediately follows a "service-added" signal
emission with either a "service-enabled" or "service-disabled" emission,
which will add or remove the service from the folder cache.
2012-06-13 11:19:56 -04:00
59e6e599ba Coding style and whitespace cleanup. 2012-01-18 23:48:48 -05:00
61ae36351b Introduce libemail-engine and libemail-utils.
These libraries are bound for E-D-S so they live at the lowest layer of
Evolution for now -- even libeutil can link to them (but please don't).

This is the first step toward moving mail handing to a D-Bus service.
2012-01-18 23:48:47 -05:00