moved API thread data structure definitions
authorHolger Schemel <info@artsoft.org>
Fri, 24 Sep 2021 14:15:56 +0000 (16:15 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 24 Sep 2021 14:15:56 +0000 (16:15 +0200)
src/files.c
src/screens.c

index 1c4faf2da5e2a7411b103313492ee9af3ba76406..fc45f7731b298cf7f3ff9d1d2c496c0ed0e85b15 100644 (file)
@@ -9068,6 +9068,12 @@ char *getPasswordJSON(char *password)
   return password_json;
 }
 
+struct ApiGetScoreThreadData
+{
+  int level_nr;
+  char *score_cache_filename;
+};
+
 static void ApiGetScoreExt(struct HttpRequest *request,
                           struct HttpResponse *response,
                           int level_nr,
@@ -9154,12 +9160,6 @@ static void ApiGetScore(int level_nr, char *score_cache_filename)
   checked_free(response);
 }
 
-struct ApiGetScoreThreadData
-{
-  int level_nr;
-  char *score_cache_filename;
-};
-
 static int ApiGetScoreThread(void *data_raw)
 {
   struct ApiGetScoreThreadData *data = data_raw;
@@ -9327,6 +9327,13 @@ static char *get_file_base64(char *filename)
   return buffer_encoded;
 }
 
+struct ApiAddScoreThreadData
+{
+  int level_nr;
+  char *score_tape_filename;
+  struct ScoreEntry score_entry;
+};
+
 static void ApiAddScoreExt(struct HttpRequest *request,
                           struct HttpResponse *response,
                           int level_nr,
@@ -9450,13 +9457,6 @@ static void ApiAddScore(int level_nr, char *score_tape_filename,
   checked_free(response);
 }
 
-struct ApiAddScoreThreadData
-{
-  int level_nr;
-  char *score_tape_filename;
-  struct ScoreEntry score_entry;
-};
-
 static int ApiAddScoreThread(void *data_raw)
 {
   struct ApiAddScoreThreadData *data = data_raw;
index 61aff99a31f99a07bc1ee51cecde52bc81e07640..8a5279b71a0122705844c3f1aaef7498052d3bf1 100644 (file)
@@ -4042,6 +4042,12 @@ void HandleInfoScreen(int mx, int my, int dx, int dy, int button)
 // change name functions
 // ============================================================================
 
+struct ApiRenamePlayerThreadData
+{
+  char *player_name;
+  char *player_uuid;
+};
+
 static void ApiRenamePlayerExt(struct HttpRequest *request,
                               struct HttpResponse *response,
                               char *player_name_raw,
@@ -4102,12 +4108,6 @@ static void ApiRenamePlayer(char *player_name, char *player_uuid)
   checked_free(response);
 }
 
-struct ApiRenamePlayerThreadData
-{
-  char *player_name;
-  char *player_uuid;
-};
-
 static int ApiRenamePlayerThread(void *data_raw)
 {
   struct ApiRenamePlayerThreadData *data = data_raw;