Skip to content
Snippets Groups Projects
Commit 31315b51 authored by florian's avatar florian
Browse files

Merge branch 'dev' into f-full-c

parents 03ae8eb0 de91228b
No related branches found
No related tags found
1 merge request!15ENH: Allow insert/update/delete and files in Extern C
Pipeline #12180 passed
Pipeline: caosdb-cppinttest

#12183

    ......@@ -40,6 +40,8 @@ set(libcaosdb_INCL
    ${CMAKE_CURRENT_SOURCE_DIR}/caosdb/unary_rpc_handler.h
    ${CMAKE_CURRENT_SOURCE_DIR}/caosdb/utility.h
    ${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_transmission/register_file_upload_handler.h
    # TODO this file is still missing
    # ${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_transmission/register_file_download_handler.h
    ${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_transmission/upload_request_handler.h
    ${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_transmission/download_request_handler.h
    ${CMAKE_CURRENT_SOURCE_DIR}/caosdb/file_transmission/file_writer.h
    ......
    ......@@ -68,6 +68,9 @@ using caosdb::entity::v1alpha1::FileTransmissionService;
    using caosdb::transaction::HandlerInterface;
    using caosdb::transaction::HandlerTag;
    /*
    * Handler for the download request of a single file
    */
    class DownloadRequestHandler final : public HandlerInterface {
    public:
    DownloadRequestHandler(HandlerTag tag, FileTransmissionService::Stub *stub,
    ......
    ......@@ -56,7 +56,14 @@
    namespace caosdb::transaction {
    const static std::string logger_name = "caosdb::transaction";
    /*
    * Baseclass for UnaryRpcHandler, DownloadRequestHandler and
    * UploadRequestHandler
    *
    * It handles a request: Its status is contained in the transaction_status
    * member variable and the functions Start, OnNext and Cancel need to be
    * overwritten by child classes.
    */
    class HandlerInterface {
    public:
    HandlerInterface() : transaction_status(TransactionStatus::READY()) {}
    ......@@ -65,6 +72,12 @@ public:
    virtual void Start() = 0;
    /*
    * ok indicates whether the current request is in a good state or not. If
    * ok is false, the request will be ended.
    *
    * returns false if the handler is done
    */
    virtual bool OnNext(bool ok) = 0;
    virtual void Cancel() = 0;
    ......
    ......@@ -432,6 +432,8 @@ public:
    protected:
    /**
    * Await and process the current handler's results.
    *
    * This implies consecutive calls to the handler's OnNext function.
    */
    auto ProcessCalls() -> TransactionStatus;
    ......
    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