From: Holger Schemel Date: Fri, 24 Sep 2021 14:15:56 +0000 (+0200) Subject: moved API thread data structure definitions X-Git-Tag: 4.3.0.0~40 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ab3d5a2937d41e04be3ae8884d9295d59ff346cd;p=rocksndiamonds.git moved API thread data structure definitions --- diff --git a/src/files.c b/src/files.c index 1c4faf2d..fc45f773 100644 --- a/src/files.c +++ b/src/files.c @@ -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; diff --git a/src/screens.c b/src/screens.c index 61aff99a..8a5279b7 100644 --- a/src/screens.c +++ b/src/screens.c @@ -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;