gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: fix


From: gnunet
Subject: [taler-anastasis] branch master updated: fix
Date: Wed, 09 Sep 2020 14:34:05 +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 13d8061  fix
13d8061 is described below

commit 13d8061aa9841f5154c8fe0eeda2b08866a68c5e
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Wed Sep 9 14:33:55 2020 +0200

    fix
---
 src/include/anastasis_json.h | 76 +++++++++++++++++++++++++-------------------
 1 file changed, 44 insertions(+), 32 deletions(-)

diff --git a/src/include/anastasis_json.h b/src/include/anastasis_json.h
index 1952ba2..1bb8198 100644
--- a/src/include/anastasis_json.h
+++ b/src/include/anastasis_json.h
@@ -27,23 +27,39 @@
 #include <gnunet/gnunet_util_lib.h>
 #include "anastasis_error_codes.h"
 
+
+enum ANASTASIS_BackupStatus
+{
+  ANASTASIS_BA_GET_SELECT_CONTINENT,
+  ANASTASIS_BA_GET_SELECT_COUNTRY,
+  ANASTASIS_BA_GET_ENTER_USER_ATTRIBUTES,
+  ANASTASIS_BA_GET_ADD_AUTHENTICATION_METHOD,
+  ANASTASIS_BA_GET_ADD_POLICY,
+  ANASTASIS_BA_GET_PAY,
+  ANASTASIS_BA_SET_SELECT_CONTINENT,
+  ANASTASIS_BA_SET_SELECT_COUNTRY,
+  ANASTASIS_BA_SET_ENTER_USER_ATTRIBUTES,
+  ANASTASIS_BA_SET_ADD_AUTHENTICATION_METHOD,
+  ANASTASIS_BA_SET_ADD_POLICY,
+  ANASTASIS_BA_SET_PAY
+};
+
+enum ANASTASIS_RecoveryStatus
+{
+  ANASTASIS_RS_GET_SELECT_CONTINENT,
+  ANASTASIS_RS_GET_SELECT_COUNTRY,
+  ANASTASIS_RS_GET_ENTER_USER_ATTRIBUTES,
+  ANASTASIS_RS_GET_SOLVE_CHALLENGE,
+  ANASTASIS_RS_SET_SELECT_CONTINENT,
+  ANASTASIS_RS_SET_SELECT_COUNTRY,
+  ANASTASIS_RS_SET_ENTER_USER_ATTRIBUTES,
+  ANASTASIS_RS_SET_SOLVE_CHALLENGE
+};
+
+// A state for the backup process.
 struct ANASTASIS_BackupState
 {
-  enum state
-  {
-    ANASTASIS_BA_GET_SELECT_CONTINENT,
-    ANASTASIS_BA_GET_SELECT_COUNTRY,
-    ANASTASIS_BA_GET_ENTER_USER_ATTRIBUTES,
-    ANASTASIS_BA_GET_ADD_AUTHENTICATION_METHOD,
-    ANASTASIS_BA_GET_ADD_POLICY,
-    ANASTASIS_BA_GET_PAY,
-    ANASTASIS_BA_SET_SELECT_CONTINENT,
-    ANASTASIS_BA_SET_SELECT_COUNTRY,
-    ANASTASIS_BA_SET_ENTER_USER_ATTRIBUTES,
-    ANASTASIS_BA_SET_ADD_AUTHENTICATION_METHOD,
-    ANASTASIS_BA_SET_ADD_POLICY,
-    ANASTASIS_BA_SET_PAY
-  };
+  enum ANASTASIS_BackupStatus status;
 
   union
   {
@@ -184,19 +200,11 @@ struct ANASTASIS_BackupState
   } details;
 };
 
+
+// A state for the recovery process.
 struct ANASTASIS_RecoveryState
 {
-  enum state
-  {
-    ANASTASIS_RS_GET_SELECT_CONTINENT,
-    ANASTASIS_RS_GET_SELECT_COUNTRY,
-    ANASTASIS_RS_GET_ENTER_USER_ATTRIBUTES,
-    ANASTASIS_RS_GET_SOLVE_CHALLENGE,
-    ANASTASIS_RS_SET_SELECT_CONTINENT,
-    ANASTASIS_RS_SET_SELECT_COUNTRY,
-    ANASTASIS_RS_SET_ENTER_USER_ATTRIBUTES,
-    ANASTASIS_RS_SET_SOLVE_CHALLENGE
-  };
+  enum ANASTASIS_RecoveryStatus status;
 
   struct
   {
@@ -212,7 +220,7 @@ struct ANASTASIS_RecoveryState
   {
     const char *continent;
     const char *country;
-    const char *currency;     // derived or per manual override!
+    const char *currency;         // derived or per manual override!
     json_t *user_attributes;
   } enter_attributes;
 
@@ -246,7 +254,7 @@ struct ANASTASIS_RecoveryState
         struct
         {
           char *question;
-          char *answer;           // FIXME: Reasonable to store answer in 
clear text here?
+          char *answer;             // FIXME: Reasonable to store answer in 
clear text here?
         } secquest;
 
         struct
@@ -258,7 +266,7 @@ struct ANASTASIS_RecoveryState
         struct
         {
           char *full_name;
-          char *street;           // street name + number
+          char *street;             // street name + number
           char *postal_code;
           char *city;
           char *country;
@@ -271,11 +279,13 @@ struct ANASTASIS_RecoveryState
           char *code;
         } video;
       } truth;
-    }*cd;     // array
+    }*cd;         // array
     size_t cd_length;
   } solve_challenge;
 };
 
+
+
 struct ANASTASIS_BackupAction
 {
   enum action
@@ -293,6 +303,7 @@ struct ANASTASIS_BackupAction
     ANASTASIS_BA_SET_ADD_POLICY,
     ANASTASIS_BA_SET_PAY
   };
+  // FIXME
 };
 
 struct ANASTASIS_RecoveryAction
@@ -308,18 +319,19 @@ struct ANASTASIS_RecoveryAction
     ANASTASIS_RS_SET_ENTER_USER_ATTRIBUTES,
     ANASTASIS_RS_SET_SOLVE_CHALLENGE
   };
+  // FIXME
 };
 
 typedef void
 (*ANASTASIS_BackupApplyActionCallback)(
   void *cls,
-  const struct ANASTASIS_BackupState *bs,
+  const struct ANASTASIS_BackupState *new_bs,
   enum ANASTASIS_ErrorCode error);
 
 typedef void
 (*ANASTASIS_RecoveryApplyActionCallback)(
   void *cls,
-  const struct ANASTASIS_RecoveryState *rs,
+  const struct ANASTASIS_RecoveryState *new_rs,
   enum ANASTASIS_ErrorCode error);
 
 struct ANASTASIS_BackupState *

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]