diff options
author | Carlos Santos <casantos@redhat.com> | 2023-11-28 18:11:13 -0300 |
---|---|---|
committer | Carlos Santos <casantos@redhat.com> | 2024-04-23 17:41:01 -0300 |
commit | ae81801cccbbef7c424103ec3aee9bfc6021059e (patch) | |
tree | b9d288bf7e8341cad9b54c7f240f84e08bf16e65 /win | |
parent | 34d96928632b79196cc3d46aa2abd7c1f1122593 (diff) | |
download | tigervnc-ae81801cccbbef7c424103ec3aee9bfc6021059e.tar.gz tigervnc-ae81801cccbbef7c424103ec3aee9bfc6021059e.zip |
Move the AccessRights type and constants to the rfb namespace
They must belong to the rfb namespace, not to the SConnection class.
Also add an AccessNone constant, since it's better to use a mnemonic
symbol rather than zero to initialize the accessRights members.
Signed-off-by: Carlos Santos <casantos@redhat.com>
Diffstat (limited to 'win')
-rw-r--r-- | win/winvnc/VNCServerWin32.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/win/winvnc/VNCServerWin32.cxx b/win/winvnc/VNCServerWin32.cxx index a243d95e..38b2ef16 100644 --- a/win/winvnc/VNCServerWin32.cxx +++ b/win/winvnc/VNCServerWin32.cxx @@ -363,11 +363,11 @@ void VNCServerWin32::getConnInfo(ListConnInfo * listConn) if (!conn->authenticated()) status = 3; - else if (conn->accessCheck(rfb::SConnection::AccessPtrEvents | - rfb::SConnection::AccessKeyEvents | - rfb::SConnection::AccessView)) + else if (conn->accessCheck(rfb::AccessPtrEvents | + rfb::AccessKeyEvents | + rfb::AccessView)) status = 0; - else if (conn->accessCheck(rfb::SConnection::AccessView)) + else if (conn->accessCheck(rfb::AccessView)) status = 1; else status = 2; @@ -398,25 +398,25 @@ void VNCServerWin32::setConnStatus(ListConnInfo* listConn) if (status == 3) { conn->close(0); } else { - rfb::SConnection::AccessRights ar; + rfb::AccessRights ar; - ar = rfb::SConnection::AccessDefault; + ar = rfb::AccessDefault; switch (status) { case 0: - ar |= rfb::SConnection::AccessPtrEvents | - rfb::SConnection::AccessKeyEvents | - rfb::SConnection::AccessView; + ar |= rfb::AccessPtrEvents | + rfb::AccessKeyEvents | + rfb::AccessView; break; case 1: - ar |= rfb::SConnection::AccessView; - ar &= ~(rfb::SConnection::AccessPtrEvents | - rfb::SConnection::AccessKeyEvents); + ar |= rfb::AccessView; + ar &= ~(rfb::AccessPtrEvents | + rfb::AccessKeyEvents); break; case 2: - ar &= ~(rfb::SConnection::AccessPtrEvents | - rfb::SConnection::AccessKeyEvents | - rfb::SConnection::AccessView); + ar &= ~(rfb::AccessPtrEvents | + rfb::AccessKeyEvents | + rfb::AccessView); break; } conn->setAccessRights(ar); |