Commit graph

67 commits

Author SHA1 Message Date
John Preston
abf49e1672 Update API scheme. 2019-08-09 11:50:49 +01:00
John Preston
ff44094ded Rename AuthSession to Main::Session. 2019-07-24 13:45:24 +02:00
John Preston
567bf60644 Use getters in MTP classes. 2019-07-05 16:23:07 +02:00
John Preston
d9e93fb5cc Fix possible crash in auth session destruction. 2019-06-17 14:23:50 +02:00
John Preston
eb438e35ee Remove old download priority arguments. 2019-06-04 14:30:43 +03:00
John Preston
b2895a39ed Register streaming loaders in Storage::Downloader. 2019-06-04 14:30:43 +03:00
John Preston
cca906d383 Use ready parts from loader in streaming. 2019-06-04 14:30:43 +03:00
John Preston
e1114530ab Working code for streaming downloader. 2019-06-04 14:30:43 +03:00
John Preston
ebf2a678b1 Use a special FileLoader for streamed documents. 2019-06-04 14:30:43 +03:00
John Preston
8c0cd9b9e9 Prepare Media::Streaming::Reader to be shared. 2019-06-04 14:30:43 +03:00
John Preston
d3bf489bea Improve base::binary_guard interface. 2019-04-02 14:33:52 +04:00
John Preston
8759d637ff Use StorageFileLocation in mtpFileLoader. 2019-03-29 14:24:07 +04:00
John Preston
3f49796c43 Fix file reference updating. 2019-03-29 14:24:07 +04:00
John Preston
aa8f62da9d Support new ('modern') API file locations. 2019-03-29 14:24:07 +04:00
John Preston
fe618bd652 Use crl::time/now instead of TimeMs/getms. 2019-02-19 11:06:33 +04:00
John Preston
d208236994 Accept binary_guard in crl::guard(). 2019-02-17 15:56:07 +04:00
John Preston
a70e72f75d Application->Sandbox, Messenger->Application. 2019-01-23 12:51:58 +04:00
John Preston
805e4d01e7 Allow re-downloading failed media. 2019-01-21 10:49:44 +04:00
John Preston
314e30272b Replace SingleTimer with base::Timer. 2019-01-18 16:41:08 +04:00
John Preston
1894b8fcf7 Handle t.me/bg links with wallpapers / colors. 2019-01-18 16:41:07 +04:00
John Preston
c5a41e1f55 Divide data/data_peer and remove from PCH. 2019-01-17 12:21:29 +04:00
John Preston
3461f3dfc7 Destroy file loaders not delayed. 2018-11-26 11:33:29 +04:00
John Preston
4b5b79e415 Use final Image with different Images::Source-s. 2018-11-04 15:51:37 +04:00
John Preston
9f90d3a7fc Load maps using mtproto instead of google. 2018-10-09 19:27:18 +03:00
John Preston
d485a05935 Reorder chat settings sections. 2018-09-28 14:20:36 +03:00
John Preston
2e5a0e056c Move to std::optional. 2018-09-21 19:28:46 +03:00
John Preston
4b87363a20 Check value size before putting to cache db. 2018-09-04 22:37:22 +03:00
John Preston
55f60866cb Set correct cache tags for different file types. 2018-09-01 18:56:08 +03:00
John Preston
e2f08d4161 Write uint8 tags to Database and count stats.
Also pass rvalues to Database where copies are required anyway.
2018-09-01 18:56:08 +03:00
John Preston
2e7f4c2f21 Use Storage::Cache::Database for file caching. 2018-09-01 18:56:08 +03:00
John Preston
c913c77fef Refresh file references when sending stickers. 2018-08-20 17:26:28 +03:00
John Preston
557d363d02 Refresh file references when downloading files. 2018-08-20 17:26:28 +03:00
John Preston
839885910c Pass FileOrigin in all file downloads. 2018-08-20 17:26:28 +03:00
John Preston
ee16070abe Update API scheme to layer 86. 2018-08-20 17:26:27 +03:00
John Preston
8c2f11de7d Send correct paddings in improved TCP protocol. 2018-06-25 19:55:52 +01:00
John Preston
5ed15cd0b3 Fix EditColorBox.
Regression was introduced in bfc748cd31.

Fixes #4803.
2018-06-06 13:04:37 +03:00
John Preston
2bc60fa54f Save secure files to local storage. 2018-06-03 23:16:34 +03:00
John Preston
1392e05ab1 Move all gsl::byte helpers to base/bytes module. 2018-06-03 23:16:34 +03:00
John Preston
b2014f403e Secure files upload / download support. 2018-06-03 23:16:34 +03:00
John Preston
4a9db99082 Use application level proxy settings. 2018-05-05 21:55:37 +03:00
John Preston
0f901b3728 Update API and use WebDocument for inline bots. 2018-03-06 16:49:44 +03:00
John Preston
ea7441ae77 Use single LEGAL file with license and copyright. 2018-01-03 13:23:14 +03:00
John Preston
97c15865a5 Move some code around.
Move logs:SignalHandlers to core/crash_reports:CrashReports.
Move all pre-launch windows to core/crash_report_window module.
Move some global code to core/launcher:Launcher.
It should replace settings / platform_specific module in some way.
2017-12-12 16:47:32 +04:00
John Preston
a27ea2d631 Fix possible crash in mtpFileLoader.
If several cdn file parts hashes are received in getCdnFileHashesDone
and some middle one of them cancels the entire loader (for example
because of a file write error) a !_finished assert violation happens.
2017-12-08 17:13:13 +04:00
John Preston
001be82566 Add some more checks to file downloader. 2017-12-02 12:32:43 +04:00
John Preston
ad6ddcb507 Fix crash in selecting unsent messages.
Also add some more checks in file downloads and serialization.
2017-11-30 11:14:31 +04:00
John Preston
ffc20e4492 Divide structs into several data/ modules. 2017-11-16 07:59:04 +04:00
John Preston
25ffaaaa2d Replace t_assert() with Assert().
Also use this assertions for Expects(), Ensures() and Unexpected().
2017-08-30 19:15:42 +03:00
John Preston
f2801d4775 Fix possible crash in file download after error.
Regression was introduced in 2fa2fa41c5.

In file download failed handler we suggest to try to load the file
once again to the same location. After some changes we started to
forget filename before failed handler. That resulted in large files
loading to memory instead of hard drive.

Add a precondition in FileLoader to prevent such bugs in the future.
2017-08-30 19:15:34 +03:00
John Preston
ab35829358 Remove App::app(), App::uploader(), App::api().
Also use Auth() instead of AuthSession::Current*().
2017-08-25 14:39:18 +03:00