aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc/XserverDesktop.h
diff options
context:
space:
mode:
Diffstat (limited to 'unix/xserver/hw/vnc/XserverDesktop.h')
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/unix/xserver/hw/vnc/XserverDesktop.h b/unix/xserver/hw/vnc/XserverDesktop.h
index 9e776274..07bd3995 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.h
+++ b/unix/xserver/hw/vnc/XserverDesktop.h
@@ -38,13 +38,12 @@
#include <rfb/VNCServerST.h>
#include <rdr/SubstitutingInStream.h>
#include "Input.h"
-#include "xorg-version.h"
namespace rfb {
class VNCServerST;
}
-namespace network { class TcpListener; class Socket; }
+namespace network { class TcpListener; class Socket; class SocketServer; }
class XserverDesktop : public rfb::SDesktop, public rfb::FullFramePixelBuffer,
public rdr::Substitutor,
@@ -70,16 +69,8 @@ public:
const unsigned char *rgbaData);
void add_changed(const rfb::Region &region);
void add_copied(const rfb::Region &dest, const rfb::Point &delta);
-#if XORG >= 119
- void handleListenFd(int fd);
- void handleSocketFd(int fd, int xevents);
+ void handleSocketEvent(int fd, bool read, bool write);
void blockHandler(int* timeout);
-#else
- void readBlockHandler(fd_set* fds, struct timeval ** timeout);
- void readWakeupHandler(fd_set* fds, int nfds);
- void writeBlockHandler(fd_set* fds, struct timeval ** timeout);
- void writeWakeupHandler(fd_set* fds, int nfds);
-#endif
void addClient(network::Socket* sock, bool reverse);
void disconnectClients();
@@ -114,6 +105,14 @@ public:
const char* userName,
char** reason);
+protected:
+ bool handleListenerEvent(int fd,
+ std::list<network::TcpListener*>* sockets,
+ network::SocketServer* sockserv);
+ bool handleSocketEvent(int fd,
+ network::SocketServer* sockserv,
+ bool read, bool write);
+
private:
rfb::ScreenSet computeScreenLayout();
@@ -124,7 +123,6 @@ private:
std::list<network::TcpListener*> httpListeners;
bool deferredUpdateTimerSet;
bool directFbptr;
- struct timeval dixTimeout;
uint32_t queryConnectId;
network::Socket* queryConnectSocket;