MythTV  master
mythsocket_cb.h
Go to the documentation of this file.
1 
2 #ifndef MYTHSOCKET_CB_H
3 #define MYTHSOCKET_CB_H
4 
5 #include "mythbaseexp.h"
6 
7 using namespace std::chrono_literals;
8 
9 static constexpr std::chrono::milliseconds kMythSocketShortTimeout { 7s };
10 static constexpr std::chrono::milliseconds kMythSocketLongTimeout { 30s };
11 
12 class MythSocket;
14 {
15  public:
16  virtual ~MythSocketCBs() = default;
17  virtual void connected(MythSocket*) = 0;
18  virtual void error(MythSocket */*socket*/, int /*err*/) {}
19  virtual void readyRead(MythSocket*) = 0;
20  virtual void connectionFailed(MythSocket*) = 0;
21  virtual void connectionClosed(MythSocket*) = 0;
22 };
23 
24 #endif // MYTHSOCKET_CB_H
mythbaseexp.h
MythSocket
Class for communcating between myth backends and frontends.
Definition: mythsocket.h:26
kMythSocketShortTimeout
static constexpr std::chrono::milliseconds kMythSocketShortTimeout
Definition: mythsocket_cb.h:9
kMythSocketLongTimeout
static constexpr std::chrono::milliseconds kMythSocketLongTimeout
Definition: mythsocket_cb.h:10
MBASE_PUBLIC
#define MBASE_PUBLIC
Definition: mythbaseexp.h:15
MythSocketCBs
Definition: mythsocket_cb.h:13
MythSocketCBs::error
virtual void error(MythSocket *, int)
Definition: mythsocket_cb.h:18