summaryrefslogtreecommitdiff
path: root/vdr-vdrmanager/sock.h
diff options
context:
space:
mode:
authorbju <bju@maxi.fritz.box>2014-01-22 02:28:34 +0100
committerbju <bju@maxi.fritz.box>2014-01-22 02:28:34 +0100
commit321bebe669a5aafc2c4ff0e9f59e60de2fa79bac (patch)
treef8b81b463027a60481f8f41939eaa5a18824ce19 /vdr-vdrmanager/sock.h
parentbc2c9e64787d4682bd9f3a3340f8b46497f63bb3 (diff)
downloadvdr-manager-321bebe669a5aafc2c4ff0e9f59e60de2fa79bac.tar.gz
vdr-manager-321bebe669a5aafc2c4ff0e9f59e60de2fa79bac.tar.bz2
http://projects.vdr-developer.org/issues/1267:
- some fixes on client side certificate validation - added SSL server side support to the plugin
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