00001
00002
00003
00004
00005 #ifndef EQ_CLIENT_H
00006 #define EQ_CLIENT_H
00007
00008 #include <eq/client/commandQueue.h>
00009 #include <eq/client/nodeType.h>
00010 #include <eq/net/command.h>
00011 #include <eq/net/node.h>
00012
00013 namespace eq
00014 {
00015 class Server;
00016
00020 class EQ_EXPORT Client : public net::Node
00021 {
00022 public:
00026 Client();
00027
00031 virtual ~Client();
00032
00039 bool connectServer( ServerPtr server );
00040
00048 bool disconnectServer( ServerPtr server );
00049
00054 void processCommand();
00055
00057 virtual bool listen();
00059 virtual bool stopListening();
00060
00066 void setWindowSystem( const WindowSystem windowSystem );
00067
00069 CommandQueue* getNodeThreadQueue() { return _nodeThreadQueue; }
00070
00071 protected:
00073 virtual bool clientLoop();
00075 virtual bool exitClient();
00076
00077 private:
00079 CommandQueue* _nodeThreadQueue;
00080
00081 bool _running;
00082
00084 virtual net::NodePtr createNode( const uint32_t type );
00085
00087 virtual bool dispatchCommand( net::Command& command );
00088
00090 virtual net::CommandResult invokeCommand( net::Command& command );
00091
00093 net::CommandResult _cmdExit( net::Command& command );
00094 };
00095 }
00096
00097 #endif // EQ_CLIENT_H