Add support for owner screenshot HTTP GET API

This commit is contained in:
Lauri Kasanen
2021-03-02 15:23:32 +02:00
parent 784a9c611d
commit 3f6524ee30
12 changed files with 424 additions and 2 deletions

View File

@@ -966,7 +966,7 @@ static PixelBuffer *bilinearScale(const PixelBuffer *pb, const uint16_t w, const
return newpb;
}
static PixelBuffer *progressiveBilinearScale(const PixelBuffer *pb,
PixelBuffer *progressiveBilinearScale(const PixelBuffer *pb,
const uint16_t tgtw, const uint16_t tgth,
const float tgtdiff)
{

View File

@@ -51,6 +51,8 @@
#include <assert.h>
#include <stdlib.h>
#include <network/GetAPI.h>
#include <rfb/ComparingUpdateTracker.h>
#include <rfb/KeyRemapper.h>
#include <rfb/ListConnInfo.h>
@@ -91,7 +93,7 @@ VNCServerST::VNCServerST(const char* name_, SDesktop* desktop_)
renderedCursorInvalid(false),
queryConnectionHandler(0), keyRemapper(&KeyRemapper::defInstance),
lastConnectionTime(0), disableclients(false),
frameTimer(this)
frameTimer(this), apimessager(NULL)
{
lastUserInputTime = lastDisconnectTime = time(0);
slog.debug("creating single-threaded server %s", name.buf);
@@ -709,6 +711,9 @@ void VNCServerST::writeUpdate()
}
}
if (apimessager)
apimessager->mainUpdateScreen(pb);
for (ci = clients.begin(); ci != clients.end(); ci = ci_next) {
ci_next = ci; ci_next++;

View File

@@ -43,6 +43,7 @@ namespace rfb {
class ListConnInfo;
class PixelBuffer;
class KeyRemapper;
class network::GetAPIMessager;
class VNCServerST : public VNCServer,
public Timer::Callback,
@@ -186,6 +187,8 @@ namespace rfb {
bool getDisable() { return disableclients;};
void setDisable(bool disable) { disableclients = disable;};
void setAPIMessager(network::GetAPIMessager *msgr) { apimessager = msgr; }
protected:
friend class VNCSConnectionST;
@@ -251,6 +254,8 @@ namespace rfb {
Timer frameTimer;
int inotifyfd;
network::GetAPIMessager *apimessager;
};
};