equal
deleted
inserted
replaced
28 #include <relpipe/reader/TypeId.h> |
28 #include <relpipe/reader/TypeId.h> |
29 #include <relpipe/reader/handlers/RelationalReaderStringHandler.h> |
29 #include <relpipe/reader/handlers/RelationalReaderStringHandler.h> |
30 #include <relpipe/reader/handlers/AttributeMetadata.h> |
30 #include <relpipe/reader/handlers/AttributeMetadata.h> |
31 |
31 |
32 #include "PosixMQ.h" |
32 #include "PosixMQ.h" |
|
33 #include "Configuration.h" |
33 |
34 |
34 namespace relpipe { |
35 namespace relpipe { |
35 namespace out { |
36 namespace out { |
36 namespace posixmq { |
37 namespace posixmq { |
37 |
38 |
38 class PosixMQHandler : public relpipe::reader::handlers::RelationalReaderStringHandler { |
39 class PosixMQHandler : public relpipe::reader::handlers::RelationalReaderStringHandler { |
39 private: |
40 private: |
40 std::wstring_convert<codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings. |
41 std::wstring_convert<codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings. |
|
42 Configuration configuration; |
41 shared_ptr<PosixMQ> mq; |
43 shared_ptr<PosixMQ> mq; |
42 |
44 |
43 public: |
45 public: |
44 |
46 |
45 PosixMQHandler(std::ostream& output) { |
47 PosixMQHandler(Configuration configuration) : configuration(configuration) { |
46 relpipe::common::type::StringX queueName = L"/relpipe"; |
48 mq.reset(PosixMQ::open(convertor.to_bytes(configuration.queue), configuration.unlinkOnClose)); |
47 mq.reset(PosixMQ::open(convertor.to_bytes(queueName))); |
|
48 |
|
49 } |
49 } |
50 |
50 |
51 void startRelation(relpipe::common::type::StringX name, std::vector<relpipe::reader::handlers::AttributeMetadata> attributes) override { |
51 void startRelation(relpipe::common::type::StringX name, std::vector<relpipe::reader::handlers::AttributeMetadata> attributes) override { |
52 |
52 |
53 } |
53 } |