Age | Commit message (Collapse) | Author |
|
libcurl pulls in Windows headers, so let's include it first to avoid clashing with common headers
|
|
|
|
JSON checks added.
|
|
|
|
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).
|
|
|
|
|
|
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.
|
|
|
|
|
|
We had a few places where their deprecated API v1 was used.
|
|
|
|
Mostly on format string
|
|
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!
|
|
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.
|
|
* Storage::name();
* CloudManager::getStorageName();
* CloudManager::getStorageIndex();
* CloudManager::listStorages();
* CloudManager::switchStorage().
|
|
Id should be used everywhere.
|
|
It now keeps track of how many Requests are running.
To achieve that, we had to pass a callback to ConnectionManager, so each
Request has a callback paired with it. If that's one of Storage's
Requests, it has a callback, which would decrease a counter. When
Storage adds a Request, it also increases a counter and passes that
callback. Callback is called by ConnMan when Request is deleted.
isWorking() returns true if there is at least one Request running.
|
|
Also add CloudManager::testFeature(), because syncSaves() now works fine
and I don't want to break it again and again with my testing requests.
|
|
DownloadRequest and FolderDownloadRequest are using other Storage's
methods. Thus, download() and downloadFolder() could be implemented in
base Storage class.
|
|
There was a warning regarding 25 GB constant.
By the way, I'm not sure how to print uint64 (%llu is available in C99
only, and gcc produces a warning about that).
|
|
As it uses SavesSyncRequest and this request is using Storage's
upload(), download() and listDirectory(), there is no need to make
storage-dependent version of that request and so method could be
implemented in base Storage.
|
|
It actually works fine, but small Storage::savesDirectoryPath() was
added, because Dropbox's directories must start with a slash, and
OneDrive's directories must not.
Saves sync tested and it works fine with OneDrive.
|
|
Doesn't support server's requested ranges yet.
Commit also adds some PUT-related code in NetworkReadStream and
CurlRequest.
|
|
Added ErrorResponse and ErrorCallback. Each Request now has an
ErrorCallback, which should be called instead of usual callback in case
of failure.
|
|
It now actually read the "timestamps" file, loads and saves files as it
should, ignores Dropbox's "not_found" error.
|
|
It contains flags to indicate whether Request was interrupted or failed,
so dependent Requests may see that list is incomplete.
|
|
If file could be uploaded in one API call, no need to create a session
(which requires at least two calls: to start and then to finish it).
|
|
It contains not just "success" flag, but also "file" struct, so the
caller can find out some information about uploaded file - like
timestamp.
|
|
|
|
|
|
I get 'warning: ISO C++98 does not support the '%lg' ms_printf format'
warning though.
|
|
Plain char * is used instead of Common::String in DropboxStorage and
OneDriveStorage's KEY and SECRET.
|
|
Uses Storage's listDirectory() and download() methods to download
contents.
|
|
ConnectionManager now storages Request * (not generates ids for it),
Requests have control on their RequestState, RequestIdPair is now called
Response and storages Request * with some response together.
All related classes are changed to use it in more clean and
understandable way.
Request, RequestState and Response are carefully commented/documented.
|
|
Well, it takes two API calls instead of one now, but there are no
problems with expired token because of it.
This commit changes Storage::streamFile() to pass NetworkReadStream *
through callback.
|
|
Type safety first.
|
|
Can be used with Callback<T> (means it's still type safe). It's used to
pass not only Request id to user's callback, but also a value user
wanted.
void *data field is removed from RequestInfo.
|
|
(Upgrading ConnectionManager step by step.)
|