Age | Commit message (Collapse) | Author |
|
This commit updates all usages of Network::ErrorResponse to specify at
least method name if not precise reason why operation failed.
|
|
If user doesn't have a "saves" folder, listing it as a first step of
syncing save files would result in 404 from OneDrive.
OneDriveTokenRefresher handles token-related errors (401), so when it
meets 404, it calls its finishError method. But because there was some
strange behaviour from OneDrive with sending invalid JSON, this method
tries fixing JSON and parsing it again. If it is valid, it calls
non-error method again, and in result we get stack overflow.
In order to fix that, I've added a non-JSON prefix "<irrecoverable>", so
finishError won't be able to parse JSON and thus won't call finishJson
again. Saves syncing callback does check string contents apart from
trying to parse JSON, so it still works and correctly handles the
situation when "saves" directory is missing. But, if needed, code can be
updated to search for the prefix I've added and remove it before parsing
original JSON.
|
|
For more security, newly connected Storage only gets username/used space
information and is disabled until user manually presses the button.
|
|
- StorageWizardDialog is removed, along with bmps it was using;
- EditTextWidget now accepts custom font in constructor;
- ScrollContainer scrollbar now jumps to top when content height changes
so it's "overscrolled";
- IndexPageHandler now does not awaits for `code` GET-parameter, as
local webserver is no longer used to connect Storages;
- CloudManager and all corresponding Storages are updated to support
disconnecting and to notify about successful connection.
|
|
|
|
Something changed and old API endpoint "api.onedrive.com" now does not
work. The other one, "graph.microsoft.com", does, but there were some
other changes in JSON it returns. These changes are also in this commit.
|
|
While refreshing access_token, some cloud providers also pass a new
refresh_token. Google Drive does not, and accepts the same refresh_token
next time. These changes allow this to happen.
|
|
|
|
|
|
|
|
|
|
correspondingly
|
|
libcurl pulls in Windows headers, so let's include it first to avoid clashing with common headers
|
|
|
|
|
|
Hopefully all ports we have support LL constants. Otherwise we will
have to find a different way to fix this.
|
|
|
|
Remove unnecessary JSON warnings, fix a few places.
|
|
More JSON checks.
|
|
Added JSON checks.
New jsonContainsObject() method added to CurlJsonRequest.
|
|
Box's, Google Drive's and OneDrive's token refreshing requests have more
JSON checks now.
|
|
|
|
The following constants must be defined if ENABLE_RELEASE is:
* RELEASE_DROPBOX_KEY,
* RELEASE_DROPBOX_SECRET,
* RELEASE_ONEDRIVE_KEY,
* RELEASE_ONEDRIVE_SECRET,
* RELEASE_GOOGLE_DRIVE_KEY,
* RELEASE_GOOGLE_DRIVE_SECRET,
* RELEASE_BOX_KEY,
* RELEASE_BOX_SECRET.
|
|
Added prefixes, used debug(9).
|
|
|
|
Lots of checks to avoid JSON-related segfaults added.
|
|
|
|
|
|
|
|
Now it's not hardcoded based on USE_SDL_NET, but one or another value is
used depending on currently selected LocalWebserver's port.
|
|
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
|
|
Nothing really major.
|
|
|
|
|
|
Segfault when given stream is nullptr.
|
|
OneDrive doesn't accept empty files, so UploadRequest just skips such.
|
|
|
|
|
|
The "comparison between signed and unsigned integer expressions" one.
Note that in UploadRequests size() and pos() are acutally signed,
because they could return -1. This commit implies that Requests are
working with such Streams which doesn't.
|
|
Usage of #ifdef there (and in StorageWizardDialog) means that ScummVM
doesn't support both local webserver and scummvm.org paths at the same
time. It's either built with SDL_net (thus supporting localhost path) or
without it (thus using scummvm.org).
|
|
|
|
|
|
|
|
KEY and SECRET should now load before getAccessToken() uses them, so it
should work now.
|
|
One can enter the code, press 'Connect' button and get a working
Storage!
|
|
Used in SavesSyncRequest to update Storage's last sync date.
|
|
Tried to use it everywhere I should've use it.
|
|
Commit changes CloudManager and Storages so they would automatically
refresh the fields when the could.
|
|
It now has methods to update Storage's information.
|
|
It now supports only one storage of each type. Only one Storage could be
loaded to the memory as well.
Options' Cloud tab now changes the Storage only when user pressed OK
button, giving the ability to look through the Storages without actually
changing them.
|