packet.cpp:121:9: warning: declaration of 'byte' shadows a global declaration [-Wshadow]
121 | int byte;
| ^~~~
In file included from C:/msys64/mingw64/include/wtypes.h:8,
from C:/msys64/mingw64/include/winscard.h:10,
from C:/msys64/mingw64/include/windows.h:97,
from C:/msys64/mingw64/include/winsock2.h:23,
from C:/Projects/scummvm/backends/networking/enet/source/win32.h:18,
from C:/Projects/scummvm/backends/networking/enet/source/enet.h:16,
from C:/Projects/scummvm/backends/networking/enet/source/packet.cpp:7:
C:/msys64/mingw64/include/rpcndr.h:63:25: note: shadowed declaration is here
63 | typedef unsigned char byte;
| ^~~~
Fix by defining WIN32_LEAN_AND_MEAN, which prevents this typedef.
- remove Options widgets of the old wizard;
- add CloudConnectionWizard dialog;
- remove old widgets and add new ones in the layouts;
- update local webserver to allow passing a callback that needs to be called if storage was connected via /connect_cloud.
- allow OPTIONS HTTP method to be handled by local webserver;
- add /connect_cloud endpoint;
- add new DropboxStorage constructor that works with JSON response instead of requesting that via shortcode;
- add CloudManager::connectStorage() overload for this new JSON flow.
/connect_cloud endpoint allows cross-origin request (via CORS HTTP headers) from cloud.scummvm.org, so user's browser sends the JSON response directly to ScummVM app, instead of the app requesting that response from the site.
This commit is WIP, introducing a new constructor for Dropbox only, and not changing the GUI part at all.
Local webserver's helper class, Reader, supported simple GET requests and POST form/multipart ones. The code for the latter was a bit specific, and didn't allow handling more generic POST requests.
This change adds ReaderMode enum, with RM_HTTP_GENERIC mode, that allows such generic requests to be handled. In Networking::Client class, that uses Reader, readContent() was renamed to readFirstContent(), and corresponds to previously existing POST form/multipart mode. readContent() should now be used for generic POST requests handling.