[geary/wip/131-sent-mail: 41/52] Allow sending NOOP commands from Imap.FolderSession



commit bd58bfd923744fe4c1c67403f09bbdccb026a18b
Author: Michael Gratton <mike vee net>
Date:   Thu Aug 8 22:58:04 2019 +1000

    Allow sending NOOP commands from Imap.FolderSession
    
    This provides API users a means of poking the server to get pending
    notifications out.

 src/engine/imap/api/imap-folder-session.vala | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/src/engine/imap/api/imap-folder-session.vala b/src/engine/imap/api/imap-folder-session.vala
index 0dc1db0e..2769a76b 100644
--- a/src/engine/imap/api/imap-folder-session.vala
+++ b/src/engine/imap/api/imap-folder-session.vala
@@ -161,6 +161,17 @@ private class Geary.Imap.FolderSession : Geary.Imap.SessionObject {
         return old_session;
     }
 
+    /** Sends a NOOP command. */
+    public async void send_noop(GLib.Cancellable? cancellable)
+        throws GLib.Error {
+        yield exec_commands_async(
+            Collection.single(new NoopCommand()),
+            null,
+            null,
+            cancellable
+        );
+    }
+
     private void on_exists(int total) {
         debug("%s EXISTS %d", to_string(), total);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]