char-device: Update documentation reference

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Francesco Giudici <fgiudici@redhat.com>
This commit is contained in:
Frediano Ziglio 2020-06-24 17:18:43 +01:00
parent 3868e13bf3
commit ba065d1bdf

View File

@ -36,19 +36,19 @@ struct RedCharDeviceClientOpaque;
* How to use the api:
* ==================
* device attached: create new object instantiating a RedCharDevice child class
* device detached: call g_object_unref/red_char_device_reset
* device detached: unreference/RedCharDevice::reset
*
* client connected and associated with a device: red_char_device_client_add
* client disconnected: red_char_device_client_remove
* client connected and associated with a device: RedCharDevice::client_add
* client disconnected: RedCharDevice::client_remove
*
* Writing to the device
* ---------------------
* Write the data into RedCharDeviceWriteBuffer:
* call red_char_device_write_buffer_get_client/red_char_device_write_buffer_get_server
* call RedCharDevice::write_buffer_get_client/RedCharDevice::write_buffer_get_server
* in order to get an appropriate buffer.
* call red_char_device_write_buffer_add in order to push the buffer to the write queue.
* call RedCharDevice::write_buffer_add in order to push the buffer to the write queue.
* If you choose not to push the buffer to the device, call
* red_char_device_write_buffer_release
* RedCharDevice::write_buffer_release
*
* reading from the device
* -----------------------
@ -60,13 +60,13 @@ struct RedCharDeviceClientOpaque;
*
* calls triggered from the device (qemu):
* --------------------------------------
* red_char_device_start
* red_char_device_stop
* red_char_device_wakeup (for reading from the device)
* RedCharDevice::start
* RedCharDevice::stop
* RedCharDevice::wakeup (for reading from the device)
*/
/* refcounting is used to protect the char_dev from being deallocated in
* case g_object_unref has been called
* during a callback, and we might still access the char_dev afterwards.
* case object is unreferenced during a callback, and we might still access
* the char_dev afterwards.
*/