summaryrefslogtreecommitdiff
path: root/vdr-vdrmanager/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'vdr-vdrmanager/sock.h')
-rw-r--r--vdr-vdrmanager/sock.h48
1 files changed, 5 insertions, 43 deletions
diff --git a/vdr-vdrmanager/sock.h b/vdr-vdrmanager/sock.h
index 25a7b83..f9e3ebf 100644
--- a/vdr-vdrmanager/sock.h
+++ b/vdr-vdrmanager/sock.h
@@ -8,8 +8,13 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <openssl/ssl.h>
#include <string>
+#define SSL_NO_RETRY 0
+#define SSL_RETRY_READ 1
+#define SSL_RETRY_WRITE 2
+
using namespace std;
class cVdrmanagerSocket
@@ -30,47 +35,4 @@ public:
const char * GetPassword();
};
-class cVdrmanagerClientSocket : public cVdrmanagerSocket
-{
-private:
- string readbuf;
- string writebuf;
- char * sendbuf;
- size_t sendsize;
- size_t sendoffset;
- bool disconnected;
- bool initDisconnect;
- int client;
- bool login;
- bool compression;
- bool initCompression;
- int compressionMode;
-public:
- cVdrmanagerClientSocket(const char * password, int compressionMode);
- virtual ~cVdrmanagerClientSocket();
- bool Attach(int fd);
- bool IsLineComplete();
- bool GetLine(string& line);
- bool PutLine(string line);
- bool Read();
- bool Disconnected();
- void Disconnect();
- bool Flush();
- int GetClientId();
- bool WritePending();
- bool IsLoggedIn();
- void SetLoggedIn();
- void ActivateCompression();
- void Compress();
-};
-
-class cVdrmanagerServerSocket : public cVdrmanagerSocket
-{
-public:
- cVdrmanagerServerSocket();
- virtual ~cVdrmanagerServerSocket();
- bool Create(int port, const char * password, bool forceCheckSvdrp, int compressionMode);
- cVdrmanagerClientSocket * Accept();
-};
-
#endif