Mercurial > hg > piper-cpp
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vamp-client/SynchronousTransport.h Thu Oct 13 10:17:59 2016 +0100 @@ -0,0 +1,28 @@ + +#ifndef PIPER_SYNCHRONOUS_TRANSPORT_H +#define PIPER_SYNCHRONOUS_TRANSPORT_H + +#include <vector> + +namespace piper { + +class SynchronousTransport // interface +{ +public: + //!!! how to handle errors -- exception or return value? often an + //!!! error (e.g. server has exited) may mean the transport can no + //!!! longer be used at all + virtual std::vector<char> call(const char *data, size_t bytes) = 0; + + virtual bool isOK() const = 0; +}; + +class MessageCompletenessChecker // interface +{ +public: + virtual bool isComplete(const std::vector<char> &message) const = 0; +}; + +} + +#endif