summaryrefslogtreecommitdiffstats
path: root/client/x11/named_pipe.h
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2009-11-08 16:34:12 +0200
committerYaniv Kamay <ykamay@redhat.com>2010-01-03 17:17:06 +0200
commit78f8d4b9e8fdb09055c04e82e30b6a0290795339 (patch)
treeaa883b71aec074544d3d56b5e0a2040d5ef1cc2e /client/x11/named_pipe.h
parent83efc81f30b4625f40983a5771cfdccc5860f8e6 (diff)
downloadspice-78f8d4b9e8fdb09055c04e82e30b6a0290795339.tar.gz
spice-78f8d4b9e8fdb09055c04e82e30b6a0290795339.tar.xz
spice-78f8d4b9e8fdb09055c04e82e30b6a0290795339.zip
spice client: creating a general process loop.
The process loop is responsible for: 1) waiting for events 2) timers 3) events queue for actions that should be performed in the context of the thread and are pushed from other threads. The benefits: 1) remove duplicity: till now, there was one implementaion of events loop for the channels and another one for the main thread. 2) timers can be executed on each thread and not only on the main thread. 3) events can be pushed to each thread and not only to the main thread. In this commit, only the main thread was modified to use the new process loop.
Diffstat (limited to 'client/x11/named_pipe.h')
-rw-r--r--client/x11/named_pipe.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/client/x11/named_pipe.h b/client/x11/named_pipe.h
index ab41f7f3..b32ede88 100644
--- a/client/x11/named_pipe.h
+++ b/client/x11/named_pipe.h
@@ -20,11 +20,11 @@
#include "platform.h"
#include "x_platform.h"
-#include "events_loop.h"
+#include "process_loop.h"
-class Session: public EventsLoop::Socket {
+class Session: public EventSources::Socket {
public:
- Session(int fd, EventsLoop& events_loop);
+ Session(int fd, ProcessLoop& events_loop);
virtual ~Session();
void bind(NamedPipe::ConnectionInterface* conn_interface);
@@ -37,13 +37,13 @@ public:
private:
NamedPipe::ConnectionInterface *_conn_interface;
int _fd_client;
- EventsLoop &_events_loop;
+ ProcessLoop &_events_loop;
};
-class LinuxListener: public EventsLoop::Socket {
+class LinuxListener: public EventSources::Socket {
public:
LinuxListener(const char *name, NamedPipe::ListenerInterface &listener_interface,
- EventsLoop &events_loop);
+ ProcessLoop& events_loop);
virtual ~LinuxListener();
void on_event();
virtual int get_socket() {return _listen_socket;}
@@ -55,7 +55,7 @@ private:
NamedPipe::ListenerInterface &_listener_interface;
int _listen_socket;
std::string _name;
- EventsLoop &_events_loop;
+ ProcessLoop &_events_loop;
};
#endif