[geary: 16/16] Merge branch 'wip/789924-network-transition'. Fixes Bug 789924.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary: 16/16] Merge branch 'wip/789924-network-transition'. Fixes Bug 789924.
- Date: Sun, 12 Nov 2017 11:18:08 +0000 (UTC)
commit fddf609a97ed9517941e5df64b9af9cad0c62712
Merge: 5b815f7 304fa9d
Author: Michael James Gratton <mike vee net>
Date: Sun Nov 12 22:16:45 2017 +1100
Merge branch 'wip/789924-network-transition'. Fixes Bug 789924.
src/client/application/geary-controller.vala | 10 +-
src/engine/api/geary-account.vala | 15 +-
src/engine/api/geary-endpoint.vala | 7 +-
src/engine/api/geary-engine.vala | 1 -
src/engine/imap-db/outbox/smtp-outbox-folder.vala | 990 +++++++++++---------
.../imap-engine-account-synchronizer.vala | 278 +++---
.../imap-engine/imap-engine-generic-account.vala | 161 ++--
.../imap-engine/imap-engine-minimal-folder.vala | 232 ++---
src/engine/imap-engine/imap-engine.vala | 57 +--
src/engine/imap/api/imap-account.vala | 25 +-
.../imap/transport/imap-client-connection.vala | 5 +-
.../transport/imap-client-session-manager.vala | 256 ++++--
src/engine/imap/transport/imap-deserializer.vala | 11 +-
src/engine/util/util-connectivity-manager.vala | 23 +-
14 files changed, 1073 insertions(+), 998 deletions(-)
---
diff --cc src/engine/imap/api/imap-account.vala
index 782fc3d,da8a066..4bf89f0
--- a/src/engine/imap/api/imap-account.vala
+++ b/src/engine/imap/api/imap-account.vala
@@@ -6,25 -5,30 +6,32 @@@
*/
/**
- * Provides an interface into the IMAP stack that provides a simpler interface for a
- * Geary.Account implementation.
+ * An interface between the high-level engine API and the IMAP stack.
*
- * Because of the complexities of the IMAP protocol, this private class takes common operations
- * that a Geary.Account implementation would need (in particular, {@link Geary.ImapEngine.Account}
- * and makes them into simple async calls.
+ * Because of the complexities of the IMAP protocol, this private
+ * class takes common operations that a Geary.Account implementation
+ * would need (in particular, {@link Geary.ImapEngine.Account} and
+ * makes them into simple async calls.
*
- * Geary.Imap.Account manages the {@link Imap.Folder} objects it returns, but only in the sense
- * that it will not create new instances repeatedly. Otherwise, it does not refresh or update the
- * Imap.Folders themselves (such as update their {@link Imap.StatusData} periodically).
- * That's the responsibility of the higher layers of the stack.
+ * Geary.Imap.Account manages the {@link Imap.Folder} objects it
+ * returns, but only in the sense that it will not create new
+ * instances repeatedly. Otherwise, it does not refresh or update the
+ * Imap.Folders themselves (such as update their {@link
+ * Imap.StatusData} periodically). That's the responsibility of the
+ * higher layers of the stack.
*/
-
private class Geary.Imap.Account : BaseObject {
+
-
+ /** Determines if the IMAP account has been opened. */
public bool is_open { get; private set; default = false; }
+ /**
+ * Determines if the IMAP account has a working connection.
+ *
+ * See {@link ClientSessionManager.is_open} for more details.
+ */
+ public bool is_ready { get { return this.session_mgr.is_ready; } }
+
private string name;
private AccountInformation account_information;
private ClientSessionManager session_mgr;
@@@ -35,7 -41,16 +42,14 @@@
private Gee.List<MailboxInformation>? list_collector = null;
private Gee.List<StatusData>? status_collector = null;
private Gee.List<ServerData>? server_data_collector = null;
- private Imap.MailboxSpecifier? inbox_specifier = null;
- private string hierarchy_delimiter = null;
+ /**
+ * Fired after opening when the account has a working connection.
+ *
+ * This may be fired multiple times, see @{link
+ * ClientSessionManager.ready} for details.
+ */
+ public signal void ready();
public signal void login_failed(Geary.Credentials? cred, StatusResponse? response);
@@@ -572,25 -623,10 +585,29 @@@
login_failed(account_information.imap_credentials, response);
}
+ private void on_list_data(MailboxInformation mailbox_info) {
+ if (list_collector != null)
+ list_collector.add(mailbox_info);
+ }
+
+ private void on_status_data(StatusData status_data) {
+ if (status_collector != null)
+ status_collector.add(status_data);
+ }
+
+ private void on_server_data_received(ServerData server_data) {
+ if (server_data_collector != null)
+ server_data_collector.add(server_data);
+ }
+
+ private void on_disconnected() {
+ drop_session_async.begin(null);
+ }
+
+ private void on_session_ready() {
+ ready();
+ }
+
public string to_string() {
return name;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]