Skip to content
36 changes: 36 additions & 0 deletions interfaces/api/service/IFrontEnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,42 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9
bool & areImageSaved) const = 0;


/// @brief Get data file contents for a specific map in a compressed buffer (ZIP format), to make a backup locally
/// @param[in] accessToken a valid Token collected by client after login to the authentication server
/// @param[in] mapUUID UUID of the map
/// @param[out] compressedZipData the data structure files of the map in a compressed buffer (ZIP format)
/// @return
/// * FrameworkReturnCode::_SUCCESS if the map data is available
/// * FrameworkReturnCode::_NOT_FOUND if mapUUID is not found on storage
/// * FrameworkReturnCode::_MAP_NO_DATA if no data is available on storage for mapUUID
/// * FrameworkReturnCode::_NO_SERVICE_AVAILABLE if a necessary service is not available
/// * FrameworkReturnCode::_AUTHENT_SERVICE_UNAVAILABLE if authentication server is unavailable
/// * FrameworkReturnCode::_AUTHENT_REQUEST_FAILURE if the request to the authentication server failed
/// * FrameworkReturnCode::_AUTHENT_INVALID_TOKEN if the authentication token is invalid
/// * FrameworkReturnCode::_AUTHENT_RESOURCE_NOT_FOUND if the requested resource was not found on the authentication server
/// * else FrameworkReturnCode::_ERROR_
[[grpc::client_receiveSize("-1")]] virtual FrameworkReturnCode backupMap(
const std::string & accessToken,
const std::string & mapUUID,
std::vector<std::byte> & compressedZipData) const = 0;

/// @brief Give data file contents for a specific map in a compressed buffer (ZIP format), to restore it on the remote server
/// @param[in] accessToken a valid Token collected by client after login to the authentication server
/// @param[in] mapUUID UUID of the map
/// @param[in] compressedZipData the data structure files of the map in a compressed buffer (ZIP format)
/// @return
/// * FrameworkReturnCode::_SUCCESS if the map restoration was successful
/// * FrameworkReturnCode::_NO_SERVICE_AVAILABLE if a necessary service is not available
/// * FrameworkReturnCode::_AUTHENT_SERVICE_UNAVAILABLE if authentication server is unavailable
/// * FrameworkReturnCode::_AUTHENT_REQUEST_FAILURE if the request to the authentication server failed
/// * FrameworkReturnCode::_AUTHENT_INVALID_TOKEN if the authentication token is invalid
/// * FrameworkReturnCode::_AUTHENT_RESOURCE_NOT_FOUND if the requested resource was not found on the authentication server
/// * else FrameworkReturnCode::_ERROR_
[[grpc::client_sendSize("-1")]] virtual FrameworkReturnCode restoreMap(
const std::string & accessToken,
const std::string & mapUUID,
const std::vector<std::byte> & compressedZipData) = 0;

/// @brief Request for a map processing giving the type of process to apply (asynchronous)
/// @param[in] accessToken a valid Token collected by client after login to the authentication server
/// @param[in] mapUUID the UUID of the map to process
Expand Down
25 changes: 25 additions & 0 deletions interfaces/api/service/IMapsManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ static std::string toString(const MapProcessingType mapProcessingType)
case MapProcessingType::STRUCTURE_FROM_MOTION:
textDefinition = "STRUCTURE_FROM_MOTION";
break;
case MapProcessingType::DENSE_MAPPING:
textDefinition = "DENSE_MAPPING";
break;
default:
textDefinition = "Unknown value";
break;
Expand Down Expand Up @@ -205,6 +208,28 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2
uint32_t & dataSize,
bool & areImageSaved) const = 0;

/// @brief Get data file contents for a specific map in a compressed buffer (ZIP format), to make a backup locally
/// @param[in] mapUUID UUID of the map
/// @param[out] compressedZipData the data structure files of the map in a compressed buffer (ZIP format)
/// @return
/// * FrameworkReturnCode::_SUCCESS if the map data is available
/// * FrameworkReturnCode::_NOT_FOUND if mapUUID is not found on storage
/// * FrameworkReturnCode::_MAP_NO_DATA if no data is available on storage for mapUUID
/// * else FrameworkReturnCode::_ERROR_
[[grpc::client_receiveSize("-1")]] virtual FrameworkReturnCode backupMap(
const std::string & mapUUID,
std::vector<std::byte> & compressedZipData) const = 0;

/// @brief Give data file contents for a specific map in a compressed buffer (ZIP format), to restore it on the remote server
/// @param[in] mapUUID UUID of the map
/// @param[in] compressedZipData the data structure files of the map in a compressed buffer (ZIP format)
/// @return
/// * FrameworkReturnCode::_SUCCESS if the map restoration was successful
/// * else FrameworkReturnCode::_ERROR_
[[grpc::client_sendSize("-1")]] virtual FrameworkReturnCode restoreMap(
const std::string & mapUUID,
const std::vector<std::byte> & compressedZipData) = 0;

/// @brief Request for a map processing giving the type of process to apply (asynchronous)
/// @param[in] mapUUID the UUID of the map to process
/// @param[in] resultMapUUID the UUID of the new map resulting from the processing
Expand Down