It was only used by WinVNC, so push it there instead.
virtual void stop() {}
- // getFbSize() returns the current dimensions of the framebuffer.
- // This can be called even while the SDesktop is not start()ed.
-
- virtual Point getFbSize() = 0;
-
// setScreenLayout() requests to reconfigure the framebuffer and/or
// the layout of screens.
virtual unsigned int setScreenLayout(int __unused_attr fb_width,
SConnection* getSConnection(network::Socket* sock);
- // getDesktopSize() returns the size of the SDesktop exported by this
- // server.
- Point getDesktopSize() const {return desktop->getFbSize();}
-
// getName() returns the name of this VNC Server. NB: The value returned
// is the server's internal buffer which may change after any other methods
// are called - take a copy if necessary.
virtual void clientCutText(const char* str, int len) {
}
- virtual Point getFbSize() {
- return Point(pb->width(), pb->height());
- }
-
// -=- TXGlobalEventHandler interface
virtual bool handleGlobalEvent(XEvent* ev) {
virtual void pointerEvent(const rfb::Point& pos, int buttonMask);
virtual void keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down);
virtual void clientCutText(const char* str, int len);
- virtual rfb::Point getFbSize() { return rfb::Point(width(), height()); }
virtual unsigned int setScreenLayout(int fb_width, int fb_height,
const rfb::ScreenSet& layout);
virtual void pointerEvent(const Point& pos, int buttonmask);
virtual void keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down);
virtual void clientCutText(const char* str, int len);
- virtual Point getFbSize();
// -=- Clipboard
void setStatusLocation(bool* status) {statusLocation = status;}
+ // -=- Used (indirectly) by JavaViewer to get desktop size
+
+ Point getFbSize();
+
friend class SDisplayCore;
static IntParameter updateMethod;
*/
#include <winvnc/JavaViewer.h>
+#include <winvnc/VNCServerWin32.h>
#include <winvnc/resource.h>
#include <rdr/MemInStream.h>
#include <rfb/LogWriter.h>
static rfb::LogWriter vlog("JavaViewerServer");
-JavaViewerServer::JavaViewerServer(rfb::VNCServerST* svr) : server(svr) {
+JavaViewerServer::JavaViewerServer(VNCServerWin32* svr) : server(svr) {
}
JavaViewerServer::~JavaViewerServer() {
#define WINVNC_JAVA_VIEWER
#include <rfb/HTTPServer.h>
-#include <rfb/VNCServerST.h>
#include <rdr/SubstitutingInStream.h>
namespace winvnc {
+ class VNCServerWin32;
+
class JavaViewerServer : public rfb::HTTPServer, public rdr::Substitutor {
public:
- JavaViewerServer(rfb::VNCServerST* desktop);
+ JavaViewerServer(VNCServerWin32* desktop);
virtual ~JavaViewerServer();
virtual rdr::InStream* getFile(const char* name, const char** contentType,
}
protected:
int rfbPort;
- rfb::VNCServerST* server;
+ VNCServerWin32* server;
};
};
CreateEvent(0, FALSE, FALSE, "Global\\SessionEventTigerVNC") : 0),
vncServer(CStr(ComputerName().buf), &desktop),
thread_id(-1), runServer(false), isDesktopStarted(false),
- httpServer(&vncServer), config(&sockMgr),
+ httpServer(this), config(&sockMgr),
rfbSock(&sockMgr), httpSock(&sockMgr), trayIcon(0),
queryConnectDialog(0)
{
bool setClientsStatus(rfb::ListConnInfo* LCInfo);
+ // Used by JavaViewerServer
+ const char* getName() {return vncServer.getName();}
+ rfb::Point getDesktopSize() {return desktop.getFbSize();}
+
protected:
// VNCServerST::QueryConnectionHandler interface
// Callback used to prompt user to accept or reject a connection.