Mercurial > hg > piper-cpp
diff vamp-client/SynchronousTransport.h @ 134:3dcf0394971d
Debug output improvements, and make the checker actually attempt to call the descriptor function for known plugin types
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 16 Nov 2016 16:12:42 +0000 |
parents | 2004ec2b653e |
children | c4f841ccb208 |
line wrap: on
line diff
--- a/vamp-client/SynchronousTransport.h Fri Nov 04 10:43:49 2016 +0000 +++ b/vamp-client/SynchronousTransport.h Wed Nov 16 16:12:42 2016 +0000 @@ -47,7 +47,6 @@ { public: virtual ~MessageCompletenessChecker() = default; - virtual bool isComplete(const std::vector<char> &message) const = 0; }; @@ -57,6 +56,13 @@ ServerCrashed() : std::runtime_error("Piper server exited unexpectedly") {} }; +class LogCallback +{ +public: + virtual ~LogCallback() { } + virtual void log(std::string) const = 0; +}; + class SynchronousTransport // interface { public: @@ -72,6 +78,8 @@ * Make a synchronous call, passing a serialised request in the data array * of length bytes, and return the result. * + * The type field is only used for logging and debug output. + * * The slow flag is a hint that the recipient may take longer than usual * to process this request and so the caller may wish to be more relaxed * about idling to wait for the reply. (This shouldn't make any difference @@ -81,7 +89,8 @@ * call. Throws std::logic_error if isOK() is not true at the time of * calling, so check that before you call. */ - virtual std::vector<char> call(const char *data, size_t bytes, bool slow) = 0; + virtual std::vector<char> call(const char *data, size_t bytes, + std::string type, bool slow) = 0; /** * Check whether the transport was initialised correctly and is working.