Mercurial > hg > piper-cpp
comparison 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 |
comparison
equal
deleted
inserted
replaced
89:03ed2e0a6c8f | 90:6429a99abcad |
---|---|
1 | |
2 #ifndef PIPER_SYNCHRONOUS_TRANSPORT_H | |
3 #define PIPER_SYNCHRONOUS_TRANSPORT_H | |
4 | |
5 #include <vector> | |
6 | |
7 namespace piper { | |
8 | |
9 class SynchronousTransport // interface | |
10 { | |
11 public: | |
12 //!!! how to handle errors -- exception or return value? often an | |
13 //!!! error (e.g. server has exited) may mean the transport can no | |
14 //!!! longer be used at all | |
15 virtual std::vector<char> call(const char *data, size_t bytes) = 0; | |
16 | |
17 virtual bool isOK() const = 0; | |
18 }; | |
19 | |
20 class MessageCompletenessChecker // interface | |
21 { | |
22 public: | |
23 virtual bool isComplete(const std::vector<char> &message) const = 0; | |
24 }; | |
25 | |
26 } | |
27 | |
28 #endif |