aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/ServerParams.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2016-02-05 10:26:56 +0100
committerPierre Ossman <ossman@cendio.se>2019-07-01 11:18:27 +0200
commit0ff2655456097926a1720545830b1e34f072371f (patch)
treea9d542792cfb2532e1630919d16ef5832b7fb82c /common/rfb/ServerParams.cxx
parent5fbbe10b6c180ae8c0545695db6ad308cb5caea7 (diff)
downloadtigervnc-0ff2655456097926a1720545830b1e34f072371f.tar.gz
tigervnc-0ff2655456097926a1720545830b1e34f072371f.zip
Support extended clipboard transfers
Implements support in both client and server for the extended clipboard format first seen in UltraVNC. Currently only implements text handling, but that is still an improvement as it extends the clipboard from ISO 8859-1 to full Unicode.
Diffstat (limited to 'common/rfb/ServerParams.cxx')
-rw-r--r--common/rfb/ServerParams.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/common/rfb/ServerParams.cxx b/common/rfb/ServerParams.cxx
index bfeb80d6..a2e3aa83 100644
--- a/common/rfb/ServerParams.cxx
+++ b/common/rfb/ServerParams.cxx
@@ -1,6 +1,6 @@
/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
* Copyright (C) 2011 D. R. Commander. All Rights Reserved.
- * Copyright 2014-2018 Pierre Ossman for Cendio AB
+ * Copyright 2014-2019 Pierre Ossman for Cendio AB
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -32,7 +32,11 @@ ServerParams::ServerParams()
ledState_(ledUnknown)
{
setName("");
+
cursor_ = new Cursor(0, 0, Point(), NULL);
+
+ clipFlags = 0;
+ memset(clipSizes, 0, sizeof(clipSizes));
}
ServerParams::~ServerParams()
@@ -82,3 +86,17 @@ void ServerParams::setLEDState(unsigned int state)
{
ledState_ = state;
}
+
+void ServerParams::setClipboardCaps(rdr::U32 flags, const rdr::U32* lengths)
+{
+ int i, num;
+
+ clipFlags = flags;
+
+ num = 0;
+ for (i = 0;i < 16;i++) {
+ if (!(flags & (1 << i)))
+ continue;
+ clipSizes[i] = lengths[num++];
+ }
+}