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



commit ee11d0d8ecb3560945d4a4d9a662e266f04cd310
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]