Add doc comment to wl_buffer_* functions --- src/wayland-private.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+)
diff --git a/src/wayland-private.h b/src/wayland-private.h index 70d338b..83398ed 100644 --- a/src/wayland-private.h +++ b/src/wayland-private.h @@ -102,10 +102,51 @@ struct wl_buffer { #ifdef UNIT_TEST struct iovec; +/** + * Put data into buffer + * + * @b: wl_buffer + * @data: pointer to the data to be stored + * @count: size of the data in bytes + */ void wl_buffer_put(struct wl_buffer *b, const void *data, size_t count); + +/** + * Set iovec field to point to free space in wl_buffer so that + * readv() operation can be used consequently. + * + * @b: wl_buffer + * @iov: iovec structure to be filled + * @count: how many iovec structures were set (max. 2) + * NOTE: this function only fills iovec structure, does not set head and tail + */ void wl_buffer_put_iov(struct wl_buffer *b, struct iovec *iov, int *count); + +/** + * Create iovec structure from wl_buffer. + * (Fill iovec so that it points to the data in wl_buffer). + * + * @b: wl_buffer + * @iov: iovec to be filled + * @count: number of iovec structures that were used (max. 2) + */ void wl_buffer_get_iov(struct wl_buffer *b, struct iovec *iov, int *count); + +/** + * Copy data from wl_buffer + * + * @b: wl_buffer + * @data: where to copy the data from buffer + * @count: size in bytes + * NOTE: this function only copies data, do not set head and tail + */ void wl_buffer_copy(struct wl_buffer *b, void *data, size_t count); + +/** + * Get size of data in wl_buffer + * + * @b: wl_buffer + */ uint32_t wl_buffer_size(struct wl_buffer *b); #endif /* UNIT_TEST */ -- 1.8.4.2 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel