From a5d98b9dccc149e75161b33ea3d1c4121029747f Mon Sep 17 00:00:00 2001 From: Newe Date: Mon, 24 May 2021 17:46:50 +0200 Subject: [edit] Deprecate gRPC in favor of MongoDB --- src/mongoStub.hpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/mongoStub.hpp (limited to 'src/mongoStub.hpp') diff --git a/src/mongoStub.hpp b/src/mongoStub.hpp new file mode 100644 index 00000000..3cee472c --- /dev/null +++ b/src/mongoStub.hpp @@ -0,0 +1,29 @@ +#ifndef MONGOSTUB_HPP +#define MONGOSTUB_HPP + +#include +#include +#include +#include +#include +#include +#include +#include + + +class mongoStub : boost::noncopyable { + public: + mongoStub(); + std::vector getNewMessages(mongocxx::change_stream* colCs); + + mongocxx::collection getCol() const { return col; } + + private: + mongocxx::instance instance; + mongocxx::client client{mongocxx::uri{}}; + mongocxx::database db; + mongocxx::collection col; + mongocxx::change_stream* colCs = nullptr; +}; + +#endif -- cgit 1.5.1