From 1d8b3c0548782dcd7286fed6b31c17351c15bb50 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 12 Jan 2015 23:48:26 -0600 Subject: Add hooks to client library to ontain network and authentication status --- rfb/rfbclient.h | 4 ++++ rfb/rfbproto.h | 8 ++++++++ 2 files changed, 12 insertions(+) (limited to 'rfb') diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h index aedb4f4..f3700ae 100644 --- a/rfb/rfbclient.h +++ b/rfb/rfbclient.h @@ -169,6 +169,8 @@ typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client); typedef void (*GotFrameBufferUpdateProc)(struct _rfbClient* client, int x, int y, int w, int h); typedef void (*FinishedFrameBufferUpdateProc)(struct _rfbClient* client); typedef char* (*GetPasswordProc)(struct _rfbClient* client); +typedef void (*AuthenticationResultsProc)(struct _rfbClient* client, uint32_t authResult); +typedef void (*NetworkStatusProc)(struct _rfbClient* client, uint32_t errorCode); typedef rfbCredential* (*GetCredentialProc)(struct _rfbClient* client, int credentialType); typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client); typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen); @@ -292,6 +294,8 @@ typedef struct _rfbClient { GotFrameBufferUpdateProc GotFrameBufferUpdate; /** the pointer returned by GetPassword will be freed after use! */ GetPasswordProc GetPassword; + AuthenticationResultsProc AuthenticationResults; + NetworkStatusProc NetworkStatus; MallocFrameBufferProc MallocFrameBuffer; GotXCutTextProc GotXCutText; BellProc Bell; diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h index 4baae6d..4d6a1e6 100644 --- a/rfb/rfbproto.h +++ b/rfb/rfbproto.h @@ -126,6 +126,14 @@ typedef uint32_t in_addr_t; #define MAX_ENCODINGS 21 +#define rfbNetworkConnectionSuccess 0 +#define rfbNetworkRFBConnectionSuccess 1 +#define rfbNetworkConnectionClosed 2 +#define rfbNetworkConnectionFailed 3 +#define rfbNetworkNameResolutionFailed 4 +#define rfbNetworkRFBServerNotValid 5 +#define rfbNetworkRFBProtocolFailure 6 + /***************************************************************************** * * Structures used in several messages -- cgit v1.2.3