From: Pierre Ossman Date: Wed, 28 Feb 2024 13:02:20 +0000 (+0100) Subject: Make SDesktop::start()/stop() optional X-Git-Tag: v1.13.90~5^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bc0461fd952e691d30fbadfd4c208318fa69ef09;p=tigervnc.git Make SDesktop::start()/stop() optional Let's avoid requring these as a desktop implementation can now set up everything in the init() method. --- diff --git a/common/rfb/SDesktop.h b/common/rfb/SDesktop.h index e3871616..560ee7ff 100644 --- a/common/rfb/SDesktop.h +++ b/common/rfb/SDesktop.h @@ -58,14 +58,12 @@ namespace rfb { // needed when there are no clients. A valid PixelBuffer must have been // set via the VNCServer's setPixelBuffer() method by the time this call // returns. - - virtual void start() = 0; + virtual void start() {} // stop() is called by the server when there are no longer any // authenticated clients, and therefore the desktop can cease any // expensive tasks. - - virtual void stop() = 0; + virtual void stop() {} // queryConnection() is called when a connection has been // successfully authenticated. The sock and userName arguments @@ -143,10 +141,6 @@ namespace rfb { server = vs; server->setPixelBuffer(buffer); } - virtual void start() { - } - virtual void stop() { - } virtual void queryConnection(network::Socket* sock, const char* /*userName*/) { server->approveConnection(sock, true, NULL); diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc index 7de6143b..c4117c74 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.cc +++ b/unix/xserver/hw/vnc/XserverDesktop.cc @@ -151,14 +151,6 @@ void XserverDesktop::init(rfb::VNCServer* vs) // ready state } -void XserverDesktop::start() -{ -} - -void XserverDesktop::stop() -{ -} - void XserverDesktop::queryConnection(network::Socket* sock, const char* userName) { diff --git a/unix/xserver/hw/vnc/XserverDesktop.h b/unix/xserver/hw/vnc/XserverDesktop.h index 6c4f0b68..3cac2121 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.h +++ b/unix/xserver/hw/vnc/XserverDesktop.h @@ -89,8 +89,6 @@ public: // rfb::SDesktop callbacks virtual void init(rfb::VNCServer* vs); - virtual void start(); - virtual void stop(); virtual void terminate(); virtual void queryConnection(network::Socket* sock, const char* userName);