75670 Commits

Author SHA1 Message Date
Alexander Tkachev
817d831255 TESTBED: Add more Webserver tests 2016-08-24 16:07:55 +06:00
Alexander Tkachev
830c7b578c TESTBED: Add Webserver test suite
Two tests now: IP resolving and index page check.
2016-08-24 16:07:55 +06:00
Peter Bozsó
b616cc3d57 CLOUD: Fix indentation in openurl-osx.cpp 2016-08-24 16:07:55 +06:00
Alexander Tkachev
dcf9041926 TESTBED: Fix CloudTests
Now work with all available Storages.
2016-08-24 16:07:55 +06:00
Peter Bozsó
18fc113aa9 CLOUD: Add URL opening for OS X 2016-08-24 16:07:55 +06:00
Alexander Tkachev
04888cf454 TESTBED: Add CloudTests::testSavesSync() 2016-08-24 16:07:55 +06:00
Alexander Tkachev
4e27251356 TESTBED: Add CloudTests::testFolderDownloading() 2016-08-24 16:07:55 +06:00
Alexander Tkachev
7a34abe39e TESTBED: Add CloudTests::testDownloading() 2016-08-24 16:07:55 +06:00
Alexander Tkachev
6d227a437a TESTBED: Add CloudTests::testUploading() 2016-08-24 16:07:55 +06:00
Alexander Tkachev
721ee9527e TESTBED: Fix CloudTests to ask users whether to wait
Callbacks might be slow (like in SyncSaves), but they also could hang
forever, so users now are being asked whether they want to wait or to
skip the test.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
4a0a5af52e TESTBED: Add first Cloud tests
Adding tests for:
* Storage::info();
* Storage::listDirectory();
* Storage::createDirectory().
2016-08-24 16:07:55 +06:00
Alexander Tkachev
75fbecf616 GUI: Add Ctrl+V handling in EditableWidget
In SDL2 there is SDL_GetClipboardText(), so EditableWidget could support
pasting into it.

No copying yet, as there is no selecting.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
6c0f491c4f CLOUD: Add "Index of" label in server's "/files" 2016-08-24 16:07:55 +06:00
Alexander Tkachev
ded8cdf0a0 CLOUD: Add openurl-android.cpp 2016-08-24 16:07:55 +06:00
Alexander Tkachev
40dfb0b4f1 GUI: Fix Cloud-related dialogs a little
Minor mistakes which lead to build failure in some cases.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
06ccfd4b9a CLOUD: Add icons in "/files" list 2016-08-24 16:07:55 +06:00
Alexander Tkachev
626d85ea49 CLOUD: Fix module.mk for openurl-default.o
It's now added to all the backends manually.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1b56f59add GUI: Update DownloadDialog
It now has download size and speed labels.

Commit also fixes minor mistake in ConnMan.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
c431ae6d84 CLOUD: Calculate FolderDownload download speed 2016-08-24 16:07:55 +06:00
Alexander Tkachev
85adefdb86 CLOUD: Update FolderDownloadRequest::getProgress()
It now is based on downloaded size, not number of files.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
479c76bbd2 CLOUD: Fix IdDownloadRequest
Wrong value was returned in getProgress() on nullptr there.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0ca7917093 CLOUD: Update FolderDownloadRequest
It now keeps track of downloaded bytes.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ca33c0a0a8 CLOUD: Fix FolderDownloadRequest
It now sends kDownloadEndedCmd on success without waiting to be
destructed.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d863dad055 CLOUD: Fix FolderDownloadRequest::getProgress()
Now it doesn't stop on 100 % on last file and it ignores the
directories, so it doesn't "jump" suddenly as there are no directories
to skip.
2016-08-24 16:07:55 +06:00
Peter Bozsó
cdf8ab7949 GUI: Change 'OK' to 'Hide' on close button of DownloadDialog 2016-08-24 16:07:55 +06:00
Peter Bozsó
7951a2ea16 CLOUD: Rename _files to _pendingFiles in FolderDownloadRequest 2016-08-24 16:07:55 +06:00
Alexander Tkachev
d8a43cf290 CLOUD: Add openUrl() for POSIX 2016-08-24 16:07:55 +06:00
Alexander Tkachev
33ca8d485c GUI: Fix StorageWizardDialog
It now shows a MessageDialog (its message label is hidden in some
cases).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
2ae438327b GUI: Add "Open URL" button in StorageWizardDialog
It uses Networking::Browser::openUrl().
2016-08-24 16:07:55 +06:00
Alexander Tkachev
990dee3c4f CLOUD: Add Networking::Browser::openUrl() sketch
Only Windows' shellExecute() now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
dfd68306de CLOUD: Upgrade FolderDownloadRequest::getProgress()
Now NetworkReadStream, which is used in DownloadRequest, which is used
in FolderDownloadRequest, returns progress information provided by
libcurl.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e25338ec24 CLOUD: Update CurlJsonRequest
Uses dynamically allocated buffer now.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1a53dccf51 CLOUD: Update DownloadRequest
It now uses a dynamically allocated 1 MB buffer.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b4e9e35e07 CLOUD: Cleanup in Storages 2016-08-24 16:07:55 +06:00
Alexander Tkachev
0b5bd18d85 CLOUD: Update GoogleDriveStorage
It now derives from IdStorage, so lots of GoogleDrive*Request classes
are removed and replaced with generic IdStorage*Request ones.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
5cbb3e8705 CLOUD: Add Storage::uploadStreamSupported()
Box uses POST multipart/form requests for uploading. Such requests could
be sent with libcurl if we either have a file available or a buffer with
this file's contents.

SavesSyncRequest was using Storage::upload(ReadStream *), which couldn't
be implemented in BoxStorage. Thus I've added a method to test whether
such upload is supported and, if it's not, SavesSyncRequest uses the
other.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d96cdacb38 CLOUD: Add BoxUploadRequest 2016-08-24 16:07:55 +06:00
Alexander Tkachev
db72fa34d6 CLOUD: Update NetworkReadStream and CurlRequest
Now those support POST multipart/form upload.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
16ed625dfe CLOUD: Remove BoxStorage::streamFileById debug() call 2016-08-24 16:07:55 +06:00
Alexander Tkachev
19ae61dffc CLOUD: Add IdDownloadRequest and IdStreamFileRequest
Used for downloading files in Box.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
34ee1d29d5 CLOUD: Fix Storage::streamFile() 2016-08-24 16:07:55 +06:00
Alexander Tkachev
d943d7c3a8 CLOUD: Add IdCreateDirectoryRequest
Box gets createDirectoryWithParentId(), so now creating directories
works there.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
2b3caf1efa CLOUD: Add IdStorage
This is a special base class for Storages which are using ids instead of
paths in their APIs, like Box or Google Drive.

This commit makes Box derived from IdStorage.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e0a6b2135d CLOUD: Add BoxListDirectoryRequest
And used in it BoxResolveIdRequest.

TODO: make some generic ResolveIdRequest and ListDirectoryRequest for
id-based storages. It's really similar, I just had to change a few
details in GoogleDrive ListDirectory and ResolveId requests.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
eb269e137f CLOUD: Add BoxListDirectoryByIdRequest
Similarly to Google Drive, Box uses only ids of files. That means id
resolving would be slow.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
85f1ce8ece CLOUD: Add BoxTokenRefresher and BoxStorage::info()
BoxTokenRefresher does refresh if HTTP 401 is returned by the server.

To test refresher, BoxStorage::info() was added.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
0a43dad629 CLOUD: Redirect to "/files" from "/"
"/" is used to receive "?code", but when there is no such parameter
passed, it's safe to redirect user to the "/files".
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b37b392fa0 CLOUD: Add BoxStorage sketch 2016-08-24 16:07:55 +06:00
Alexander Tkachev
03f33be54c GUI: Fix Options Cloud tab widgets visibility
As it's controlled by ScrollContainer also, we have to explicitly
setVisible(true) for "always" visible widgets.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d795c77ef5 GUI: Fix DownloadDialog detection
Now it calls Launcher directly, so it updates games list on success.
2016-08-24 16:07:55 +06:00