Mercurial > hg > orthanc
diff OrthancServer/ServerIndex.h @ 212:f276b175dcaf
delete resources
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Nov 2012 10:13:49 +0100 |
parents | 4453a010d0db |
children | bb8c260c0092 |
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.h Thu Nov 29 09:56:46 2012 +0100 +++ b/OrthancServer/ServerIndex.h Thu Nov 29 10:13:49 2012 +0100 @@ -62,14 +62,6 @@ void MainDicomTagsToJson(Json::Value& result, int64_t resourceId); - bool DeleteInternal(Json::Value& target, - const std::string& uuid, - ResourceType expectedType); - - bool LookupResource(Json::Value& result, - const std::string& publicId, - ResourceType expectedType); - SeriesStatus GetSeriesStatus(int id); public: @@ -95,31 +87,9 @@ uint64_t GetTotalUncompressedSize(); - bool GetInstance(Json::Value& result, - const std::string& instanceUuid) - { - return LookupResource(result, instanceUuid, ResourceType_Instance); - } - - bool GetSeries(Json::Value& result, - const std::string& seriesUuid) - { - return LookupResource(result, seriesUuid, ResourceType_Series); - } - - - bool GetStudy(Json::Value& result, - const std::string& studyUuid) - { - return LookupResource(result, studyUuid, ResourceType_Study); - } - - - bool GetPatient(Json::Value& result, - const std::string& patientUuid) - { - return LookupResource(result, patientUuid, ResourceType_Patient); - } + bool LookupResource(Json::Value& result, + const std::string& publicId, + ResourceType expectedType); bool GetFile(std::string& fileUuid, CompressionType& compressionType, @@ -129,29 +99,9 @@ void GetAllUuids(Json::Value& target, ResourceType resourceType); - bool DeletePatient(Json::Value& target, - const std::string& patientUuid) - { - return DeleteInternal(target, patientUuid, ResourceType_Patient); - } - - bool DeleteStudy(Json::Value& target, - const std::string& studyUuid) - { - return DeleteInternal(target, studyUuid, ResourceType_Study); - } - - bool DeleteSeries(Json::Value& target, - const std::string& seriesUuid) - { - return DeleteInternal(target, seriesUuid, ResourceType_Series); - } - - bool DeleteInstance(Json::Value& target, - const std::string& instanceUuid) - { - return DeleteInternal(target, instanceUuid, ResourceType_Instance); - } + bool DeleteResource(Json::Value& target, + const std::string& uuid, + ResourceType expectedType); bool GetChanges(Json::Value& target, int64_t since,