Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | [core] Add client defined network status | Thiago Marcos P. Santos | 2016-03-08 | 1 | -0/+22 | |
| | | | | | | | | This API will let the client force a network status. If set to Offline, we won't make network requests. When set make to Online, it will trigger the pending requests and try to fetch tiles from the network. | |||||
* | [core] Always store tiles without ratio support with ratio = 1 | John Firebaugh | 2016-02-10 | 1 | -1/+2 | |
| | ||||||
* | [core] Throttle the number of concurrent requests to 20 | John Firebaugh | 2016-02-10 | 1 | -0/+1 | |
| | ||||||
* | Add binary for smoke-testing offline downloads | John Firebaugh | 2016-02-10 | 1 | -0/+22 | |
| | ||||||
* | [all] Don't interpret 404s on non-tile resources as "no content" | John Firebaugh | 2016-02-10 | 1 | -0/+1 | |
| | ||||||
* | [core] Reimplement existing caching within an offline-capable database schema | John Firebaugh | 2016-02-10 | 1 | -44/+0 | |
| | ||||||
* | [core] Change TileData pixelRatio to an integer | John Firebaugh | 2016-01-29 | 1 | -1/+1 | |
| | ||||||
* | [core] Rationalize Resource initialization | John Firebaugh | 2016-01-29 | 1 | -0/+82 | |
| | ||||||
* | [core] Include prior values of caching headers in Resource | John Firebaugh | 2016-01-22 | 3 | -11/+9 | |
| | | | | This allows the FileSource interface itself to support revalidation. We could (and probably should) now rewrite HTTPContextBase implementations as FileSource implementations. | |||||
* | [core] Use better types for modified / expires / etag | John Firebaugh | 2016-01-21 | 2 | -8/+13 | |
| | ||||||
* | [core] Eliminate Response::stale and inline Response::isExpired() | John Firebaugh | 2016-01-21 | 1 | -6/+0 | |
| | | | | Response::isExpired() had subtle and potentially confusing behavior around Seconds::zero(). It's best to inline it and comment why. | |||||
* | [core] Eliminate RequestBase | John Firebaugh | 2016-01-21 | 3 | -40/+17 | |
| | | | | HTTPRequestBase can now itself be the base class. | |||||
* | [core] Support multiple paths in SQLiteCache::getShared() | Konstantin Käfer | 2016-01-15 | 1 | -1/+0 | |
| | | | | If you use many different caches, expired weak_ptrs will pile up in the unordered_map, but that is an edge case, and you probably shouldn't do that anyway. | |||||
* | [core] move SharedSQLiteCache::get to SQLiteCache::getShared | Konstantin Käfer | 2016-01-15 | 1 | -9/+2 | |
| | ||||||
* | [core] Let SQLiteCache decide when store or refresh responses | John Firebaugh | 2016-01-14 | 1 | -2/+1 | |
| | ||||||
* | [core] Add an explicit "not modified" indicator to Response | John Firebaugh | 2016-01-14 | 1 | -0/+1 | |
| | ||||||
* | [core] std::shared_ptr<const Response> ⇢ const Response& | John Firebaugh | 2016-01-14 | 1 | -1/+1 | |
| | ||||||
* | [core] Eliminate FileCache interface | John Firebaugh | 2016-01-14 | 2 | -7/+15 | |
| | | | | There is only one implementation and we're unlikely to add more. | |||||
* | [core] Simplify asset:// implementation | John Firebaugh | 2016-01-13 | 2 | -20/+26 | |
| | | | | | | | | * Move asset:// URL handling to DefaultFileSource. * AssetFileSource implements FileSource interface and follows familiar implementation patterns. * Move default implementation to platform/default, zip implementation to platform/android. * Don't bother with modified / expires / etag -- assets are not cached so it doesn't matter. * Don't bother with interleaving individual IO calls on the implementation thread. That adds a lot of complexity for very little benefit. | |||||
* | [core] Privatize SQLiteCache | John Firebaugh | 2016-01-08 | 1 | -0/+44 | |
| | ||||||
* | [core] Remove `Resource` dependency from low-level classes | John Firebaugh | 2015-12-23 | 4 | -8/+8 | |
| | | | | These classes should not be coupled to domain-specific resource types. | |||||
* | [core] Move OnlineFileSource to platform | John Firebaugh | 2015-12-22 | 3 | -522/+0 | |
| | | | | Preparation for OfflineFileSource which depends on SQLite | |||||
* | [core] Prepare for OfflineFileSource | John Firebaugh | 2015-12-21 | 3 | -434/+501 | |
| | | | | | * Rename existing DefaultFileSource to OnlineFileSource * Restore a DefaultFileSource that's a passthrough to OnlineFileSource | |||||
* | [core] Merge default_file_source_impl.hpp into default_file_source.cpp | John Firebaugh | 2015-12-18 | 2 | -116/+102 | |
| | | | | After previous refactors, no other files include default_file_source_imp.hpp. | |||||
* | [core] add std::move to constructors | Konstantin Käfer | 2015-12-03 | 1 | -1/+2 | |
| | ||||||
* | [core] add namespace comment to closing brace | Konstantin Käfer | 2015-12-03 | 4 | -4/+4 | |
| | ||||||
* | [core] Introduce Timer abstraction | Thiago Marcos P. Santos | 2015-12-01 | 2 | -5/+4 | |
| | ||||||
* | [core] Removed dependency on uv_loop from the file source | Thiago Marcos P. Santos | 2015-12-01 | 5 | -24/+18 | |
| | ||||||
* | [core] Abstract main loop inside RunLoop class | Thiago Marcos P. Santos | 2015-12-01 | 1 | -1/+1 | |
| | ||||||
* | [core] Replace time_t with std::chrono::seconds | Bruno de Oliveira Abinader | 2015-11-27 | 5 | -28/+23 | |
| | | | | | | | 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. | |||||
* | [core] more robust max-age parsing | Konstantin Käfer | 2015-11-20 | 1 | -5/+5 | |
| | ||||||
* | [core] Use std::unique_ptr for FileSource request | John Firebaugh | 2015-11-16 | 5 | -173/+69 | |
| | ||||||
* | [core] Do not pass uv_loop_t around | Thiago Marcos P. Santos | 2015-11-16 | 1 | -4/+2 | |
| | | | | This should be abstracted by util::RunLoop | |||||
* | [core] Fixed bit-shifting error in exponential backoff | Minh Nguyễn | 2015-11-12 | 1 | -2/+2 | |
| | | | | This change fixes a bug introduced in 4d5c6333be52aae4a9c72f4b01941e16ead503f4 for #2727. 1 << 32 would exceed the size of int64_t. The static analyzer reported undefined behavior here because std::min() might or might not return 32. | |||||
* | [core] Added missing virtual destructor to HTTPContextBase | Thiago Marcos P. Santos | 2015-11-05 | 1 | -0/+1 | |
| | ||||||
* | [core] Make DefaultFileSource react to all NetworkStatus changes | Konstantin Käfer | 2015-11-02 | 2 | -1/+30 | |
| | ||||||
* | [core] move retry logic to DefaultFileSource | Konstantin Käfer | 2015-11-02 | 7 | -191/+257 | |
| | ||||||
* | [core] Move parseCacheControl() up in the class hierarchy | Thiago Marcos P. Santos | 2015-10-26 | 2 | -0/+24 | |
| | | | | Avoid duplicating it on all the ports. | |||||
* | [core] Make response data shared to avoid excessive copying | Konstantin Käfer | 2015-10-26 | 1 | -1/+0 | |
| | ||||||
* | [core] do not use std::atomic_* with shared_ptrs | Konstantin Käfer | 2015-10-26 | 1 | -26/+25 | |
| | | | | It's not implemented in GCC 4.9.2's stdlib (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57250). Instead, we're now always using a mutex to protect access; we previously created a mutex only on cancelation, but since we're always canceling now, it makes sense to allocate it right away. | |||||
* | [core] set a timer and auto-refresh requests when they expire | Konstantin Käfer | 2015-10-26 | 2 | -3/+33 | |
| | | | | When we get a request with an explicit expiration time, we're now starting a timer, and will trigger a refresh once the data expires. This gives requesters a chance to update their data. | |||||
* | [core] add support for stale responses | Konstantin Käfer | 2015-10-26 | 4 | -23/+70 | |
| | | | | We're now returning stale responses from cache. Those responses will have the `stale` flag set to true. Currently, all requesters in the core code discard stale responses, and cancel the request immediately after they got a non-stale response. | |||||
* | [core] use RAII-style lifetime tracking of Request objects | Konstantin Käfer | 2015-10-26 | 2 | -0/+38 | |
| | ||||||
* | [core] all requests have to be canceled explicitly now | Konstantin Käfer | 2015-10-26 | 2 | -5/+11 | |
| | | | | By not automatically destroying Request objects after the result has been delivered, we are making sure that we can potentially fire the callback multiple times without adverse effects. This means that you have to hold on to the result of fs->request(), can explicitly cancel it if you don't want to be notified of data changes anymore. Not doing so will monitor the request indefinitely and will prevent the app from exiting. | |||||
* | Support v8 sprite, glyph, and style mapbox:// urls | Lucas Wojciechowski | 2015-08-21 | 1 | -0/+5 | |
| | ||||||
* | s/AssetContext/AssetContextBase/ | Bruno de Oliveira Abinader | 2015-07-28 | 3 | -11/+11 | |
| | ||||||
* | s/HTTPContext/HTTPContextBase/ | Bruno de Oliveira Abinader | 2015-07-28 | 4 | -18/+18 | |
| | ||||||
* | Created HTTPRequestBase as base for HTTP requests | Bruno de Oliveira Abinader | 2015-07-28 | 4 | -11/+29 | |
| | | | | | | | | - 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 | |||||
* | Moved ResponseStatus to its own header | Bruno de Oliveira Abinader | 2015-07-28 | 1 | -0/+36 | |
| | ||||||
* | Do not force uv_loop_t as the first parameter for a threaded object ctor | Thiago Marcos P. Santos | 2015-07-06 | 2 | -7/+5 | |
| |