Exemplo n.º 1
0
int
main(int argc, char **argv)
{
	rfbClient* client = rfbGetClient(8,3,4);

	client->GotFrameBufferUpdate = HandleRect;
	rfbClientRegisterExtension(&backChannel);

	if (!rfbInitClient(client,&argc,argv))
		return 1;

	while (1) {
		/* After each idle second, send a message */
		if(WaitForMessage(client,1000000)>0)
			HandleRFBServerMessage(client);
		else if(rfbClientGetClientData(client, sendMessage))
			sendMessage(client, "Dear Server,\n"
					"thank you for understanding "
					"back channel messages!");
	}

	rfbClientCleanup(client);

	return 0;
}
Exemplo n.º 2
0
RfbLZORLE::RfbLZORLE()
{
	if( __lzoRleProtocolExt == nullptr )
	{
		__lzoRleProtocolExt = new rfbClientProtocolExtension;
		__lzoRleProtocolExt->encodings = new int[2];
		__lzoRleProtocolExt->encodings[0] = rfbEncodingLZORLE;
		__lzoRleProtocolExt->encodings[1] = 0;
		__lzoRleProtocolExt->handleEncoding = handleEncodingLZORLE;
		__lzoRleProtocolExt->handleMessage = nullptr;

		rfbClientRegisterExtension( __lzoRleProtocolExt );
	}
}
Exemplo n.º 3
0
RfbItalcCursor::RfbItalcCursor()
{
	if( __italcCursorProtocolExt == NULL )
	{
		__italcCursorProtocolExt = new rfbClientProtocolExtension;
		__italcCursorProtocolExt->encodings = new int[2];
		__italcCursorProtocolExt->encodings[0] = rfbEncodingItalcCursor;
		__italcCursorProtocolExt->encodings[1] = 0;
		__italcCursorProtocolExt->handleEncoding = handleEncodingItalcCursor;
		__italcCursorProtocolExt->handleMessage = NULL;

		rfbClientRegisterExtension( __italcCursorProtocolExt );
	}
}
Exemplo n.º 4
0
VeyonCoreConnection::VeyonCoreConnection( VeyonVncConnection *vncConn ):
	m_vncConn( vncConn ),
	m_user(),
	m_userHomeDir()
{
	if( __veyonProtocolExt == nullptr )
	{
		__veyonProtocolExt = new rfbClientProtocolExtension;
		__veyonProtocolExt->encodings = nullptr;
		__veyonProtocolExt->handleEncoding = nullptr;
		__veyonProtocolExt->handleMessage = handleVeyonMessage;

		rfbClientRegisterExtension( __veyonProtocolExt );
	}

	if (m_vncConn) {
		connect( m_vncConn, SIGNAL( newClient( rfbClient * ) ),
				this, SLOT( initNewClient( rfbClient * ) ),
				Qt::DirectConnection );
	}
}