|
GameApi 28
Library used by GameApi Builder tool
|
#include "GameApi_http.hh"#include "GameApi.hh"#include "Tasks.hh"#include "GraphI.hh"#include "zip_file.hpp"#include "httplib.h"
Classes | |
| struct | UrlItem |
| struct | HTTP_files |
Macros | |
| #define | MINIZ_HEADER_FILE_ONLY 1 |
| #define | CPPHTTPLIB_NO_EXCEPTIONS |
Functions | |
| bool | file_exists (std::string url) |
| std::string | remove_quotes (std::string str) |
| std::string | GetContentInstallDir (bool b) |
| void * | http_server_wait_process (void *) |
| EXPORT std::string | http_server_address () |
| IMPORT void * | http_server_process (void *) |
| IMPORT void | send_post_request (std::string url, std::string headers, std::string data) |
| std::string | remove_str_after_char (std::string s, char ch) |
| std::string | deploy_truncate (std::string s) |
| std::string | http_to_https (std::string url) |
| std::string | deploy_curl_cmd () |
| IMPORT std::string | remove_prefix (std::string url) |
| std::string | find_directory (std::string url) |
| std::string | replace_deploy_url (std::string home) |
| IMPORT int | find_str (std::string val, std::string repl) |
| std::string | deploy_replace_string (std::string val, std::string repl, std::string subst) |
| std::string | convert_spaces_to_url_encoding (std::string url) |
| std::string | take_prefix (std::string cd, std::string path) |
| IMPORT std::string | replace_str (std::string val, std::string repl, std::string subst) |
| std::vector< UrlItem > | find_url_items (GameApi::Env &e, std::string s) |
| void | find_url_items2 (GameApi::Env &e, std::string s, std::vector< UrlItem > &result) |
| void | find_url_items3 (GameApi::Env &e, std::vector< UrlItem > &result) |
| void | set_cors_headers (httplib::Response &res) |
| bool | handle_range_request (const httplib::Request &req, httplib::Response &res, const std::vector< std::string > &filenames, const std::vector< std::string > &contents, std::string filename) |
| EXPORT void | start_http_listening (std::vector< std::string > filenames, std::vector< std::string > contents, std::string homepage, std::string script, std::string date, bool transparent) |
| EXPORT void | join_http () |
| EXPORT void | start_server_shutdown () |
| EXPORT void | http_sleep () |
| EXPORT void | send_http_server_shutdown () |
| EXPORT bool | choose_http_port () |
| const char * | choose_type (std::string filename) |
| EXPORT void | http_server (std::vector< std::string > filenames, std::vector< std::string > contents, std::string homepage, std::string script, std::string date, bool transparent) |
| EXPORT std::string | replace_urls_from_script (std::string script, const HttpDeployResult &data) |
| EXPORT HttpDeployResult | http_deploy (GameApi::Env &env, std::string h2_script) |
| void | set_http_server_htmlfile (std::string file) |
| std::string | gameapi_example (std::string homepage, std::string script, std::string date, bool transparent) |
| EXPORT std::vector< unsigned char > | find_display_zip_file () |
| EXPORT std::vector< HttpFileFromZip > | decompress_zip_file (std::vector< unsigned char > zip_contents) |
Variables | |
| IMPORT std::string | g_http_server_ip = "127.0.0.1" |
| IMPORT int | g_http_server_port =50200 |
| bool | g_wait_ongoing = true |
| IMPORT GameApi::PAT | gameapi_temp_dir |
| std::string | g_mod_path |
| httplib::Server * | g_http_server = 0 |
| bool | g_http_up_and_running =false |
| std::string | g_http_htmlfile |
| #define CPPHTTPLIB_NO_EXCEPTIONS |
| #define MINIZ_HEADER_FILE_ONLY 1 |
| EXPORT bool choose_http_port | ( | ) |

| const char * choose_type | ( | std::string | filename | ) |

| std::string convert_spaces_to_url_encoding | ( | std::string | url | ) |

| EXPORT std::vector< HttpFileFromZip > decompress_zip_file | ( | std::vector< unsigned char > | zip_contents | ) |

| std::string deploy_curl_cmd | ( | ) |

| std::string deploy_replace_string | ( | std::string | val, |
| std::string | repl, | ||
| std::string | subst ) |

| std::string deploy_truncate | ( | std::string | s | ) |

| bool file_exists | ( | std::string | url | ) |

| std::string find_directory | ( | std::string | url | ) |

| EXPORT std::vector< unsigned char > find_display_zip_file | ( | ) |

| IMPORT int find_str | ( | std::string | val, |
| std::string | repl ) |

| std::vector< UrlItem > find_url_items | ( | GameApi::Env & | e, |
| std::string | s ) |

| void find_url_items2 | ( | GameApi::Env & | e, |
| std::string | s, | ||
| std::vector< UrlItem > & | result ) |

| void find_url_items3 | ( | GameApi::Env & | e, |
| std::vector< UrlItem > & | result ) |

| std::string gameapi_example | ( | std::string | homepage, |
| std::string | script, | ||
| std::string | date, | ||
| bool | transparent ) |

| std::string GetContentInstallDir | ( | bool | b | ) |

| bool handle_range_request | ( | const httplib::Request & | req, |
| httplib::Response & | res, | ||
| const std::vector< std::string > & | filenames, | ||
| const std::vector< std::string > & | contents, | ||
| std::string | filename ) |

| EXPORT HttpDeployResult http_deploy | ( | GameApi::Env & | env, |
| std::string | h2_script ) |

| EXPORT void http_server | ( | std::vector< std::string > | filenames, |
| std::vector< std::string > | contents, | ||
| std::string | homepage, | ||
| std::string | script, | ||
| std::string | date, | ||
| bool | transparent ) |

| EXPORT std::string http_server_address | ( | ) |

| EXPORT void * http_server_process | ( | void * | ptr | ) |

| void * http_server_wait_process | ( | void * | ptr | ) |

| EXPORT void http_sleep | ( | ) |

| std::string http_to_https | ( | std::string | url | ) |

| EXPORT void join_http | ( | ) |
| IMPORT std::string remove_prefix | ( | std::string | url | ) |

| std::string remove_quotes | ( | std::string | str | ) |

| std::string remove_str_after_char | ( | std::string | s, |
| char | ch ) |

| std::string replace_deploy_url | ( | std::string | home | ) |

| IMPORT std::string replace_str | ( | std::string | val, |
| std::string | repl, | ||
| std::string | subst ) |

| EXPORT std::string replace_urls_from_script | ( | std::string | script, |
| const HttpDeployResult & | data ) |

| EXPORT void send_http_server_shutdown | ( | ) |
| IMPORT void send_post_request | ( | std::string | url, |
| std::string | headers, | ||
| std::string | data ) |

| void set_cors_headers | ( | httplib::Response & | res | ) |

| void set_http_server_htmlfile | ( | std::string | file | ) |
| EXPORT void start_http_listening | ( | std::vector< std::string > | filenames, |
| std::vector< std::string > | contents, | ||
| std::string | homepage, | ||
| std::string | script, | ||
| std::string | date, | ||
| bool | transparent ) |

| EXPORT void start_server_shutdown | ( | ) |

| std::string take_prefix | ( | std::string | cd, |
| std::string | path ) |

| std::string g_http_htmlfile |
| httplib::Server * g_http_server = 0 |
| EXPORT std::string g_http_server_ip = "127.0.0.1" |
| EXPORT int g_http_server_port =50200 |
| bool g_http_up_and_running =false |
|
extern |
| bool g_wait_ongoing = true |
|
extern |