[core] Promote DefaultFileSource::put to general use.
This commit is contained in:
@@ -160,10 +160,20 @@ public:
|
||||
* expired while the file source was paused.
|
||||
*/
|
||||
void resume();
|
||||
|
||||
/*
|
||||
* Insert the provided resource into the ambient cache
|
||||
*
|
||||
* Consumers of the resource will expect the uncompressed version; the
|
||||
* OfflineDatabase will determine whether to compress the data on disk.
|
||||
* This call is asynchronous: the data may not be immediately available
|
||||
* for in-progress requests, although subsequent requests should have
|
||||
* access to the cached data.
|
||||
*/
|
||||
void put(const Resource&, const Response&);
|
||||
|
||||
// For testing only.
|
||||
void setOnlineStatus(bool);
|
||||
void put(const Resource&, const Response&);
|
||||
|
||||
class Impl;
|
||||
|
||||
|
||||
@@ -302,6 +302,10 @@ void DefaultFileSource::pause() {
|
||||
void DefaultFileSource::resume() {
|
||||
impl->resume();
|
||||
}
|
||||
|
||||
void DefaultFileSource::put(const Resource& resource, const Response& response) {
|
||||
impl->actor().invoke(&Impl::put, resource, response);
|
||||
}
|
||||
|
||||
// For testing only:
|
||||
|
||||
@@ -309,8 +313,4 @@ void DefaultFileSource::setOnlineStatus(const bool status) {
|
||||
impl->actor().invoke(&Impl::setOnlineStatus, status);
|
||||
}
|
||||
|
||||
void DefaultFileSource::put(const Resource& resource, const Response& response) {
|
||||
impl->actor().invoke(&Impl::put, resource, response);
|
||||
}
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user