[PATCH] wayland-private: comment wl_buffer functions

Marek Ch mchqwerty at gmail.com
Thu Dec 5 09:10:51 PST 2013


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



More information about the wayland-devel mailing list