summaryrefslogtreecommitdiff
path: root/src/sender_client.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/sender_client.hh')
-rw-r--r--src/sender_client.hh14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/sender_client.hh b/src/sender_client.hh
index 5d0bd35..54339cf 100644
--- a/src/sender_client.hh
+++ b/src/sender_client.hh
@@ -10,12 +10,24 @@ class Config;
class SenderClient {
public:
+ class Error {
+ public:
+ virtual ~Error() {}
+
+ virtual void error(const std::string& message) = 0;
+ virtual void error(const std::string& message, int error) = 0;
+
+ protected:
+ Error() {}
+ };
+
virtual ~SenderClient() {}
virtual void send(const std::string& channel,
const std::string& message) = 0;
- static std::unique_ptr<SenderClient> create(const Config* config);
+ static std::unique_ptr<SenderClient> create(
+ const Config* config, std::shared_ptr<Error> error = nullptr);
protected:
SenderClient() {}