Commit Graph

58 Commits (master)

Author SHA1 Message Date
Attila Fidan 115346f074 server: Support opening from a bound socket fd
Add a `struct nvnc* nvnc_open_from_fd(int fd)` function which takes an
existing connection-based socket file descriptor bound by the library
user or a parent process and just calls listen() on it, as an
alternative to letting neatvnc handle socket configuration.
2024-06-02 09:44:28 +00:00
Andri Yngvason 0e93aa969f Implement qemu/vmware LED state 2024-04-07 12:28:37 +00:00
Andri Yngvason f503cbef25 Replace nvnc_client_get_hostname with nvnc_client_get_address
This is a more accurate name for what is returned since
c76129b2d2.
2023-12-31 17:59:52 +00:00
Andri Yngvason 4691a35b7b logging: Add method to set thread local log function
This allows the user to override the log function in the current thread
without receiving log messages from concurrent tasks.
2023-12-26 11:58:35 +00:00
Andri Yngvason a7f6c50d6d logging: Export default log function
This allows users to intercept log messages without fully overriding the
default log handler.
2023-12-26 11:30:21 +00:00
Andri Yngvason d2c8ab0b6c Revert "Export base64 encoder and decoder"
There is currently no use for this.

This reverts commit c38f669e13.
2023-10-02 22:47:04 +00:00
Andri Yngvason 58d6dff5e5 API: Consolidate setup of security constraints 2023-09-29 21:53:20 +00:00
Andri Yngvason 74e9db19fd API: Add method to set RSA credentials 2023-09-29 21:53:20 +00:00
Andri Yngvason c38f669e13 Export base64 encoder and decoder 2023-09-29 21:53:20 +00:00
Andri Yngvason f90c628e66 Add temporary api function to enable auth without tls 2023-09-29 21:53:20 +00:00
Andri Yngvason 8847511596 Implement websocket 2023-04-07 12:47:49 +00:00
Philipp Zabel e19c9ad600 Implement desktop resizing
Implement minimal support for ExtendedDesktopSize pseudo-encoding
and SetDesktopSize client message.

The opaque nvnc_desktop_layout structure contains all information
from the SetDesktopSize client message.
2023-02-25 11:03:44 +00:00
Jim Ramsay 332be4d471 Add nvnc_client_close API
This allows the user or application to terminate any given nvnc_client
connection at any time.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-11-24 16:08:06 +00:00
Andri Yngvason 8f979c9928 Pass nvnc_client to cut-text callback 2022-11-20 22:42:01 +00:00
Andri Yngvason 79f26924ea Add functions for listing clients 2022-11-20 12:03:18 +00:00
Jim Ramsay 036b549fd8 Record authenticated username for each connected client
Signed-off-by: Jim Ramsay <jramsay@redhat.com>
2022-11-04 09:41:14 +00:00
Jim Ramsay 86bd2ced85 Record hostname for each connected client
Signed-off-by: Jim Ramsay <jramsay@redhat.com>
2022-11-04 09:41:14 +00:00
Andri Yngvason adef210252 fb-pool: Add setter for fb allocator 2022-10-29 18:40:02 +00:00
Philipp Zabel affd7f3f6d Allow to query client-side cursor support
Add a function nvnc_client_supports_cursor() to enable the API user to
make an informed decision whether nvnc_set_cursor() can be expected to
make the client draw the cursor, or whether it has to be rendered into
the framebuffer.
2022-07-29 08:37:29 +00:00
Andri Yngvason d18cc4fc57 Add constants for left and right scroll 2022-07-28 20:13:48 +00:00
Andri Yngvason 45da0fc157 Add simple logging system 2022-06-25 16:15:32 +00:00
Andri Yngvason 53f88894d5 Add presentation timestamps 2022-04-14 18:10:09 +00:00
Andri Yngvason aca09358ea Add back damage argument to nvnc_set_cursor
It's better to keep feeding buffers to keep buffers in rotation for damage
tracking purposes.
2022-02-21 21:43:41 +00:00
Andri Yngvason 1553c88f5e Add width and height arguments to nvnc_set_cursor 2022-02-19 23:06:15 +00:00
Andri Yngvason 48baf74560 Implement client side cursor rendering 2022-02-06 16:33:46 +00:00
Andri Yngvason e1ba4e1085 API: Add nvnc_fb_get_type 2021-12-26 13:10:41 +00:00
Andri Yngvason 02559a7f7e Re-sample transformed framebuffers 2021-09-19 20:12:30 +00:00
Andri Yngvason 691e835d1b fb: Add transform attribute 2021-09-19 19:56:56 +00:00
Andri Yngvason cf42f76f56 Add gbm_bo nvnc_fb type 2021-09-12 18:51:22 +00:00
Andri Yngvason dad1948e98 Remove nvnc_fb_flags 2021-09-05 00:46:24 +00:00
Andri Yngvason b75eeac03d Add API function for creating nvnc_fb from an pre-allocated buffer 2021-09-05 00:46:24 +00:00
Andri Yngvason 96886e21d5 Add a API function to get the pixel size of nvnc_fb 2021-09-05 00:46:24 +00:00
Andri Yngvason c7dd062498 Add a stride parameter to nvnc_fb 2021-09-05 00:46:24 +00:00
Andri Yngvason e8e4a9469a Remove damage checker
There's a much better one in wayvnc
2021-09-05 00:46:24 +00:00
Andri Yngvason 77d8efcbe3 fb_pool: Return true from resize when dimensions change 2021-09-04 21:21:23 +00:00
Andri Yngvason 1b7b51af44 Add a cleanup callback to nvnc_set_userdata 2021-09-04 21:21:23 +00:00
Andri Yngvason f5b0f508f0 fb: Use special context pointer for release callback 2021-09-04 21:21:23 +00:00
Andri Yngvason f566105ab5 Remove nvnc_set_render_fn 2021-09-04 21:21:23 +00:00
Andri Yngvason 981256d8d5 Add a buffer pool 2021-09-04 21:21:23 +00:00
Andri Yngvason 031555c85d fb: Add hold/release logic 2021-09-04 21:21:23 +00:00
Ryan Farley b320723049 Support UNIX sockets
Adds support for UNIX domain sockets with `nvnc_open_unix()` function.
Closes #1.
2021-04-04 20:24:33 +00:00
Andri Yngvason dbe35bc3ad Add qemu extended key events 2020-11-29 18:36:48 +00:00
Scott Moreau 6d29937e15 server: Add remaining support for simple copy/paste
- Add function to set callback for client_cut_text
- Add server_cut_text structure and function

This in conjunction with wayvnc #66 closes #4.
2020-09-21 21:15:45 +00:00
Andri Yngvason addcc50483 Bake version info into library 2020-07-26 11:43:29 +00:00
Andri Yngvason f3e09fd622 Prepare API for multi-display support
These changes are made now to make it possible to add multi-display
support in the future while keeping the public interface stable.
2020-04-12 18:16:19 +00:00
Andri Yngvason 737dd311a0 Remove nvnc_set_dimensions()
This information is now figured out based on the nvnc_fb passed into
nvnc_set_buffer()
2020-04-12 16:08:33 +00:00
Andri Yngvason 77b866096d Redesign framebuffer update loop
Rendering may now only happen inside the rendering callback. The user is
also allowed to change out the entire buffer in the callback.

The callback is triggered by nvnc_damage_region(), nvnc_damage_whole()
and/or framebuffer update requests.

This fixes #26
2020-04-07 23:35:57 +00:00
Andri Yngvason 8fc5c18b28 Don't show partial frames to new clients 2020-04-04 14:00:03 +00:00
Andri Yngvason f45f90ed9b nvnc_fb: Add a mechanism for signaling that a frame is in use 2020-04-04 12:33:18 +00:00
Andri Yngvason 61efca48f0 damage: Increment/decrement reference count before/after check
This is prudent. The user might throw away these buffers before the
damage check finishes.
2020-01-29 21:33:13 +00:00