summaryrefslogtreecommitdiff
path: root/src/syncevo/SuspendFlags.h
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2012-06-20 12:26:12 +0200
committerPatrick Ohly <patrick.ohly@intel.com>2012-06-20 12:26:43 +0200
commit3716ae2c9addde8fbd111cb3c12e842608e6b1ee (patch)
tree432b7fb886e8d4dc952d36e3c5d468acc5cc391e /src/syncevo/SuspendFlags.h
parent7ce9b7ff258565a2ecab8e344d86ef9497ba57ce (diff)
core, WebDAV: improved support for aborting while sleeping
When waiting for resending a failed message, the sleeping couldn't be interrupted when using the D-Bus server. It now uses the SuspendFlags infrastructure and glib, which detects abort requests sent via D-Bus in addition to those sent via signals (which already worked earlier).
Diffstat (limited to 'src/syncevo/SuspendFlags.h')
-rw-r--r--src/syncevo/SuspendFlags.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/syncevo/SuspendFlags.h b/src/syncevo/SuspendFlags.h
index fb609a40..f527dfa4 100644
--- a/src/syncevo/SuspendFlags.h
+++ b/src/syncevo/SuspendFlags.h
@@ -72,6 +72,14 @@ class SuspendFlags
State getState() const;
/**
+ * Throws a "aborting as requested by user" StatusException with
+ * LOCERR_USERABORT as status code if the current state is not
+ * NORMAL. In other words, suspend and abort are both
+ * treated like an abort request.
+ */
+ void checkForNormal() const;
+
+ /**
* Users of this class can read a single char for each received
* signal from this file descriptor. The char is the State that
* was entered by that signal. This can be used to be notified