[core] [android] - public api configurable base endpoint (#6309)
add runloop to test
This commit is contained in:
@@ -28,6 +28,14 @@ public:
|
||||
Impl(const std::string& cachePath, uint64_t maximumCacheSize)
|
||||
: offlineDatabase(cachePath, maximumCacheSize) {
|
||||
}
|
||||
|
||||
void setAPIBaseURL(const std::string& url) {
|
||||
onlineFileSource.setAPIBaseURL(url);
|
||||
}
|
||||
|
||||
std::string getAPIBaseURL() const{
|
||||
return onlineFileSource.getAPIBaseURL();
|
||||
}
|
||||
|
||||
void setAccessToken(const std::string& accessToken) {
|
||||
onlineFileSource.setAccessToken(accessToken);
|
||||
@@ -151,6 +159,14 @@ DefaultFileSource::DefaultFileSource(const std::string& cachePath,
|
||||
|
||||
DefaultFileSource::~DefaultFileSource() = default;
|
||||
|
||||
void DefaultFileSource::setAPIBaseURL(const std::string& baseURL) {
|
||||
thread->invokeSync(&Impl::setAPIBaseURL, baseURL);
|
||||
}
|
||||
|
||||
std::string DefaultFileSource::getAPIBaseURL() const {
|
||||
return thread->invokeSync(&Impl::getAPIBaseURL);
|
||||
}
|
||||
|
||||
void DefaultFileSource::setAccessToken(const std::string& accessToken) {
|
||||
thread->invokeSync(&Impl::setAccessToken, accessToken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user