annotate vamp-client/SynchronousTransport.h @ 90:6429a99abcad

Split out classes
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 13 Oct 2016 10:17:59 +0100
parents
children 21f8af53eaf0
rev   line source
c@90 1
c@90 2 #ifndef PIPER_SYNCHRONOUS_TRANSPORT_H
c@90 3 #define PIPER_SYNCHRONOUS_TRANSPORT_H
c@90 4
c@90 5 #include <vector>
c@90 6
c@90 7 namespace piper {
c@90 8
c@90 9 class SynchronousTransport // interface
c@90 10 {
c@90 11 public:
c@90 12 //!!! how to handle errors -- exception or return value? often an
c@90 13 //!!! error (e.g. server has exited) may mean the transport can no
c@90 14 //!!! longer be used at all
c@90 15 virtual std::vector<char> call(const char *data, size_t bytes) = 0;
c@90 16
c@90 17 virtual bool isOK() const = 0;
c@90 18 };
c@90 19
c@90 20 class MessageCompletenessChecker // interface
c@90 21 {
c@90 22 public:
c@90 23 virtual bool isComplete(const std::vector<char> &message) const = 0;
c@90 24 };
c@90 25
c@90 26 }
c@90 27
c@90 28 #endif