2015-09-23 23:46:47 +00:00
|
|
|
/********************************************************************
|
|
|
|
* vncsession.h - functions for establishing connection to VNC server
|
2015-09-24 01:26:03 +00:00
|
|
|
* and communicating with it
|
2015-09-23 23:46:47 +00:00
|
|
|
********************************************************************/
|
|
|
|
|
|
|
|
#include <types.h>
|
|
|
|
|
|
|
|
#define RFBVERSIONSTR "RFB 003.003\n"
|
|
|
|
#define RFBMAJORVERSIONSTR "003"
|
|
|
|
|
2015-09-24 01:26:03 +00:00
|
|
|
#define SwapBytes2(x) (((unsigned int)x << 8) | ((unsigned int)x >> 8))
|
2015-09-23 23:46:47 +00:00
|
|
|
#define SwapBytes4(x) (((unsigned long)x << 24) | \
|
2015-09-24 01:26:03 +00:00
|
|
|
((unsigned long)x >> 24) | \
|
|
|
|
(((unsigned long)x & 0x0000FF00) << 8) | \
|
|
|
|
(((unsigned long)x & 0x00FF0000) >> 8))
|
2015-09-23 23:46:47 +00:00
|
|
|
|
|
|
|
extern GrafPortPtr connectStatusWindowPtr;
|
|
|
|
|
|
|
|
extern void ** readBufferHndl;
|
|
|
|
|
|
|
|
extern unsigned int hostIpid;
|
|
|
|
|
|
|
|
extern void DisplayConnectStatus(char *, BOOLEAN);
|
|
|
|
|
|
|
|
extern void DoConnect (void);
|
2016-05-29 02:59:35 +00:00
|
|
|
|
|
|
|
#define DoneWithReadBuffer() do \
|
|
|
|
if (readBufferHndl) { \
|
|
|
|
DisposeHandle(readBufferHndl); \
|
|
|
|
readBufferHndl = NULL; \
|
|
|
|
} while (0) \
|
|
|
|
|
2015-09-23 23:46:47 +00:00
|
|
|
extern BOOLEAN DoReadTCP (unsigned long);
|
|
|
|
extern BOOLEAN DoWaitingReadTCP(unsigned long);
|
2016-09-05 21:48:38 +00:00
|
|
|
extern unsigned DoReadMultipleTCP(unsigned recLen, unsigned maxN);
|
2015-09-23 23:46:47 +00:00
|
|
|
extern void CloseTCPConnection (void);
|