summaryrefslogtreecommitdiff
path: root/src/anastasis/anastasis-gtk.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/anastasis/anastasis-gtk.h')
-rw-r--r--src/anastasis/anastasis-gtk.h53
1 files changed, 49 insertions, 4 deletions
diff --git a/src/anastasis/anastasis-gtk.h b/src/anastasis/anastasis-gtk.h
index 7497223..54c47fb 100644
--- a/src/anastasis/anastasis-gtk.h
+++ b/src/anastasis/anastasis-gtk.h
@@ -61,15 +61,60 @@ extern json_t *AG_redux_state;
*/
extern struct ANASTASIS_ReduxAction *AG_ra;
+
/**
- * Handle to an ongoing background action.
+ * State associated with a background long action.
+ */
+struct ANASTASIS_LongAction
+{
+ /**
+ * Action handle of the background action.
+ */
+ struct ANASTASIS_ReduxAction *ra;
+
+ /**
+ * Handle to task to reschedule the action.
+ */
+ struct GNUNET_SCHEDULER_Task *task;
+
+ /**
+ * Next time we schedule the task.
+ */
+ struct GNUNET_TIME_Absolute next_time;
+
+};
+
+
+/**
+ * Enumeration for long poll actions we have.
*/
-extern struct ANASTASIS_ReduxAction *AG_long_action;
+enum ANASTASIS_LongActionKind
+{
+ /**
+ * Poll on async challenge completion.
+ */
+ ANASTASIS_LP_POLL_CHALLENGES,
+
+ /**
+ * Poll for /config on all known providers.
+ */
+ ANASTASIS_LP_SYNC_PROVIDERS,
+
+ /**
+ * Wait for challenge-specific providers being ready.
+ */
+ ANASTASIS_LP_POLL_PROVIDERS,
+
+ /**
+ * Number of pollers we have.
+ */
+ ANASTASIS_LP_CNT /* must be last! */
+};
/**
- * Handle to task to reschedule #AG_long_action.
+ * Handle to an ongoing background action.
*/
-extern struct GNUNET_SCHEDULER_Task *AG_long_task;
+extern struct ANASTASIS_LongAction AG_lacs[ANASTASIS_LP_CNT];
/**