|
@@ -87,72 +87,72 @@ CloudPhotoClient::RemoveFacePhotosOutcomeCallable CloudPhotoClient::removeFacePh
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::ReactivatePhotosOutcome CloudPhotoClient::reactivatePhotos(const ReactivatePhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::GetQuotaOutcome CloudPhotoClient::getQuota(const GetQuotaRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return ReactivatePhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return GetQuotaOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return ReactivatePhotosOutcome(ReactivatePhotosResult(outcome.result()));
|
|
|
|
|
|
|
+ return GetQuotaOutcome(GetQuotaResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return ReactivatePhotosOutcome(outcome.error());
|
|
|
|
|
|
|
+ return GetQuotaOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::reactivatePhotosAsync(const ReactivatePhotosRequest& request, const ReactivatePhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::getQuotaAsync(const GetQuotaRequest& request, const GetQuotaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, reactivatePhotos(request), context);
|
|
|
|
|
|
|
+ handler(this, request, getQuota(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::ReactivatePhotosOutcomeCallable CloudPhotoClient::reactivatePhotosCallable(const ReactivatePhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::GetQuotaOutcomeCallable CloudPhotoClient::getQuotaCallable(const GetQuotaRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<ReactivatePhotosOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<GetQuotaOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->reactivatePhotos(request);
|
|
|
|
|
|
|
+ return this->getQuota(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::GetQuotaOutcome CloudPhotoClient::getQuota(const GetQuotaRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::ReactivatePhotosOutcome CloudPhotoClient::reactivatePhotos(const ReactivatePhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return GetQuotaOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return ReactivatePhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return GetQuotaOutcome(GetQuotaResult(outcome.result()));
|
|
|
|
|
|
|
+ return ReactivatePhotosOutcome(ReactivatePhotosResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return GetQuotaOutcome(outcome.error());
|
|
|
|
|
|
|
+ return ReactivatePhotosOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::getQuotaAsync(const GetQuotaRequest& request, const GetQuotaAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::reactivatePhotosAsync(const ReactivatePhotosRequest& request, const ReactivatePhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, getQuota(request), context);
|
|
|
|
|
|
|
+ handler(this, request, reactivatePhotos(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::GetQuotaOutcomeCallable CloudPhotoClient::getQuotaCallable(const GetQuotaRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::ReactivatePhotosOutcomeCallable CloudPhotoClient::reactivatePhotosCallable(const ReactivatePhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<GetQuotaOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<ReactivatePhotosOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->getQuota(request);
|
|
|
|
|
|
|
+ return this->reactivatePhotos(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
@@ -375,144 +375,144 @@ CloudPhotoClient::DeleteEventOutcomeCallable CloudPhotoClient::deleteEventCallab
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::ListPhotosOutcome CloudPhotoClient::listPhotos(const ListPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::RegisterTagOutcome CloudPhotoClient::registerTag(const RegisterTagRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return ListPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return RegisterTagOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return ListPhotosOutcome(ListPhotosResult(outcome.result()));
|
|
|
|
|
|
|
+ return RegisterTagOutcome(RegisterTagResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return ListPhotosOutcome(outcome.error());
|
|
|
|
|
|
|
+ return RegisterTagOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::listPhotosAsync(const ListPhotosRequest& request, const ListPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::registerTagAsync(const RegisterTagRequest& request, const RegisterTagAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, listPhotos(request), context);
|
|
|
|
|
|
|
+ handler(this, request, registerTag(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::ListPhotosOutcomeCallable CloudPhotoClient::listPhotosCallable(const ListPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::RegisterTagOutcomeCallable CloudPhotoClient::registerTagCallable(const RegisterTagRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<ListPhotosOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<RegisterTagOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->listPhotos(request);
|
|
|
|
|
|
|
+ return this->registerTag(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::RegisterTagOutcome CloudPhotoClient::registerTag(const RegisterTagRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::ListPhotosOutcome CloudPhotoClient::listPhotos(const ListPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return RegisterTagOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return ListPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return RegisterTagOutcome(RegisterTagResult(outcome.result()));
|
|
|
|
|
|
|
+ return ListPhotosOutcome(ListPhotosResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return RegisterTagOutcome(outcome.error());
|
|
|
|
|
|
|
+ return ListPhotosOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::registerTagAsync(const RegisterTagRequest& request, const RegisterTagAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::listPhotosAsync(const ListPhotosRequest& request, const ListPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, registerTag(request), context);
|
|
|
|
|
|
|
+ handler(this, request, listPhotos(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::RegisterTagOutcomeCallable CloudPhotoClient::registerTagCallable(const RegisterTagRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::ListPhotosOutcomeCallable CloudPhotoClient::listPhotosCallable(const ListPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<RegisterTagOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<ListPhotosOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->registerTag(request);
|
|
|
|
|
|
|
+ return this->listPhotos(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::ListTimeLinePhotosOutcome CloudPhotoClient::listTimeLinePhotos(const ListTimeLinePhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::FetchMomentPhotosOutcome CloudPhotoClient::fetchMomentPhotos(const FetchMomentPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return ListTimeLinePhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return FetchMomentPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return ListTimeLinePhotosOutcome(ListTimeLinePhotosResult(outcome.result()));
|
|
|
|
|
|
|
+ return FetchMomentPhotosOutcome(FetchMomentPhotosResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return ListTimeLinePhotosOutcome(outcome.error());
|
|
|
|
|
|
|
+ return FetchMomentPhotosOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::listTimeLinePhotosAsync(const ListTimeLinePhotosRequest& request, const ListTimeLinePhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::fetchMomentPhotosAsync(const FetchMomentPhotosRequest& request, const FetchMomentPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, listTimeLinePhotos(request), context);
|
|
|
|
|
|
|
+ handler(this, request, fetchMomentPhotos(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::ListTimeLinePhotosOutcomeCallable CloudPhotoClient::listTimeLinePhotosCallable(const ListTimeLinePhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::FetchMomentPhotosOutcomeCallable CloudPhotoClient::fetchMomentPhotosCallable(const FetchMomentPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<ListTimeLinePhotosOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<FetchMomentPhotosOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->listTimeLinePhotos(request);
|
|
|
|
|
|
|
+ return this->fetchMomentPhotos(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::FetchMomentPhotosOutcome CloudPhotoClient::fetchMomentPhotos(const FetchMomentPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::ListTimeLinePhotosOutcome CloudPhotoClient::listTimeLinePhotos(const ListTimeLinePhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return FetchMomentPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return ListTimeLinePhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return FetchMomentPhotosOutcome(FetchMomentPhotosResult(outcome.result()));
|
|
|
|
|
|
|
+ return ListTimeLinePhotosOutcome(ListTimeLinePhotosResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return FetchMomentPhotosOutcome(outcome.error());
|
|
|
|
|
|
|
+ return ListTimeLinePhotosOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::fetchMomentPhotosAsync(const FetchMomentPhotosRequest& request, const FetchMomentPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::listTimeLinePhotosAsync(const ListTimeLinePhotosRequest& request, const ListTimeLinePhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, fetchMomentPhotos(request), context);
|
|
|
|
|
|
|
+ handler(this, request, listTimeLinePhotos(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::FetchMomentPhotosOutcomeCallable CloudPhotoClient::fetchMomentPhotosCallable(const FetchMomentPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::ListTimeLinePhotosOutcomeCallable CloudPhotoClient::listTimeLinePhotosCallable(const ListTimeLinePhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<FetchMomentPhotosOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<ListTimeLinePhotosOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->fetchMomentPhotos(request);
|
|
|
|
|
|
|
+ return this->listTimeLinePhotos(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
@@ -555,72 +555,72 @@ CloudPhotoClient::DeletePhotosOutcomeCallable CloudPhotoClient::deletePhotosCall
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::MergeFacesOutcome CloudPhotoClient::mergeFaces(const MergeFacesRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::GetPhotosByMd5sOutcome CloudPhotoClient::getPhotosByMd5s(const GetPhotosByMd5sRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return MergeFacesOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return GetPhotosByMd5sOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return MergeFacesOutcome(MergeFacesResult(outcome.result()));
|
|
|
|
|
|
|
+ return GetPhotosByMd5sOutcome(GetPhotosByMd5sResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return MergeFacesOutcome(outcome.error());
|
|
|
|
|
|
|
+ return GetPhotosByMd5sOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::mergeFacesAsync(const MergeFacesRequest& request, const MergeFacesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::getPhotosByMd5sAsync(const GetPhotosByMd5sRequest& request, const GetPhotosByMd5sAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, mergeFaces(request), context);
|
|
|
|
|
|
|
+ handler(this, request, getPhotosByMd5s(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::MergeFacesOutcomeCallable CloudPhotoClient::mergeFacesCallable(const MergeFacesRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::GetPhotosByMd5sOutcomeCallable CloudPhotoClient::getPhotosByMd5sCallable(const GetPhotosByMd5sRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<MergeFacesOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<GetPhotosByMd5sOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->mergeFaces(request);
|
|
|
|
|
|
|
+ return this->getPhotosByMd5s(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::GetPhotosByMd5sOutcome CloudPhotoClient::getPhotosByMd5s(const GetPhotosByMd5sRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::MergeFacesOutcome CloudPhotoClient::mergeFaces(const MergeFacesRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return GetPhotosByMd5sOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return MergeFacesOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return GetPhotosByMd5sOutcome(GetPhotosByMd5sResult(outcome.result()));
|
|
|
|
|
|
|
+ return MergeFacesOutcome(MergeFacesResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return GetPhotosByMd5sOutcome(outcome.error());
|
|
|
|
|
|
|
+ return MergeFacesOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::getPhotosByMd5sAsync(const GetPhotosByMd5sRequest& request, const GetPhotosByMd5sAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::mergeFacesAsync(const MergeFacesRequest& request, const MergeFacesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, getPhotosByMd5s(request), context);
|
|
|
|
|
|
|
+ handler(this, request, mergeFaces(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::GetPhotosByMd5sOutcomeCallable CloudPhotoClient::getPhotosByMd5sCallable(const GetPhotosByMd5sRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::MergeFacesOutcomeCallable CloudPhotoClient::mergeFacesCallable(const MergeFacesRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<GetPhotosByMd5sOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<MergeFacesOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->getPhotosByMd5s(request);
|
|
|
|
|
|
|
+ return this->mergeFaces(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
@@ -699,180 +699,180 @@ CloudPhotoClient::FetchAlbumTagPhotosOutcomeCallable CloudPhotoClient::fetchAlbu
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::CreateTransactionOutcome CloudPhotoClient::createTransaction(const CreateTransactionRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::InactivatePhotosOutcome CloudPhotoClient::inactivatePhotos(const InactivatePhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return CreateTransactionOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return InactivatePhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return CreateTransactionOutcome(CreateTransactionResult(outcome.result()));
|
|
|
|
|
|
|
+ return InactivatePhotosOutcome(InactivatePhotosResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return CreateTransactionOutcome(outcome.error());
|
|
|
|
|
|
|
+ return InactivatePhotosOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::createTransactionAsync(const CreateTransactionRequest& request, const CreateTransactionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::inactivatePhotosAsync(const InactivatePhotosRequest& request, const InactivatePhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, createTransaction(request), context);
|
|
|
|
|
|
|
+ handler(this, request, inactivatePhotos(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::CreateTransactionOutcomeCallable CloudPhotoClient::createTransactionCallable(const CreateTransactionRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::InactivatePhotosOutcomeCallable CloudPhotoClient::inactivatePhotosCallable(const InactivatePhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<CreateTransactionOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<InactivatePhotosOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->createTransaction(request);
|
|
|
|
|
|
|
+ return this->inactivatePhotos(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::InactivatePhotosOutcome CloudPhotoClient::inactivatePhotos(const InactivatePhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::CreateTransactionOutcome CloudPhotoClient::createTransaction(const CreateTransactionRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return InactivatePhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return CreateTransactionOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return InactivatePhotosOutcome(InactivatePhotosResult(outcome.result()));
|
|
|
|
|
|
|
+ return CreateTransactionOutcome(CreateTransactionResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return InactivatePhotosOutcome(outcome.error());
|
|
|
|
|
|
|
+ return CreateTransactionOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::inactivatePhotosAsync(const InactivatePhotosRequest& request, const InactivatePhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::createTransactionAsync(const CreateTransactionRequest& request, const CreateTransactionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, inactivatePhotos(request), context);
|
|
|
|
|
|
|
+ handler(this, request, createTransaction(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::InactivatePhotosOutcomeCallable CloudPhotoClient::inactivatePhotosCallable(const InactivatePhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::CreateTransactionOutcomeCallable CloudPhotoClient::createTransactionCallable(const CreateTransactionRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<InactivatePhotosOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<CreateTransactionOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->inactivatePhotos(request);
|
|
|
|
|
|
|
+ return this->createTransaction(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::CreatePhotoStoreOutcome CloudPhotoClient::createPhotoStore(const CreatePhotoStoreRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::GetLibraryOutcome CloudPhotoClient::getLibrary(const GetLibraryRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return CreatePhotoStoreOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return GetLibraryOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return CreatePhotoStoreOutcome(CreatePhotoStoreResult(outcome.result()));
|
|
|
|
|
|
|
+ return GetLibraryOutcome(GetLibraryResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return CreatePhotoStoreOutcome(outcome.error());
|
|
|
|
|
|
|
+ return GetLibraryOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::createPhotoStoreAsync(const CreatePhotoStoreRequest& request, const CreatePhotoStoreAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::getLibraryAsync(const GetLibraryRequest& request, const GetLibraryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, createPhotoStore(request), context);
|
|
|
|
|
|
|
+ handler(this, request, getLibrary(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::CreatePhotoStoreOutcomeCallable CloudPhotoClient::createPhotoStoreCallable(const CreatePhotoStoreRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::GetLibraryOutcomeCallable CloudPhotoClient::getLibraryCallable(const GetLibraryRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<CreatePhotoStoreOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<GetLibraryOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->createPhotoStore(request);
|
|
|
|
|
|
|
+ return this->getLibrary(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::TagPhotoOutcome CloudPhotoClient::tagPhoto(const TagPhotoRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::CreatePhotoStoreOutcome CloudPhotoClient::createPhotoStore(const CreatePhotoStoreRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return TagPhotoOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return CreatePhotoStoreOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return TagPhotoOutcome(TagPhotoResult(outcome.result()));
|
|
|
|
|
|
|
+ return CreatePhotoStoreOutcome(CreatePhotoStoreResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return TagPhotoOutcome(outcome.error());
|
|
|
|
|
|
|
+ return CreatePhotoStoreOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::tagPhotoAsync(const TagPhotoRequest& request, const TagPhotoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::createPhotoStoreAsync(const CreatePhotoStoreRequest& request, const CreatePhotoStoreAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, tagPhoto(request), context);
|
|
|
|
|
|
|
+ handler(this, request, createPhotoStore(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::TagPhotoOutcomeCallable CloudPhotoClient::tagPhotoCallable(const TagPhotoRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::CreatePhotoStoreOutcomeCallable CloudPhotoClient::createPhotoStoreCallable(const CreatePhotoStoreRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<TagPhotoOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<CreatePhotoStoreOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->tagPhoto(request);
|
|
|
|
|
|
|
+ return this->createPhotoStore(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::GetLibraryOutcome CloudPhotoClient::getLibrary(const GetLibraryRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::TagPhotoOutcome CloudPhotoClient::tagPhoto(const TagPhotoRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return GetLibraryOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return TagPhotoOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return GetLibraryOutcome(GetLibraryResult(outcome.result()));
|
|
|
|
|
|
|
+ return TagPhotoOutcome(TagPhotoResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return GetLibraryOutcome(outcome.error());
|
|
|
|
|
|
|
+ return TagPhotoOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::getLibraryAsync(const GetLibraryRequest& request, const GetLibraryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::tagPhotoAsync(const TagPhotoRequest& request, const TagPhotoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, getLibrary(request), context);
|
|
|
|
|
|
|
+ handler(this, request, tagPhoto(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::GetLibraryOutcomeCallable CloudPhotoClient::getLibraryCallable(const GetLibraryRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::TagPhotoOutcomeCallable CloudPhotoClient::tagPhotoCallable(const TagPhotoRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<GetLibraryOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<TagPhotoOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->getLibrary(request);
|
|
|
|
|
|
|
+ return this->tagPhoto(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
@@ -915,72 +915,72 @@ CloudPhotoClient::SetQuotaOutcomeCallable CloudPhotoClient::setQuotaCallable(con
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::ListAlbumPhotosOutcome CloudPhotoClient::listAlbumPhotos(const ListAlbumPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::RemoveAlbumPhotosOutcome CloudPhotoClient::removeAlbumPhotos(const RemoveAlbumPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return ListAlbumPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return RemoveAlbumPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return ListAlbumPhotosOutcome(ListAlbumPhotosResult(outcome.result()));
|
|
|
|
|
|
|
+ return RemoveAlbumPhotosOutcome(RemoveAlbumPhotosResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return ListAlbumPhotosOutcome(outcome.error());
|
|
|
|
|
|
|
+ return RemoveAlbumPhotosOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::listAlbumPhotosAsync(const ListAlbumPhotosRequest& request, const ListAlbumPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::removeAlbumPhotosAsync(const RemoveAlbumPhotosRequest& request, const RemoveAlbumPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, listAlbumPhotos(request), context);
|
|
|
|
|
|
|
+ handler(this, request, removeAlbumPhotos(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::ListAlbumPhotosOutcomeCallable CloudPhotoClient::listAlbumPhotosCallable(const ListAlbumPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::RemoveAlbumPhotosOutcomeCallable CloudPhotoClient::removeAlbumPhotosCallable(const RemoveAlbumPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<ListAlbumPhotosOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<RemoveAlbumPhotosOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->listAlbumPhotos(request);
|
|
|
|
|
|
|
+ return this->removeAlbumPhotos(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::RemoveAlbumPhotosOutcome CloudPhotoClient::removeAlbumPhotos(const RemoveAlbumPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::ListAlbumPhotosOutcome CloudPhotoClient::listAlbumPhotos(const ListAlbumPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return RemoveAlbumPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return ListAlbumPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return RemoveAlbumPhotosOutcome(RemoveAlbumPhotosResult(outcome.result()));
|
|
|
|
|
|
|
+ return ListAlbumPhotosOutcome(ListAlbumPhotosResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return RemoveAlbumPhotosOutcome(outcome.error());
|
|
|
|
|
|
|
+ return ListAlbumPhotosOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::removeAlbumPhotosAsync(const RemoveAlbumPhotosRequest& request, const RemoveAlbumPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::listAlbumPhotosAsync(const ListAlbumPhotosRequest& request, const ListAlbumPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, removeAlbumPhotos(request), context);
|
|
|
|
|
|
|
+ handler(this, request, listAlbumPhotos(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::RemoveAlbumPhotosOutcomeCallable CloudPhotoClient::removeAlbumPhotosCallable(const RemoveAlbumPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::ListAlbumPhotosOutcomeCallable CloudPhotoClient::listAlbumPhotosCallable(const ListAlbumPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<RemoveAlbumPhotosOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<ListAlbumPhotosOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->removeAlbumPhotos(request);
|
|
|
|
|
|
|
+ return this->listAlbumPhotos(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
@@ -1203,72 +1203,72 @@ CloudPhotoClient::GetPrivateAccessUrlsOutcomeCallable CloudPhotoClient::getPriva
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::GetSimilarPhotosOutcome CloudPhotoClient::getSimilarPhotos(const GetSimilarPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::ListEventsOutcome CloudPhotoClient::listEvents(const ListEventsRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return GetSimilarPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return ListEventsOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return GetSimilarPhotosOutcome(GetSimilarPhotosResult(outcome.result()));
|
|
|
|
|
|
|
+ return ListEventsOutcome(ListEventsResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return GetSimilarPhotosOutcome(outcome.error());
|
|
|
|
|
|
|
+ return ListEventsOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::getSimilarPhotosAsync(const GetSimilarPhotosRequest& request, const GetSimilarPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::listEventsAsync(const ListEventsRequest& request, const ListEventsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, getSimilarPhotos(request), context);
|
|
|
|
|
|
|
+ handler(this, request, listEvents(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::GetSimilarPhotosOutcomeCallable CloudPhotoClient::getSimilarPhotosCallable(const GetSimilarPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::ListEventsOutcomeCallable CloudPhotoClient::listEventsCallable(const ListEventsRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<GetSimilarPhotosOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<ListEventsOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->getSimilarPhotos(request);
|
|
|
|
|
|
|
+ return this->listEvents(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::ListEventsOutcome CloudPhotoClient::listEvents(const ListEventsRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::GetSimilarPhotosOutcome CloudPhotoClient::getSimilarPhotos(const GetSimilarPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return ListEventsOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return GetSimilarPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return ListEventsOutcome(ListEventsResult(outcome.result()));
|
|
|
|
|
|
|
+ return GetSimilarPhotosOutcome(GetSimilarPhotosResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return ListEventsOutcome(outcome.error());
|
|
|
|
|
|
|
+ return GetSimilarPhotosOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::listEventsAsync(const ListEventsRequest& request, const ListEventsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::getSimilarPhotosAsync(const GetSimilarPhotosRequest& request, const GetSimilarPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, listEvents(request), context);
|
|
|
|
|
|
|
+ handler(this, request, getSimilarPhotos(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::ListEventsOutcomeCallable CloudPhotoClient::listEventsCallable(const ListEventsRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::GetSimilarPhotosOutcomeCallable CloudPhotoClient::getSimilarPhotosCallable(const GetSimilarPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<ListEventsOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<GetSimilarPhotosOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->listEvents(request);
|
|
|
|
|
|
|
+ return this->getSimilarPhotos(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
@@ -1527,72 +1527,72 @@ CloudPhotoClient::GetDownloadUrlsOutcomeCallable CloudPhotoClient::getDownloadUr
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::GetPhotosOutcome CloudPhotoClient::getPhotos(const GetPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::RegisterPhotoOutcome CloudPhotoClient::registerPhoto(const RegisterPhotoRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return GetPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return RegisterPhotoOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return GetPhotosOutcome(GetPhotosResult(outcome.result()));
|
|
|
|
|
|
|
+ return RegisterPhotoOutcome(RegisterPhotoResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return GetPhotosOutcome(outcome.error());
|
|
|
|
|
|
|
+ return RegisterPhotoOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::getPhotosAsync(const GetPhotosRequest& request, const GetPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::registerPhotoAsync(const RegisterPhotoRequest& request, const RegisterPhotoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, getPhotos(request), context);
|
|
|
|
|
|
|
+ handler(this, request, registerPhoto(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::GetPhotosOutcomeCallable CloudPhotoClient::getPhotosCallable(const GetPhotosRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::RegisterPhotoOutcomeCallable CloudPhotoClient::registerPhotoCallable(const RegisterPhotoRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<GetPhotosOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<RegisterPhotoOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->getPhotos(request);
|
|
|
|
|
|
|
+ return this->registerPhoto(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
|
return task->get_future();
|
|
return task->get_future();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::RegisterPhotoOutcome CloudPhotoClient::registerPhoto(const RegisterPhotoRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::GetPhotosOutcome CloudPhotoClient::getPhotos(const GetPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
|
|
if (!endpointOutcome.isSuccess())
|
|
if (!endpointOutcome.isSuccess())
|
|
|
- return RegisterPhotoOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
+ return GetPhotosOutcome(endpointOutcome.error());
|
|
|
|
|
|
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
|
|
|
|
|
|
|
if (outcome.isSuccess())
|
|
if (outcome.isSuccess())
|
|
|
- return RegisterPhotoOutcome(RegisterPhotoResult(outcome.result()));
|
|
|
|
|
|
|
+ return GetPhotosOutcome(GetPhotosResult(outcome.result()));
|
|
|
else
|
|
else
|
|
|
- return RegisterPhotoOutcome(outcome.error());
|
|
|
|
|
|
|
+ return GetPhotosOutcome(outcome.error());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void CloudPhotoClient::registerPhotoAsync(const RegisterPhotoRequest& request, const RegisterPhotoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
|
|
|
|
+void CloudPhotoClient::getPhotosAsync(const GetPhotosRequest& request, const GetPhotosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
|
|
{
|
|
{
|
|
|
auto fn = [this, request, handler, context]()
|
|
auto fn = [this, request, handler, context]()
|
|
|
{
|
|
{
|
|
|
- handler(this, request, registerPhoto(request), context);
|
|
|
|
|
|
|
+ handler(this, request, getPhotos(request), context);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
asyncExecute(new Runnable(fn));
|
|
asyncExecute(new Runnable(fn));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-CloudPhotoClient::RegisterPhotoOutcomeCallable CloudPhotoClient::registerPhotoCallable(const RegisterPhotoRequest &request) const
|
|
|
|
|
|
|
+CloudPhotoClient::GetPhotosOutcomeCallable CloudPhotoClient::getPhotosCallable(const GetPhotosRequest &request) const
|
|
|
{
|
|
{
|
|
|
- auto task = std::make_shared<std::packaged_task<RegisterPhotoOutcome()>>(
|
|
|
|
|
|
|
+ auto task = std::make_shared<std::packaged_task<GetPhotosOutcome()>>(
|
|
|
[this, request]()
|
|
[this, request]()
|
|
|
{
|
|
{
|
|
|
- return this->registerPhoto(request);
|
|
|
|
|
|
|
+ return this->getPhotos(request);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|