Type Alias libvnc_sys::rfb::rfbClient
source · pub type rfbClient = _rfbClient;Aliased Type§
struct rfbClient {Show 94 fields
pub frameBuffer: *mut u8,
pub width: i32,
pub height: i32,
pub endianTest: i32,
pub appData: AppData,
pub programName: *const i8,
pub serverHost: *mut i8,
pub serverPort: i32,
pub listenSpecified: i8,
pub listenPort: i32,
pub flashPort: i32,
pub updateRect: _rfbClient__bindgen_ty_1,
pub buffer: [i8; 307200],
pub sock: i32,
pub canUseCoRRE: i8,
pub canUseHextile: i8,
pub desktopName: *mut i8,
pub format: rfbPixelFormat,
pub si: rfbServerInitMsg,
pub buf: [i8; 8192],
pub bufoutptr: *mut i8,
pub buffered: u32,
pub ultra_buffer_size: i32,
pub ultra_buffer: *mut i8,
pub raw_buffer_size: i32,
pub raw_buffer: *mut i8,
pub decompStream: z_stream_s,
pub decompStreamInited: i8,
pub zlib_buffer: [i8; 30000],
pub zlibStream: [z_stream_s; 4],
pub zlibStreamActive: [i8; 4],
pub cutZeros: i8,
pub rectWidth: i32,
pub rectColors: i32,
pub tightPalette: [i8; 1024],
pub tightPrevRow: [u8; 12288],
pub jpegError: i8,
pub jpegSrcManager: *mut jpeg_source_mgr,
pub jpegBufferPtr: *mut c_void,
pub jpegBufferLen: usize,
pub rcSource: *mut u8,
pub rcMask: *mut u8,
pub clientData: *mut rfbClientData,
pub vncRec: *mut rfbVNCRec,
pub KeyboardLedStateEnabled: i32,
pub CurrentKeyboardLedState: i32,
pub canHandleNewFBSize: i32,
pub HandleTextChat: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: *mut i8)>,
pub HandleKeyboardLedState: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32)>,
pub HandleCursorPos: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32) -> i8>,
pub SoftCursorLockArea: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32, _: i32, _: i32)>,
pub SoftCursorUnlockScreen: Option<unsafe extern "C" fn(_: *mut _rfbClient)>,
pub GotFrameBufferUpdate: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32, _: i32, _: i32)>,
pub GetPassword: Option<unsafe extern "C" fn(_: *mut _rfbClient) -> *mut i8>,
pub MallocFrameBuffer: Option<unsafe extern "C" fn(_: *mut _rfbClient) -> i8>,
pub GotXCutText: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: *const i8, _: i32)>,
pub Bell: Option<unsafe extern "C" fn(_: *mut _rfbClient)>,
pub GotCursorShape: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32, _: i32, _: i32, _: i32)>,
pub GotCopyRect: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32)>,
pub supportedMessages: rfbSupportedMessages,
pub major: i32,
pub minor: i32,
pub authScheme: u32,
pub subAuthScheme: u32,
pub tlsSession: *mut c_void,
pub GetCredential: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32) -> *mut _rfbCredential>,
pub clientAuthSchemes: *mut u32,
pub destHost: *mut i8,
pub destPort: i32,
pub QoS_DSCP: i32,
pub HandleXvpMsg: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: u8, _: u8)>,
pub listenSock: i32,
pub FinishedFrameBufferUpdate: Option<unsafe extern "C" fn(_: *mut _rfbClient)>,
pub listenAddress: *mut i8,
pub listen6Sock: i32,
pub listen6Address: *mut i8,
pub listen6Port: i32,
pub outputWindow: u64,
pub LockWriteToTLS: Option<unsafe extern "C" fn(_: *mut _rfbClient) -> i8>,
pub UnlockWriteToTLS: Option<unsafe extern "C" fn(_: *mut _rfbClient) -> i8>,
pub GotFillRect: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32, _: i32, _: i32, _: u32)>,
pub GotBitmap: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: *const u8, _: i32, _: i32, _: i32, _: i32)>,
pub GotJpeg: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: *const u8, _: i32, _: i32, _: i32, _: i32, _: i32) -> i8>,
pub saslconn: *mut sasl_conn,
pub saslDecoded: *const i8,
pub saslDecodedLength: u32,
pub saslDecodedOffset: u32,
pub saslSecret: *mut sasl_secret,
pub GetSASLMechanism: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: *mut i8) -> *mut i8>,
pub GetUser: Option<unsafe extern "C" fn(_: *mut _rfbClient) -> *mut i8>,
pub tjhnd: *mut c_void,
pub connectTimeout: u32,
pub readTimeout: u32,
pub tlsRwMutex: pthread_mutex_t,
}Fields§
§frameBuffer: *mut u8§width: i32§height: i32§endianTest: i32§appData: AppData§programName: *const i8§serverHost: *mut i8§serverPort: i32< if -1, then use file recorded by vncrec
listenSpecified: i8§listenPort: i32§flashPort: i32§updateRect: _rfbClient__bindgen_ty_1§buffer: [i8; 307200]§sock: i32§canUseCoRRE: i8§canUseHextile: i8§desktopName: *mut i8§format: rfbPixelFormat§si: rfbServerInitMsg§buf: [i8; 8192]§bufoutptr: *mut i8§buffered: u32§ultra_buffer_size: i32§ultra_buffer: *mut i8§raw_buffer_size: i32§raw_buffer: *mut i8§decompStream: z_stream_s§decompStreamInited: i8§zlib_buffer: [i8; 30000]§zlibStream: [z_stream_s; 4]§zlibStreamActive: [i8; 4]§cutZeros: i8§rectWidth: i32§rectColors: i32§tightPalette: [i8; 1024]§tightPrevRow: [u8; 12288]§jpegError: i8JPEG decoder state (obsolete– do not use).
jpegSrcManager: *mut jpeg_source_mgr§jpegBufferPtr: *mut c_void§jpegBufferLen: usize§rcSource: *mut u8Holds cursor shape data when received from server.
rcMask: *mut u8Holds cursor shape data when received from server.
clientData: *mut rfbClientDataprivate data pointer
vncRec: *mut rfbVNCRec§KeyboardLedStateEnabled: i32§CurrentKeyboardLedState: i32§canHandleNewFBSize: i32§HandleTextChat: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: *mut i8)>§HandleKeyboardLedState: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32)>§HandleCursorPos: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32) -> i8>§SoftCursorLockArea: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32, _: i32, _: i32)>§SoftCursorUnlockScreen: Option<unsafe extern "C" fn(_: *mut _rfbClient)>§GotFrameBufferUpdate: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32, _: i32, _: i32)>§GetPassword: Option<unsafe extern "C" fn(_: *mut _rfbClient) -> *mut i8>the pointer returned by GetPassword will be freed after use!
MallocFrameBuffer: Option<unsafe extern "C" fn(_: *mut _rfbClient) -> i8>§GotXCutText: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: *const i8, _: i32)>§Bell: Option<unsafe extern "C" fn(_: *mut _rfbClient)>§GotCursorShape: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32, _: i32, _: i32, _: i32)>§GotCopyRect: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32, _: i32, _: i32, _: i32, _: i32)>§supportedMessages: rfbSupportedMessagesWhich messages are supported by the server This is a guess for most servers. (If we can even detect the type of server)
If the server supports the “rfbEncodingSupportedMessages” then this will be updated when the encoding is received to accurately reflect the servers capabilities.
major: i32negotiated protocol version
minor: i32negotiated protocol version
authScheme: u32The selected security types
subAuthScheme: u32The selected security types
tlsSession: *mut c_voidThe TLS session for Anonymous TLS and VeNCrypt
GetCredential: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32) -> *mut _rfbCredential>To support security types that requires user input (except VNC password authentication), for example VeNCrypt and MSLogon, this callback function must be set before the authentication. Otherwise, it implicates that the caller application does not support it and related security types should be bypassed.
clientAuthSchemes: *mut u32The 0-terminated security types supported by the client. Set by function SetClientAuthSchemes()
destHost: *mut i8When the server is a repeater, this specifies the final destination
destPort: i32§QoS_DSCP: i32the QoS IP DSCP for this client
HandleXvpMsg: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: u8, _: u8)>hook to handle xvp server messages
listenSock: i32§FinishedFrameBufferUpdate: Option<unsafe extern "C" fn(_: *mut _rfbClient)>§listenAddress: *mut i8§listen6Sock: i32§listen6Address: *mut i8§listen6Port: i32§outputWindow: u64§LockWriteToTLS: Option<unsafe extern "C" fn(_: *mut _rfbClient) -> i8>These lock/unlock hooks are not used anymore. LibVNCClient will now use platform-specific synchronization library to protect concurrent TLS R/W.
@deprecated
UnlockWriteToTLS: Option<unsafe extern "C" fn(_: *mut _rfbClient) -> i8>§GotFillRect: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: i32, _: i32, _: i32, _: i32, _: u32)>Hooks for custom rendering
VNC rendering boils down to 3 activities:
- GotCopyRect: copy an area of the framebuffer
- GotFillRect: fill an area of the framebuffer with a solid color
- GotBitmap: copy the bitmap in the buffer into the framebuffer The client application should either set all three of these or none!
GotBitmap: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: *const u8, _: i32, _: i32, _: i32, _: i32)>§GotJpeg: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: *const u8, _: i32, _: i32, _: i32, _: i32, _: i32) -> i8>Hook for custom JPEG decoding and rendering
saslconn: *mut sasl_conn§saslDecoded: *const i8§saslDecodedLength: u32§saslDecodedOffset: u32§saslSecret: *mut sasl_secret§GetSASLMechanism: Option<unsafe extern "C" fn(_: *mut _rfbClient, _: *mut i8) -> *mut i8>§GetUser: Option<unsafe extern "C" fn(_: *mut _rfbClient) -> *mut i8>§tjhnd: *mut c_voidJPEG decoder state.
connectTimeout: u32§readTimeout: u32§tlsRwMutex: pthread_mutex_t