[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: added descriptions
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: added descriptions |
Date: |
Wed, 09 Sep 2020 14:56:14 +0200 |
This is an automated email from the git hooks/post-receive script.
dennis-neufeld pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new c1cd716 added descriptions
c1cd716 is described below
commit c1cd7163815ef85a425915e9393be3faf5f47bb4
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Wed Sep 9 14:56:02 2020 +0200
added descriptions
---
src/include/anastasis_json.h | 71 ++++++++++++++++++++++++++++++++++++++++----
1 file changed, 66 insertions(+), 5 deletions(-)
diff --git a/src/include/anastasis_json.h b/src/include/anastasis_json.h
index 62d692a..7311789 100644
--- a/src/include/anastasis_json.h
+++ b/src/include/anastasis_json.h
@@ -27,7 +27,9 @@
#include <gnunet/gnunet_util_lib.h>
#include "anastasis_error_codes.h"
-
+/**
+ * Enumeration of possible backup process status.
+ */
enum ANASTASIS_BackupStatus
{
ANASTASIS_BA_SELECT_CONTINENT,
@@ -38,6 +40,9 @@ enum ANASTASIS_BackupStatus
ANASTASIS_BA_PAY
};
+/**
+ * Enumeration of possible recovery process status.
+ */
enum ANASTASIS_RecoveryStatus
{
ANASTASIS_RS_SELECT_CONTINENT,
@@ -274,8 +279,9 @@ struct ANASTASIS_RecoveryState
} solve_challenge;
};
-
-
+/**
+ * Definition of actions on ANASTASIS_BackupState.
+ */
struct ANASTASIS_BackupAction
{
enum action
@@ -293,9 +299,11 @@ struct ANASTASIS_BackupAction
ANASTASIS_BA_SET_ADD_POLICY,
ANASTASIS_BA_SET_PAY
};
- // FIXME
};
+/**
+ * Definition of actions on ANASTASIS_RecoveryState.
+ */
struct ANASTASIS_RecoveryAction
{
enum action
@@ -309,27 +317,68 @@ struct ANASTASIS_RecoveryAction
ANASTASIS_RS_SET_ENTER_USER_ATTRIBUTES,
ANASTASIS_RS_SET_SOLVE_CHALLENGE
};
- // FIXME
};
+
+/**
+ * Signature of the callback bassed to #ANASTASIS_apply_anastasis_backup_action
+ * for asynchronous actions on a #ANASTASIS_BackupState.
+ *
+ * @param cls closure
+ * @param new_bs the new #ANASTASIS_BackupState
+ * @param error error code
+ */
typedef void
(*ANASTASIS_BackupApplyActionCallback)(
void *cls,
const struct ANASTASIS_BackupState *new_bs,
enum ANASTASIS_ErrorCode error);
+
+/**
+ * Signature of the callback bassed to
#ANASTASIS_apply_anastasis_recovery_action
+ * for asynchronous actions on a #ANASTASIS_RecoveryState.
+ *
+ * @param cls closure
+ * @param new_bs the new #ANASTASIS_RecoveryState
+ * @param error error code
+ */
typedef void
(*ANASTASIS_RecoveryApplyActionCallback)(
void *cls,
const struct ANASTASIS_RecoveryState *new_rs,
enum ANASTASIS_ErrorCode error);
+
+/**
+ * Returns an initial ANASTASIS_BackupState.
+ *
+ * @return initial ANASTASIS_BackupState
+ */
struct ANASTASIS_BackupState *
ANASTASIS_get_initial_backup_state ();
+
+/**
+ * Returns an initial ANASTASIS_RecoveryState.
+ *
+ * @return initial ANASTASIS_RecoveryState
+ */
struct ANASTASIS_RecoveryState *
ANASTASIS_get_initial_recovery_state ();
+
+/**
+ * Operates on a backup state depending on given #ANASTASIS_BackupState
+ * and #ANASTASIS_BackupAction. The new #ANASTASIS_BackupState is returned
+ * by a callback function.
+ * This function can do network access to talk to anastasis service providers.
+ *
+ * @param ctx url context for the event loop
+ * @param bs the previous *ANASTASIS_BackupState
+ * @param ba the action to do on #ANASTASIS_BackupState
+ * @param cb callback function to call with the action
+ */
void
ANASTASIS_apply_anastasis_backup_action (
struct GNUNET_CURL_Context *ctx,
@@ -337,6 +386,18 @@ ANASTASIS_apply_anastasis_backup_action (
struct ANASTASIS_BackupAction *ba,
ANASTASIS_BackupApplyActionCallback cb);
+
+/**
+ * Operates on a recovery state depending on given #ANASTASIS_RecoveryState
+ * and #ANASTASIS_RecoveryAction. The new #ANASTASIS_RecoveryState is returned
+ * by a callback function.
+ * This function can do network access to talk to anastasis service providers.
+ *
+ * @param ctx url context for the event loop
+ * @param bs the previous *ANASTASIS_RecoveryState
+ * @param ba the action to do on #ANASTASIS_RecoveryState
+ * @param cb callback function to call with the action
+ */
void
ANASTASIS_apply_anastasis_recovery_action (
struct GNUNET_CURL_Context *ctx,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: added descriptions,
gnunet <=