Class BulkDataHandlers
Defined in File bulkdata_handlers.hpp
Class Documentation
-
class BulkDataHandlers
HTTP handlers for SOVD bulk-data endpoints.
PR-403 commit 25: 11 bulk-data routes migrated to the typed RouteRegistry API. Every handler returns
<T>(or apair<T, ResponseAttachments>for the upload route that needs to emit 201 + Location). The download route usesreg.binary_downloadso it can emitContent-Disposition, setsupports_ranges, and supply a chunked content provider without touchinghttplib::Response. The upload route usesreg.multipart_upload<BulkDataDescriptor>so multipart parsing remains inside the framework while the handler stays typed. Wire format is unchanged byte-for-byte, including the rosbag MIME-type-by-format mapping and the Content-Disposition filename sanitisation.Supports SOVD entity paths:
/apps/{id}/bulk-data[/{category}[/{id}]]
/components/{id}/bulk-data[/{category}[/{id}]]
/areas/{id}/bulk-data[/{category}[/{id}]]
/functions/{id}/bulk-data[/{category}[/{id}]]
Nested entities (subareas, subcomponents)
Public Functions
-
explicit BulkDataHandlers(HandlerContext &ctx)
Construct BulkDataHandlers.
- Parameters:
ctx – Handler context for sending responses and accessing FaultManager
-
http::Result<dto::BulkDataCategoryList> list_categories(const http::TypedRequest &req)
GET /{entity}/bulk-data - list bulk-data categories.
-
http::Result<dto::Collection<dto::BulkDataDescriptor>> list_descriptors(const http::TypedRequest &req)
GET /{entity}/bulk-data/{category_id} - list bulk-data descriptors.
-
http::Result<http::BinaryResponse> download(const http::TypedRequest &req)
GET /{entity}/bulk-data/{category_id}/{file_id} - binary download.
-
http::Result<std::pair<dto::BulkDataDescriptor, http::ResponseAttachments>> upload(const http::TypedRequest &req, const http::MultipartBody &body)
POST /{entity}/bulk-data/{category_id} - multipart upload, 201 + Location.
-
http::Result<http::NoContent> remove(const http::TypedRequest &req)
DELETE /{entity}/bulk-data/{category_id}/{file_id} - 204 No Content.
Public Static Functions
-
static std::string get_rosbag_mimetype(const std::string &format)
Get MIME type for rosbag format.
- Parameters:
format – Storage format (“mcap”, “sqlite3”, “db3”)
- Returns:
MIME type string