summaryrefslogtreecommitdiff
path: root/vdr-vdrmanager/sock.h
blob: bc19d6d7bddad82bdb461d88ac3ac21a13a11353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
 * extendes sockets
 */

#ifndef _VDRMON_SOCK
#define _VDRMON_SOCK

#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <string>

#if VDRMANAGER_USE_SSL
#define SSL_NO_RETRY       0
#define SSL_RETRY_READ     1
#define SSL_RETRY_WRITE    2
#endif

using namespace std;

class cVdrmanagerSocket
{
protected:
  int sock;
  const char * password;
  bool forceCheckSvdrp;
  int compressionMode;
protected:
  cVdrmanagerSocket();
  bool IsPasswordSet();
public:
  virtual ~cVdrmanagerSocket();
  void Close();
  int GetSocket();
  bool MakeDontBlock();
  const char * GetPassword();
};

#endif