Move access rights and closing to SConnection object
This makes it generally useful and other code doesn't have to
know of the specific sub-class.
diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx
index efc26ac..6b4a5c4 100644
--- a/common/rfb/SConnection.cxx
+++ b/common/rfb/SConnection.cxx
@@ -269,6 +269,16 @@
os->flush();
}
+void SConnection::setAccessRights(AccessRights ar)
+{
+ accessRights = ar;
+}
+
+bool SConnection::accessCheck(AccessRights ar) const
+{
+ return (accessRights & ar) == ar;
+}
+
void SConnection::setEncodings(int nEncodings, const rdr::S32* encodings)
{
int i;
@@ -342,6 +352,11 @@
state_ = RFBSTATE_NORMAL;
}
+void SConnection::close(const char* reason)
+{
+ state_ = RFBSTATE_CLOSING;
+}
+
void SConnection::setPixelFormat(const PixelFormat& pf)
{
SMsgHandler::setPixelFormat(pf);