Skip to content
Snippets Groups Projects
Verified Commit 59587e7e authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: files

parent 23f4ad6d
No related branches found
No related tags found
1 merge request!11F files
This commit is part of merge request !11. Comments created here will be created in the context of that merge request.
......@@ -3,7 +3,6 @@
#include "caosdb/entity/v1alpha1/main.pb.h" // for FileDownloadResponse
#include "caosdb/file_transmission/file_writer.h" // for FileWriter
#include "caosdb/handler_interface.h" // for HandlerTag, Handl...
#include "caosdb/transaction_status.h" // for TransactionStatus
#include <grpcpp/impl/codegen/async_stream.h> // for ClientAsyncReader
#include <grpcpp/impl/codegen/client_context.h> // for ClientContext
#include <grpcpp/impl/codegen/completion_queue.h> // for CompletionQueue
......
......@@ -3,7 +3,6 @@
#include "caosdb/entity/v1alpha1/main.pb.h" // for FileUploadRequest
#include "caosdb/file_transmission/file_reader.h" // for FileReader
#include "caosdb/handler_interface.h" // for HandlerTag, Handl...
#include "caosdb/transaction_status.h" // for TransactionStatus
#include <cstdint> // for uint64_t
#include <grpcpp/impl/codegen/async_stream.h> // for ClientAsyncWriter
#include <grpcpp/impl/codegen/client_context.h> // for ClientContext
......
#include "caosdb/file_transmission/download_request_handler.h"
#include "caosdb/exceptions.h" // for Exception
#include "caosdb/logging.h" // for CAOSDB_LOG_TRACE
#include "caosdb/protobuf_helper.h" // for get_arena
#include "caosdb/status_code.h" // for GENERIC_RPC_E...
#include "caosdb/transaction_status.h" // for TransactionStatus
#include <boost/filesystem/path.hpp> // for operator<<, path
#include <boost/log/core/record.hpp> // for record
#include <boost/log/detail/attachable_sstream_buf.hpp> // for basic_ostring...
......@@ -24,16 +24,13 @@
namespace caosdb::transaction {
using caosdb::StatusCode;
using caosdb::exceptions::AuthenticationError;
using caosdb::exceptions::ConnectionError;
using caosdb::exceptions::Exception;
using caosdb::utility::get_arena;
using google::protobuf::Arena;
DownloadRequestHandler::DownloadRequestHandler(
HandlerTag tag, FileTransmissionService::Stub *stub,
grpc::CompletionQueue *cq, FileDescriptor file_descriptor)
: HandlerInterface(), tag_(tag), stub_(stub), cq_(cq),
: tag_(tag), stub_(stub), cq_(cq),
request_(Arena::CreateMessage<FileDownloadRequest>(get_arena())),
response_(Arena::CreateMessage<FileDownloadResponse>(get_arena())),
state_(CallState::NewCall), file_descriptor_(std::move(file_descriptor)),
......
#include "caosdb/file_transmission/upload_request_handler.h"
#include "caosdb/exceptions.h" // for Exception
#include "caosdb/logging.h" // for CAOSDB_LOG_ERROR
#include "caosdb/protobuf_helper.h" // for get_arena
#include "caosdb/status_code.h" // for GENERIC_RPC_E...
#include "caosdb/transaction_status.h" // for TransactionStatus
#include <algorithm> // for min
#include <boost/filesystem/path.hpp> // for operator<<, path
#include <boost/log/core/record.hpp> // for record
......@@ -26,9 +26,6 @@
namespace caosdb::transaction {
using caosdb::StatusCode;
using caosdb::exceptions::AuthenticationError;
using caosdb::exceptions::ConnectionError;
using caosdb::exceptions::Exception;
using caosdb::utility::get_arena;
using google::protobuf::Arena;
......@@ -36,7 +33,7 @@ UploadRequestHandler::UploadRequestHandler(HandlerTag tag,
FileTransmissionService::Stub *stub,
grpc::CompletionQueue *cq,
FileDescriptor file_descriptor)
: HandlerInterface(), tag_(tag), stub_(stub), cq_(cq),
: tag_(tag), stub_(stub), cq_(cq),
request_(Arena::CreateMessage<FileUploadRequest>(get_arena())),
response_(Arena::CreateMessage<FileUploadResponse>(get_arena())),
state_(CallState::NewCall), file_descriptor_(std::move(file_descriptor)),
......
......@@ -20,12 +20,12 @@
#include "caosdb/transaction.h"
#include "caosdb/entity/v1alpha1/main.grpc.pb.h" // for EntityTransac...
#include "caosdb/entity/v1alpha1/main.pb.h" // for TransactionRe...
#include "caosdb/file_transmission/register_file_upload_handler.h"
#include "caosdb/file_transmission/upload_request_handler.h" // Upload...
#include "caosdb/file_transmission/download_request_handler.h" // Download...
#include "caosdb/logging.h" // for CAOSDB_LOG_FATAL
#include "caosdb/protobuf_helper.h" // for get_arena
#include "caosdb/status_code.h" // for StatusCode
#include "caosdb/file_transmission/file_reader.h" // for path
#include "caosdb/file_transmission/register_file_upload_handler.h"
#include "caosdb/file_transmission/upload_request_handler.h" // Upload...
#include "caosdb/logging.h" // for CAOSDB_LOG_FATAL
#include "caosdb/status_code.h" // for StatusCode
#include "caosdb/transaction_handler.h"
#include <algorithm> // for max
#include <boost/filesystem/path.hpp> // for operator<<, path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment