From 84bc40377d252c054b5d5407094831fd6cfdaaf1 Mon Sep 17 00:00:00 2001 From: ccutullic Date: Fri, 24 Apr 2026 11:17:37 +0200 Subject: [PATCH 1/7] feat (interface): add methods to the IFrontEnd and IMapsManager interfaces to handle map backup and restore functionality --- interfaces/api/service/IFrontEnd.h | 60 +++++++++++++++++++++++++++ interfaces/api/service/IMapsManager.h | 46 ++++++++++++++++++++ 2 files changed, 106 insertions(+) diff --git a/interfaces/api/service/IFrontEnd.h b/interfaces/api/service/IFrontEnd.h index 123f51e3..76096b84 100644 --- a/interfaces/api/service/IFrontEnd.h +++ b/interfaces/api/service/IFrontEnd.h @@ -399,6 +399,66 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 bool & areImageSaved) const = 0; + /// @brief Get json/binary data file contents for a specific map to make a backup + /// @param[in] accessToken a valid Token collected by client after login to the authentication server + /// @param[in] mapUUID UUID of the map + /// @param[out] map_information the map_information.json file content + /// @param[out] cameraParameters the cameraParameters.bin file content + /// @param[out] coordinate the coordinate.bin file content + /// @param[out] covisibility_graph the covisibility_graph.bin file content + /// @param[out] identification the identification.bin file content + /// @param[out] keyframes the keyframes.bin file content + /// @param[out] pointcloud the pointcloud.bin file content + /// @return + /// * FrameworkReturnCode::_SUCCESS if the map data is available + /// * FrameworkReturnCode::_UNKNOWN_MAP_UUID if mapUUID is unkown + /// * 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, + char *map_information, + char *cameraParameters, + char *coordinate, + char *covisibility_graph, + char *identification, + char *keyframes, + char *pointcloud) const = 0; + + /// @brief Give json/binary data file contents for a specific map to restore it + /// @param[in] accessToken a valid Token collected by client after login to the authentication server + /// @param[in] mapUUID UUID of the map + /// @param[in] map_information the map_information.json file content + /// @param[in] cameraParameters the cameraParameters.bin file content + /// @param[in] coordinate the coordinate.bin file content + /// @param[in] covisibility_graph the covisibility_graph.bin file content + /// @param[in] identification the identification.bin file content + /// @param[in] keyframes the keyframes.bin file content + /// @param[in] pointcloud the pointcloud.bin file content + /// @return + /// * FrameworkReturnCode::_SUCCESS if the map restoration was successful + /// * FrameworkReturnCode::_UNKNOWN_MAP_UUID if mapUUID is unkown + /// * 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 char *map_information, + const char *cameraParameters, + const char *coordinate, + const char *covisibility_graph, + const char *identification, + const char *keyframes, + const char *pointcloud) = 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 diff --git a/interfaces/api/service/IMapsManager.h b/interfaces/api/service/IMapsManager.h index e7819052..5eb645cb 100644 --- a/interfaces/api/service/IMapsManager.h +++ b/interfaces/api/service/IMapsManager.h @@ -205,6 +205,52 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2 uint32_t & dataSize, bool & areImageSaved) const = 0; + /// @brief Get json/binary data file contents for a specific map to make a backup + /// @param[in] mapUUID UUID of the map + /// @param[out] map_information the map_information.json file content + /// @param[out] cameraParameters the cameraParameters.bin file content + /// @param[out] coordinate the coordinate.bin file content + /// @param[out] covisibility_graph the covisibility_graph.bin file content + /// @param[out] identification the identification.bin file content + /// @param[out] keyframes the keyframes.bin file content + /// @param[out] pointcloud the pointcloud.bin file content + /// @return + /// * FrameworkReturnCode::_SUCCESS if the map data is available + /// * FrameworkReturnCode::_UNKNOWN_MAP_UUID if mapUUID is unkown + /// * else FrameworkReturnCode::_ERROR_ + [[grpc::client_receiveSize("-1")]] virtual FrameworkReturnCode backupMap( + const std::string & mapUUID, + char *map_information, + char *cameraParameters, + char *coordinate, + char *covisibility_graph, + char *identification, + char *keyframes, + char *pointcloud) const = 0; + + /// @brief Give json/binary data file contents for a specific map to restore it + /// @param[in] mapUUID UUID of the map + /// @param[in] map_information the map_information.json file content + /// @param[in] cameraParameters the cameraParameters.bin file content + /// @param[in] coordinate the coordinate.bin file content + /// @param[in] covisibility_graph the covisibility_graph.bin file content + /// @param[in] identification the identification.bin file content + /// @param[in] keyframes the keyframes.bin file content + /// @param[in] pointcloud the pointcloud.bin file content + /// @return + /// * FrameworkReturnCode::_SUCCESS if the map restoration was successful + /// * FrameworkReturnCode::_UNKNOWN_MAP_UUID if mapUUID is unkown + /// * else FrameworkReturnCode::_ERROR_ + [[grpc::client_sendSize("-1")]] virtual FrameworkReturnCode restoreMap( + const std::string & mapUUID, + const char *map_information, + const char *cameraParameters, + const char *coordinate, + const char *covisibility_graph, + const char *identification, + const char *keyframes, + const char *pointcloud) = 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 From 5da80ccaa6bee877a1d4348876af72a57e02b21e Mon Sep 17 00:00:00 2001 From: ccutullic Date: Fri, 24 Apr 2026 12:26:06 +0200 Subject: [PATCH 2/7] feat (interface): update comments for backup/restore methods --- interfaces/api/service/IFrontEnd.h | 4 ++-- interfaces/api/service/IMapsManager.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interfaces/api/service/IFrontEnd.h b/interfaces/api/service/IFrontEnd.h index 76096b84..89212d50 100644 --- a/interfaces/api/service/IFrontEnd.h +++ b/interfaces/api/service/IFrontEnd.h @@ -411,7 +411,8 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 /// @param[out] pointcloud the pointcloud.bin file content /// @return /// * FrameworkReturnCode::_SUCCESS if the map data is available - /// * FrameworkReturnCode::_UNKNOWN_MAP_UUID if mapUUID is unkown + /// * 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 @@ -441,7 +442,6 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 /// @param[in] pointcloud the pointcloud.bin file content /// @return /// * FrameworkReturnCode::_SUCCESS if the map restoration was successful - /// * FrameworkReturnCode::_UNKNOWN_MAP_UUID if mapUUID is unkown /// * 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 diff --git a/interfaces/api/service/IMapsManager.h b/interfaces/api/service/IMapsManager.h index 5eb645cb..cbe874f4 100644 --- a/interfaces/api/service/IMapsManager.h +++ b/interfaces/api/service/IMapsManager.h @@ -216,7 +216,8 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2 /// @param[out] pointcloud the pointcloud.bin file content /// @return /// * FrameworkReturnCode::_SUCCESS if the map data is available - /// * FrameworkReturnCode::_UNKNOWN_MAP_UUID if mapUUID is unkown + /// * 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, @@ -239,7 +240,6 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2 /// @param[in] pointcloud the pointcloud.bin file content /// @return /// * FrameworkReturnCode::_SUCCESS if the map restoration was successful - /// * FrameworkReturnCode::_UNKNOWN_MAP_UUID if mapUUID is unkown /// * else FrameworkReturnCode::_ERROR_ [[grpc::client_sendSize("-1")]] virtual FrameworkReturnCode restoreMap( const std::string & mapUUID, From f2de737a7d7b27ea8e0f2c529a6ced812203d202 Mon Sep 17 00:00:00 2001 From: ccutullic Date: Fri, 24 Apr 2026 15:20:11 +0200 Subject: [PATCH 3/7] feat (interface): in backup/restore map methods, change type of binary data from "char *" to "vector" --- interfaces/api/service/IFrontEnd.h | 28 +++++++++++------------ interfaces/api/service/IMapsManager.h | 32 +++++++++++++-------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/interfaces/api/service/IFrontEnd.h b/interfaces/api/service/IFrontEnd.h index 89212d50..9e972349 100644 --- a/interfaces/api/service/IFrontEnd.h +++ b/interfaces/api/service/IFrontEnd.h @@ -422,13 +422,13 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 [[grpc::client_receiveSize("-1")]] virtual FrameworkReturnCode backupMap( const std::string & accessToken, const std::string & mapUUID, - char *map_information, - char *cameraParameters, - char *coordinate, - char *covisibility_graph, - char *identification, - char *keyframes, - char *pointcloud) const = 0; + std::vector map_information, + std::vector cameraParameters, + std::vector coordinate, + std::vector covisibility_graph, + std::vector identification, + std::vector keyframes, + std::vector pointcloud) const = 0; /// @brief Give json/binary data file contents for a specific map to restore it /// @param[in] accessToken a valid Token collected by client after login to the authentication server @@ -451,13 +451,13 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 [[grpc::client_sendSize("-1")]] virtual FrameworkReturnCode restoreMap( const std::string & accessToken, const std::string & mapUUID, - const char *map_information, - const char *cameraParameters, - const char *coordinate, - const char *covisibility_graph, - const char *identification, - const char *keyframes, - const char *pointcloud) = 0; + const std::vector map_information, + const std::vector cameraParameters, + const std::vector coordinate, + const std::vector covisibility_graph, + const std::vector identification, + const std::vector keyframes, + const std::vector pointcloud) = 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 diff --git a/interfaces/api/service/IMapsManager.h b/interfaces/api/service/IMapsManager.h index cbe874f4..953ae91d 100644 --- a/interfaces/api/service/IMapsManager.h +++ b/interfaces/api/service/IMapsManager.h @@ -220,14 +220,14 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2 /// * 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, - char *map_information, - char *cameraParameters, - char *coordinate, - char *covisibility_graph, - char *identification, - char *keyframes, - char *pointcloud) const = 0; + const std::string & mapUUID, + std::vector map_information, + std::vector cameraParameters, + std::vector coordinate, + std::vector covisibility_graph, + std::vector identification, + std::vector keyframes, + std::vector pointcloud) const = 0; /// @brief Give json/binary data file contents for a specific map to restore it /// @param[in] mapUUID UUID of the map @@ -242,14 +242,14 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2 /// * FrameworkReturnCode::_SUCCESS if the map restoration was successful /// * else FrameworkReturnCode::_ERROR_ [[grpc::client_sendSize("-1")]] virtual FrameworkReturnCode restoreMap( - const std::string & mapUUID, - const char *map_information, - const char *cameraParameters, - const char *coordinate, - const char *covisibility_graph, - const char *identification, - const char *keyframes, - const char *pointcloud) = 0; + const std::string & mapUUID, + const std::vector map_information, + const std::vector cameraParameters, + const std::vector coordinate, + const std::vector covisibility_graph, + const std::vector identification, + const std::vector keyframes, + const std::vector pointcloud) = 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 From de51d1be8ac6dd469075318cac344c3095ff4c5d Mon Sep 17 00:00:00 2001 From: ccutullic Date: Fri, 24 Apr 2026 20:30:54 +0200 Subject: [PATCH 4/7] feat (interface): use reference parameters for backup/restore methods --- interfaces/api/service/IFrontEnd.h | 28 +++++++++++++-------------- interfaces/api/service/IMapsManager.h | 28 +++++++++++++-------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/interfaces/api/service/IFrontEnd.h b/interfaces/api/service/IFrontEnd.h index 9e972349..289a5497 100644 --- a/interfaces/api/service/IFrontEnd.h +++ b/interfaces/api/service/IFrontEnd.h @@ -422,13 +422,13 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 [[grpc::client_receiveSize("-1")]] virtual FrameworkReturnCode backupMap( const std::string & accessToken, const std::string & mapUUID, - std::vector map_information, - std::vector cameraParameters, - std::vector coordinate, - std::vector covisibility_graph, - std::vector identification, - std::vector keyframes, - std::vector pointcloud) const = 0; + std::vector & map_information, + std::vector & cameraParameters, + std::vector & coordinate, + std::vector & covisibility_graph, + std::vector & identification, + std::vector & keyframes, + std::vector & pointcloud) const = 0; /// @brief Give json/binary data file contents for a specific map to restore it /// @param[in] accessToken a valid Token collected by client after login to the authentication server @@ -451,13 +451,13 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 [[grpc::client_sendSize("-1")]] virtual FrameworkReturnCode restoreMap( const std::string & accessToken, const std::string & mapUUID, - const std::vector map_information, - const std::vector cameraParameters, - const std::vector coordinate, - const std::vector covisibility_graph, - const std::vector identification, - const std::vector keyframes, - const std::vector pointcloud) = 0; + const std::vector & map_information, + const std::vector & cameraParameters, + const std::vector & coordinate, + const std::vector & covisibility_graph, + const std::vector & identification, + const std::vector & keyframes, + const std::vector & pointcloud) = 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 diff --git a/interfaces/api/service/IMapsManager.h b/interfaces/api/service/IMapsManager.h index 953ae91d..99c61604 100644 --- a/interfaces/api/service/IMapsManager.h +++ b/interfaces/api/service/IMapsManager.h @@ -221,13 +221,13 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2 /// * else FrameworkReturnCode::_ERROR_ [[grpc::client_receiveSize("-1")]] virtual FrameworkReturnCode backupMap( const std::string & mapUUID, - std::vector map_information, - std::vector cameraParameters, - std::vector coordinate, - std::vector covisibility_graph, - std::vector identification, - std::vector keyframes, - std::vector pointcloud) const = 0; + std::vector & map_information, + std::vector & cameraParameters, + std::vector & coordinate, + std::vector & covisibility_graph, + std::vector & identification, + std::vector & keyframes, + std::vector & pointcloud) const = 0; /// @brief Give json/binary data file contents for a specific map to restore it /// @param[in] mapUUID UUID of the map @@ -243,13 +243,13 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2 /// * else FrameworkReturnCode::_ERROR_ [[grpc::client_sendSize("-1")]] virtual FrameworkReturnCode restoreMap( const std::string & mapUUID, - const std::vector map_information, - const std::vector cameraParameters, - const std::vector coordinate, - const std::vector covisibility_graph, - const std::vector identification, - const std::vector keyframes, - const std::vector pointcloud) = 0; + const std::vector & map_information, + const std::vector & cameraParameters, + const std::vector & coordinate, + const std::vector & covisibility_graph, + const std::vector & identification, + const std::vector & keyframes, + const std::vector & pointcloud) = 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 From e65fb89f878a682b5185ad854c9c50222083874a Mon Sep 17 00:00:00 2001 From: ccutullic Date: Thu, 7 May 2026 15:36:37 +0200 Subject: [PATCH 5/7] feat (interface): refactor backup/restore map methods to use a compressed data vector as parameter --- interfaces/api/service/IFrontEnd.h | 38 +++++---------------------- interfaces/api/service/IMapsManager.h | 38 +++++---------------------- 2 files changed, 14 insertions(+), 62 deletions(-) diff --git a/interfaces/api/service/IFrontEnd.h b/interfaces/api/service/IFrontEnd.h index 289a5497..e2498441 100644 --- a/interfaces/api/service/IFrontEnd.h +++ b/interfaces/api/service/IFrontEnd.h @@ -399,16 +399,10 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 bool & areImageSaved) const = 0; - /// @brief Get json/binary data file contents for a specific map to make a backup + /// @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] map_information the map_information.json file content - /// @param[out] cameraParameters the cameraParameters.bin file content - /// @param[out] coordinate the coordinate.bin file content - /// @param[out] covisibility_graph the covisibility_graph.bin file content - /// @param[out] identification the identification.bin file content - /// @param[out] keyframes the keyframes.bin file content - /// @param[out] pointcloud the pointcloud.bin file content + /// @param[out] compressed_zip_data 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 @@ -422,24 +416,12 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 [[grpc::client_receiveSize("-1")]] virtual FrameworkReturnCode backupMap( const std::string & accessToken, const std::string & mapUUID, - std::vector & map_information, - std::vector & cameraParameters, - std::vector & coordinate, - std::vector & covisibility_graph, - std::vector & identification, - std::vector & keyframes, - std::vector & pointcloud) const = 0; - - /// @brief Give json/binary data file contents for a specific map to restore it + std::vector & compressed_zip_data) 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] map_information the map_information.json file content - /// @param[in] cameraParameters the cameraParameters.bin file content - /// @param[in] coordinate the coordinate.bin file content - /// @param[in] covisibility_graph the covisibility_graph.bin file content - /// @param[in] identification the identification.bin file content - /// @param[in] keyframes the keyframes.bin file content - /// @param[in] pointcloud the pointcloud.bin file content + /// @param[in] compressed_zip_data 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 @@ -451,13 +433,7 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 [[grpc::client_sendSize("-1")]] virtual FrameworkReturnCode restoreMap( const std::string & accessToken, const std::string & mapUUID, - const std::vector & map_information, - const std::vector & cameraParameters, - const std::vector & coordinate, - const std::vector & covisibility_graph, - const std::vector & identification, - const std::vector & keyframes, - const std::vector & pointcloud) = 0; + const std::vector & compressed_zip_data) = 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 diff --git a/interfaces/api/service/IMapsManager.h b/interfaces/api/service/IMapsManager.h index 99c61604..1519836c 100644 --- a/interfaces/api/service/IMapsManager.h +++ b/interfaces/api/service/IMapsManager.h @@ -205,15 +205,9 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2 uint32_t & dataSize, bool & areImageSaved) const = 0; - /// @brief Get json/binary data file contents for a specific map to make a backup + /// @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] map_information the map_information.json file content - /// @param[out] cameraParameters the cameraParameters.bin file content - /// @param[out] coordinate the coordinate.bin file content - /// @param[out] covisibility_graph the covisibility_graph.bin file content - /// @param[out] identification the identification.bin file content - /// @param[out] keyframes the keyframes.bin file content - /// @param[out] pointcloud the pointcloud.bin file content + /// @param[out] compressed_zip_data 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 @@ -221,35 +215,17 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2 /// * else FrameworkReturnCode::_ERROR_ [[grpc::client_receiveSize("-1")]] virtual FrameworkReturnCode backupMap( const std::string & mapUUID, - std::vector & map_information, - std::vector & cameraParameters, - std::vector & coordinate, - std::vector & covisibility_graph, - std::vector & identification, - std::vector & keyframes, - std::vector & pointcloud) const = 0; - - /// @brief Give json/binary data file contents for a specific map to restore it + std::vector & compressed_zip_data) 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] map_information the map_information.json file content - /// @param[in] cameraParameters the cameraParameters.bin file content - /// @param[in] coordinate the coordinate.bin file content - /// @param[in] covisibility_graph the covisibility_graph.bin file content - /// @param[in] identification the identification.bin file content - /// @param[in] keyframes the keyframes.bin file content - /// @param[in] pointcloud the pointcloud.bin file content + /// @param[in] compressed_zip_data 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 & map_information, - const std::vector & cameraParameters, - const std::vector & coordinate, - const std::vector & covisibility_graph, - const std::vector & identification, - const std::vector & keyframes, - const std::vector & pointcloud) = 0; + const std::vector & compressed_zip_data) = 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 From 1984cd6af8d13e492ad00e3241d98b17a84333d4 Mon Sep 17 00:00:00 2001 From: ccutullic Date: Mon, 11 May 2026 09:21:31 +0200 Subject: [PATCH 6/7] feat (interface): add DENSE_MAPPING map processing type value in toString method --- interfaces/api/service/IMapsManager.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interfaces/api/service/IMapsManager.h b/interfaces/api/service/IMapsManager.h index 1519836c..ec79dda2 100644 --- a/interfaces/api/service/IMapsManager.h +++ b/interfaces/api/service/IMapsManager.h @@ -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; From 636aef384a9b1ecb6e4e1b4f1b65febd30033c73 Mon Sep 17 00:00:00 2001 From: ccutullic Date: Wed, 13 May 2026 15:14:07 +0200 Subject: [PATCH 7/7] refactor (interface): use std::byte for compressed buffer --- interfaces/api/service/IFrontEnd.h | 8 ++++---- interfaces/api/service/IMapsManager.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/interfaces/api/service/IFrontEnd.h b/interfaces/api/service/IFrontEnd.h index e2498441..763fc2f5 100644 --- a/interfaces/api/service/IFrontEnd.h +++ b/interfaces/api/service/IFrontEnd.h @@ -402,7 +402,7 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 /// @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] compressed_zip_data the data structure files of the map in a compressed buffer (ZIP format) + /// @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 @@ -416,12 +416,12 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 [[grpc::client_receiveSize("-1")]] virtual FrameworkReturnCode backupMap( const std::string & accessToken, const std::string & mapUUID, - std::vector & compressed_zip_data) const = 0; + std::vector & 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] compressed_zip_data the data structure files of the map in a compressed buffer (ZIP format) + /// @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 @@ -433,7 +433,7 @@ class XPCF_CLIENTUUID("91a569da-5695-11ec-bf63-0242ac130002") XPCF_SERVERUUID("9 [[grpc::client_sendSize("-1")]] virtual FrameworkReturnCode restoreMap( const std::string & accessToken, const std::string & mapUUID, - const std::vector & compressed_zip_data) = 0; + const std::vector & 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 diff --git a/interfaces/api/service/IMapsManager.h b/interfaces/api/service/IMapsManager.h index ec79dda2..d76d966e 100644 --- a/interfaces/api/service/IMapsManager.h +++ b/interfaces/api/service/IMapsManager.h @@ -210,7 +210,7 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2 /// @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] compressed_zip_data the data structure files of the map in a compressed buffer (ZIP format) + /// @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 @@ -218,17 +218,17 @@ class XPCF_CLIENTUUID("4863f2d1-023c-4095-8842-e6083e6ec54a") XPCF_SERVERUUID("2 /// * else FrameworkReturnCode::_ERROR_ [[grpc::client_receiveSize("-1")]] virtual FrameworkReturnCode backupMap( const std::string & mapUUID, - std::vector & compressed_zip_data) const = 0; + std::vector & 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] compressed_zip_data the data structure files of the map in a compressed buffer (ZIP format) + /// @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 & compressed_zip_data) = 0; + const std::vector & 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