77#include " about/about.hpp"
88
99#define TAG " FlipSocial"
10- #define VERSION " 2.0.7 "
10+ #define VERSION " 2.0.8 "
1111#define VERSION_TAG TAG " " VERSION
1212#define APP_ID " flip_social"
1313
@@ -52,30 +52,30 @@ class FlipSocialApp
5252 ViewDispatcher *viewDispatcher = nullptr ; // ViewDispatcher for managing views
5353 ViewPort *viewPort = nullptr ; // ViewPort for drawing and input handling (run instance)
5454 //
55- size_t getBytesReceived () const noexcept { return flipperHttp ? flipperHttp->bytes_received : 0 ; } // get the number of bytes received
56- size_t getContentLength () const noexcept { return flipperHttp ? flipperHttp->content_length : 0 ; } // get the content length of the last response
57- HTTPState getHttpState () const noexcept { return flipperHttp ? flipperHttp->state : INACTIVE; } // get the HTTP state
58- bool hasWiFiCredentials (); // check if WiFi credentials are set
59- bool hasUserCredentials (); // check if user credentials are set
60- FuriString *httpRequest ( // synchronous HTTP request
61- const char *url, // URL to send the request to
62- HTTPMethod method = GET, // HTTP method to use (GET, POST, etc.)
63- const char *headers = " {\" Content-Type\" : \" application/json\" }" , // Headers to include in the request
64- const char *payload = nullptr ); // Payload to send with the request (for POST, PUT, etc.)
65- bool httpRequestAsync ( // asynchronous HTTP request (check the HttpState to see if the request is finished)
66- const char *saveLocation, // location to save the response (filename)
67- const char *url, // URL to send the request to
68- HTTPMethod method = GET, // HTTP method to use (GET, POST, etc.)
69- const char *headers = " {\" Content-Type\" : \" application/json\" }" , // Headers to include in the request
70- const char *payload = nullptr ); // Payload to send with the request (for POST, PUT, etc.)
71- bool isBoardConnected (); // check if the board is connected
72- bool loadChar (const char *path_name, char *value, size_t value_size, const char *appId = APP_ID); // load a string from storage
73- bool loadFileChunk (const char *filePath, char *buffer, size_t sizeOfChunk, uint8_t iteration); // Load a file chunk from storage
74- void runDispatcher (); // run the app's view dispatcher to handle views and events
75- bool saveChar (const char *path_name, const char *value, const char *appId = APP_ID); // save a string to storage
76- bool setHttpState (HTTPState state = IDLE) noexcept ; // set the HTTP state
77- bool sendWiFiCredentials (const char *ssid, const char *password); // send WiFi credentials to the board
78- void updateApp (); // update the app (used in the main function)
79- static void viewPortDraw (Canvas *canvas, void *context); // draw callback for the ViewPort (used in run instance)
80- static void viewPortInput (InputEvent *event, void *context); // input callback for the ViewPort (used in run instance)
55+ size_t getBytesReceived () const noexcept { return flipperHttp ? flipperHttp->bytes_received : 0 ; } // get the number of bytes received
56+ size_t getContentLength () const noexcept { return flipperHttp ? flipperHttp->content_length : 0 ; } // get the content length of the last response
57+ HTTPState getHttpState () const noexcept { return flipperHttp ? flipperHttp->state : INACTIVE; } // get the HTTP state
58+ bool hasWiFiCredentials (); // check if WiFi credentials are set
59+ bool hasUserCredentials (); // check if user credentials are set
60+ FuriString *httpRequest ( // synchronous HTTP request
61+ const char *url, // URL to send the request to
62+ HTTPMethod method = GET, // HTTP method to use (GET, POST, etc.)
63+ const char *headers = " {\" Content-Type\" : \" application/json\" }" , // Headers to include in the request
64+ const char *payload = nullptr ); // Payload to send with the request (for POST, PUT, etc.)
65+ bool httpRequestAsync ( // asynchronous HTTP request (check the HttpState to see if the request is finished)
66+ const char *saveLocation, // location to save the response (filename)
67+ const char *url, // URL to send the request to
68+ HTTPMethod method = GET, // HTTP method to use (GET, POST, etc.)
69+ const char *headers = " {\" Content-Type\" : \" application/json\" }" , // Headers to include in the request
70+ const char *payload = nullptr ); // Payload to send with the request (for POST, PUT, etc.)
71+ bool isBoardConnected (); // check if the board is connected
72+ bool loadChar (const char *path_name, char *value, size_t value_size, const char *appId = APP_ID); // load a string from storage
73+ bool loadFileChunk (const char *filePath, char *buffer, size_t sizeOfChunk, uint8_t iteration); // Load a file chunk from storage
74+ void runDispatcher (); // run the app's view dispatcher to handle views and events
75+ bool saveChar (const char *path_name, const char *value, const char *appId = APP_ID, bool overwrite = true ); // save a string to storage
76+ bool setHttpState (HTTPState state = IDLE) noexcept ; // set the HTTP state
77+ bool sendWiFiCredentials (const char *ssid, const char *password); // send WiFi credentials to the board
78+ void updateApp (); // update the app (used in the main function)
79+ static void viewPortDraw (Canvas *canvas, void *context); // draw callback for the ViewPort (used in run instance)
80+ static void viewPortInput (InputEvent *event, void *context); // input callback for the ViewPort (used in run instance)
8181};
0 commit comments