Commit Graph

29 Commits

Author SHA1 Message Date
Bruno de Oliveira Abinader
31fd2822f5 [core] Replace time_t with std::chrono::seconds
Added aliases for std::chrono typedefs (eg. 'Seconds' for
std::chrono::seconds). These aliases are used together with templated
helper functions to replace time_t with std::chrono::seconds for most
cases, in particular for 'modified' and 'expires' values in Response.
2015-11-27 17:47:02 +02:00
Konstantin Käfer
4d5c6333be [core] move retry logic to DefaultFileSource 2015-11-02 17:24:40 +01:00
Thiago Marcos P. Santos
c65f809651 [core] Move parseCacheControl() up in the class hierarchy
Avoid duplicating it on all the ports.
2015-10-26 18:37:51 +02:00
Konstantin Käfer
5173bf1bb8 [core] Make response data shared to avoid excessive copying 2015-10-26 15:54:27 +01:00
Mike Morris
62595a9b39 [core] bump libuv to 1.7.5 across all platforms
UV_ASYNC_PARAMS and UV_TIMER_PARAMS for libuv <= 0.10 compatibility

use st_mtim.tv_sec in libuv > 0.10.x
2015-10-14 11:36:28 -04:00
John Firebaugh
686c967c8e [ios] [android] Use Response::NotFound in other HTTP implementations too 2015-09-29 18:20:23 -07:00
Leith Bade
9e96e4e94b Restore libcurl HTTP on Android 2015-09-23 11:09:25 -05:00
Leith Bade
0cbe7e07f5 Use OkHTTP to implement HTTPContext on Android.
Closes #823
2015-08-11 11:59:08 +10:00
Konstantin Käfer
daaa643bbf support cURL versions older than 7.21.6
prior to cURL 7.21.6, CURLOPT_ACCEPT_ENCODING was called CURLOPT_ENCODING
2015-08-04 14:08:20 +02:00
Konstantin Käfer
78ec33320f don't use certain STL functions
some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
2015-08-04 14:08:19 +02:00
Bruno de Oliveira Abinader
0cc69b368d s/HTTPContext/HTTPContextBase/ 2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
e42a903bba Replaced 'override' with 'final' for non-public interfaces 2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
590d9ab95c Created HTTPRequestBase as base for HTTP requests
- Added HTTPRequestBase (inherits from RequestBase)
- retry() is now a pure virtual in HTTPRequestBase
- Moved cancelled bool to HTTPRequestBase
- HTTPContext now handles only HTTPRequestBase*
- Renamed HTTPNSURLRequest, HTTPCURLRequest
2015-07-28 19:27:13 +03:00
Bruno de Oliveira Abinader
785b34df2e Moved ResponseStatus to its own header 2015-07-28 19:27:13 +03:00
Thiago Marcos P. Santos
00308be140 Make one arg ctors explicit 2015-07-11 12:42:45 +03:00
Konstantin Käfer
f4707f72e0 Replace mbgl::util::make_unique<> with std::make_unique<> 2015-05-26 17:57:38 +02:00
John Firebaugh
5013be138e Fix CURL handle leak (fixes #1394) 2015-05-01 18:48:07 -04:00
John Firebaugh
481fa0e69f Restructure *Request and Context
The previous implementation, based on thread-local storage, did not
ensure that the context was destructed before the FileSource run loop.
This resulted in implementations attempting to uv_close handles for a
loop that had already been destroyed.

This change also fixes #1262.
2015-04-28 19:26:35 -04:00
John Firebaugh
8e5fa341eb Remove RequestBase::start
Requests are always started immediately upon construction.

While here, use typed pointers, not void*.
2015-04-28 09:16:26 -04:00
John Firebaugh
cdd8f3ac32 Separate RequestBase from DefaultFileSource internals
SharedRequestBase was trying to do two different jobs: be a base class
for Asset/HttpRequest and track internal state for DefaultFileSource.

Now we have RequestBase for the former, and DefaultFileRequest for the
latter.
2015-04-28 09:16:26 -04:00
John Firebaugh
f4adef1889 pointer ⇢ reference 2015-04-28 09:16:25 -04:00
Konstantin Käfer
452d12e6e6 make implementation files private headers 2015-04-13 18:28:18 +02:00
Konstantin Käfer
16849a341b hide Thread<> and separate the Implementation object 2015-04-13 17:57:45 +02:00
Konstantin Käfer
4c7132337f convert DefaultFileSource to use util::Thread<> 2015-04-10 22:37:27 +02:00
John Firebaugh
9331acf8e6 Add typedefs for std::chrono::steady_clock types 2015-04-02 12:28:12 +02:00
Konstantin Käfer
b29bce0936 add ca bundle loading back to CURL 2015-02-17 11:42:47 -08:00
Konstantin Käfer
29baacf3a5 refactor makefile 2015-02-04 10:49:09 +01:00
Konstantin Käfer
92a7f73bbe fixes for linux 2015-02-04 10:49:06 +01:00
Konstantin Käfer
b9bf66e67e rewrite storage layer to be independent of the Map's event loop 2015-02-04 10:46:37 +01:00