diff options
Diffstat (limited to 'rfb/rfbclient.h')
-rw-r--r-- | rfb/rfbclient.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h index 72e7a5a..053bd42 100644 --- a/rfb/rfbclient.h +++ b/rfb/rfbclient.h @@ -52,6 +52,10 @@ #include <rfb/rfbproto.h> #include <rfb/keysym.h> +#ifdef LIBVNCSERVER_HAVE_SASL +#include <sasl/sasl.h> +#endif /* LIBVNCSERVER_HAVE_SASL */ + #define rfbClientSwap16IfLE(s) \ (*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s)) @@ -197,6 +201,11 @@ typedef rfbBool (*GotJpegProc)(struct _rfbClient* client, const uint8_t* buffer, typedef rfbBool (*LockWriteToTLSProc)(struct _rfbClient* client); typedef rfbBool (*UnlockWriteToTLSProc)(struct _rfbClient* client); +#ifdef LIBVNCSERVER_HAVE_SASL +typedef char* (*GetUserProc)(struct _rfbClient* client); +typedef char* (*GetSASLMechanismProc)(struct _rfbClient* client, char* mechlist); +#endif /* LIBVNCSERVER_HAVE_SASL */ + typedef struct _rfbClient { uint8_t* frameBuffer; int width, height; @@ -391,6 +400,20 @@ typedef struct _rfbClient { GotBitmapProc GotBitmap; /** Hook for custom JPEG decoding and rendering */ GotJpegProc GotJpeg; + +#ifdef LIBVNCSERVER_HAVE_SASL + sasl_conn_t *saslconn; + const char *saslDecoded; + unsigned int saslDecodedLength; + unsigned int saslDecodedOffset; + sasl_secret_t *saslSecret; + + /* Callback to allow the client to choose a preferred mechanism. The string returned will + be freed once no longer required. */ + GetSASLMechanismProc GetSASLMechanism; + GetUserProc GetUser; + +#endif /* LIBVNCSERVER_HAVE_SASL */ } rfbClient; /* cursor.c */ |