Commit d34e0fe1 authored by Paweł Wegner's avatar Paweł Wegner

AmazonS3: implemented getGeneralData.

parent 4e3f1ef7
......@@ -268,6 +268,19 @@ ICloudProvider::DeleteItemRequest::Pointer AmazonS3::deleteItemAsync(
->run();
}
ICloudProvider::GeneralDataRequest::Pointer AmazonS3::getGeneralDataAsync(
GeneralDataCallback callback) {
auto resolver = [=](Request<EitherError<GeneralData>>::Pointer r) {
GeneralData data;
data.space_total_ = data.space_used_ = 0;
data.username_ = bucket();
r->done(data);
};
return std::make_shared<Request<EitherError<GeneralData>>>(shared_from_this(),
callback, resolver)
->run();
}
ICloudProvider::GetItemDataRequest::Pointer AmazonS3::getItemDataAsync(
const std::string& id, GetItemCallback callback) {
return std::make_shared<Request<EitherError<IItem>>>(
......
......@@ -60,6 +60,7 @@ class AmazonS3 : public CloudProvider {
RenameItemCallback) override;
DeleteItemRequest::Pointer deleteItemAsync(IItem::Pointer,
DeleteItemCallback) override;
GeneralDataRequest::Pointer getGeneralDataAsync(GeneralDataCallback) override;
IHttpRequest::Pointer createDirectoryRequest(const IItem&,
const std::string& name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment