![]() |
Deskflow 1.24.0.365
Keyboard and mouse sharing utility
|
Deskflow protocol utilities. More...
#include <ProtocolUtil.h>
Static Public Member Functions | |
| static uint8_t | read1ByteInt (deskflow::IStream *stream) |
| Write formatted data. | |
| static uint16_t | read2BytesInt (deskflow::IStream *stream) |
| static uint32_t | read4BytesInt (deskflow::IStream *stream) |
| static void | readVector1ByteInt (deskflow::IStream *, std::vector< uint8_t > &) |
| Handles a Vector of integers. | |
| static void | readVector2BytesInt (deskflow::IStream *, std::vector< uint16_t > &) |
| static void | readVector4BytesInt (deskflow::IStream *, std::vector< uint32_t > &) |
| static uint32_t | readVectorSize (deskflow::IStream *stream) |
| static void | readBytes (deskflow::IStream *, uint32_t, std::string *) |
| Handles an array of bytes. | |
Deskflow protocol utilities.
This class provides various functions for implementing the deskflow protocol.
|
static |
Write formatted data.
Write formatted binary data to a stream. fmt consists of regular characters and format specifiers. Format specifiers begin with %. All characters not part of a format specifier are regular and are transmitted unchanged.
Format specifiers are:
%S – converts integer N and const uint8_t* to stream of N bytes */ static void writef(deskflow::IStream *, const char *fmt, ...);
Read formatted data /*! Read formatted binary data from a buffer. This performs the reverse operation of writef(). Returns true if the entire format was successfully parsed, false otherwise.
Format specifiers are:
private: static void vwritef(deskflow::IStream *, const char *fmt, uint32_t size, va_list); static void vreadf(deskflow::IStream *, const char *fmt, va_list);
static uint32_t getLength(const char *fmt, va_list); static void writef(std::vector<uint8_t> &, const char *fmt, va_list); static uint32_t eatLength(const char **fmt); static void read(deskflow::IStream *, void *, uint32_t);
/**
Handles 1,2, or 4 byte Integers
|
static |
|
static |
|
static |
Handles an array of bytes.
|
static |
Handles a Vector of integers.
|
static |
|
static |
|
static |