c@90: c@90: #ifndef PIPER_SYNCHRONOUS_TRANSPORT_H c@90: #define PIPER_SYNCHRONOUS_TRANSPORT_H c@90: c@90: #include c@92: #include c@90: c@97: namespace piper_vamp { c@97: namespace client { c@90: c@92: class MessageCompletenessChecker // interface c@92: { c@92: public: c@92: virtual ~MessageCompletenessChecker() = default; c@92: c@92: virtual bool isComplete(const std::vector &message) const = 0; c@92: }; c@92: c@90: class SynchronousTransport // interface c@90: { c@90: public: c@92: virtual ~SynchronousTransport() = default; c@92: c@92: //!!! I do not take ownership c@92: virtual void setCompletenessChecker(MessageCompletenessChecker *) = 0; c@92: c@90: //!!! how to handle errors -- exception or return value? often an c@90: //!!! error (e.g. server has exited) may mean the transport can no c@90: //!!! longer be used at all c@90: virtual std::vector call(const char *data, size_t bytes) = 0; c@90: c@90: virtual bool isOK() const = 0; c@90: }; c@90: c@90: } c@94: } c@90: c@90: #endif