aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/SMsgReader.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/SMsgReader.cxx')
-rw-r--r--common/rfb/SMsgReader.cxx31
1 files changed, 16 insertions, 15 deletions
diff --git a/common/rfb/SMsgReader.cxx b/common/rfb/SMsgReader.cxx
index e7c78c4e..ba2eb175 100644
--- a/common/rfb/SMsgReader.cxx
+++ b/common/rfb/SMsgReader.cxx
@@ -25,6 +25,7 @@
#include <rdr/InStream.h>
#include <rdr/ZlibInStream.h>
+#include <rdr/types.h>
#include <rfb/msgTypes.h>
#include <rfb/qemuTypes.h>
@@ -153,7 +154,7 @@ bool SMsgReader::readSetDesktopSize()
{
int width, height;
int screens, i;
- rdr::U32 id, flags;
+ uint32_t id, flags;
int sx, sy, sw, sh;
ScreenSet layout;
@@ -225,8 +226,8 @@ bool SMsgReader::readEnableContinuousUpdates()
bool SMsgReader::readFence()
{
- rdr::U32 flags;
- rdr::U8 len;
+ uint32_t flags;
+ uint8_t len;
char data[64];
if (!is->hasData(3 + 4 + 1))
@@ -263,7 +264,7 @@ bool SMsgReader::readKeyEvent()
return false;
bool down = is->readU8();
is->skip(2);
- rdr::U32 key = is->readU32();
+ uint32_t key = is->readU32();
handler->keyEvent(key, 0, down);
return true;
}
@@ -288,10 +289,10 @@ bool SMsgReader::readClientCutText()
is->setRestorePoint();
is->skip(3);
- rdr::U32 len = is->readU32();
+ uint32_t len = is->readU32();
if (len & 0x80000000) {
- rdr::S32 slen = len;
+ int32_t slen = len;
slen = -slen;
if (readExtendedClipboard(slen)) {
is->clearRestorePoint();
@@ -320,10 +321,10 @@ bool SMsgReader::readClientCutText()
return true;
}
-bool SMsgReader::readExtendedClipboard(rdr::S32 len)
+bool SMsgReader::readExtendedClipboard(int32_t len)
{
- rdr::U32 flags;
- rdr::U32 action;
+ uint32_t flags;
+ uint32_t action;
if (!is->hasData(len))
return false;
@@ -342,7 +343,7 @@ bool SMsgReader::readExtendedClipboard(rdr::S32 len)
if (action & clipboardCaps) {
int i;
size_t num;
- rdr::U32 lengths[16];
+ uint32_t lengths[16];
num = 0;
for (i = 0;i < 16;i++) {
@@ -350,7 +351,7 @@ bool SMsgReader::readExtendedClipboard(rdr::S32 len)
num++;
}
- if (len < (rdr::S32)(4 + 4*num))
+ if (len < (int32_t)(4 + 4*num))
throw Exception("Invalid extended clipboard message");
num = 0;
@@ -366,7 +367,7 @@ bool SMsgReader::readExtendedClipboard(rdr::S32 len)
int i;
size_t num;
size_t lengths[16];
- rdr::U8* buffers[16];
+ uint8_t* buffers[16];
zis.setUnderlying(is, len - 4);
@@ -407,7 +408,7 @@ bool SMsgReader::readExtendedClipboard(rdr::S32 len)
if (!zis.hasData(lengths[num]))
throw Exception("Extended clipboard decode error");
- buffers[num] = new rdr::U8[lengths[num]];
+ buffers[num] = new uint8_t[lengths[num]];
zis.readBytes(buffers[num], lengths[num]);
num++;
}
@@ -476,8 +477,8 @@ bool SMsgReader::readQEMUKeyEvent()
if (!is->hasData(2 + 4 + 4))
return false;
bool down = is->readU16();
- rdr::U32 keysym = is->readU32();
- rdr::U32 keycode = is->readU32();
+ uint32_t keysym = is->readU32();
+ uint32_t keycode = is->readU32();
if (!keycode) {
vlog.error("Key event without keycode - ignoring");
return true;