summaryrefslogtreecommitdiff
path: root/vdr-vdrmanager/clientsock.h
diff options
context:
space:
mode:
authorbju <bju@maxi.fritz.box>2014-01-23 22:05:58 +0100
committerbju <bju@maxi.fritz.box>2014-01-23 22:05:58 +0100
commitb58cae86e52d1f34c8e007e04f2dbc28650d8789 (patch)
tree2fd8c5739f7ab4f76279a61dec6539a8532b486d /vdr-vdrmanager/clientsock.h
parent612e0e00b8d55b70d4b83d13fc75e7ddd78d2b58 (diff)
downloadvdr-manager-b58cae86e52d1f34c8e007e04f2dbc28650d8789.tar.gz
vdr-manager-b58cae86e52d1f34c8e007e04f2dbc28650d8789.tar.bz2
- Giving VDRMANAGER_USE_{SSL,GZIP,ZLIB}=0 (default is 1) to the make call
SSL support and the compression methods can be disabled. This eliminates the compile time and also the runtime dependencies. - The Gentoo ebuils uses the USE flags "ssl", "gzip" and "zlib" to control the SSL and compress features.
Diffstat (limited to 'vdr-vdrmanager/clientsock.h')
-rw-r--r--vdr-vdrmanager/clientsock.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/vdr-vdrmanager/clientsock.h b/vdr-vdrmanager/clientsock.h
index d921650..6c3fba3 100644
--- a/vdr-vdrmanager/clientsock.h
+++ b/vdr-vdrmanager/clientsock.h
@@ -8,7 +8,13 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
+
+#if VDRMANAGER_USE_SSL
#include <openssl/ssl.h>
+#else
+#define SSL_CTX void
+#endif
+
#include <string>
#include "sock.h"
@@ -30,9 +36,11 @@ private:
bool compression;
bool initCompression;
int compressionMode;
+#if VDRMANAGER_USE_SSL
SSL * ssl;
int sslReadWrite;
int sslWantsSelect;
+#endif
public:
cVdrmanagerClientSocket(const char * password, int compressionMode);
virtual ~cVdrmanagerClientSocket();
@@ -42,21 +50,25 @@ public:
void Write(string line);
bool Read();
int ReadNoSSL();
- int ReadSSL();
- bool Disconnected();
- void Disconnect();
bool Flush();
int FlushNoSSL();
+#if VDRMANAGER_USE_SSL
+ int ReadSSL();
int FlushSSL();
+ int GetSslReadWrite();
+ int GetSslWantsSelect();
+ bool IsSSL();
+#endif
+ bool Disconnected();
+ void Disconnect();
int GetClientId();
bool WritePending();
bool IsLoggedIn();
void SetLoggedIn();
void ActivateCompression();
+#if VDRMANAGER_USE_GZIP || VDRMANAGER_USE_ZLIB
void Compress();
- int GetSslReadWrite();
- int GetSslWantsSelect();
- bool IsSSL();
+#endif
};
#endif