libpurple/circularbuffer.h

changeset 39380
3088866c22f4
parent 38715
98d5a19c04a9
child 39661
c8f98b167882
child 39975
f691f3812205
equal deleted inserted replaced
39369:16beed8a98fb 39380:3088866c22f4
48 /*< private >*/ 48 /*< private >*/
49 GObjectClass parent; 49 GObjectClass parent;
50 50
51 void (*grow)(PurpleCircularBuffer *buffer, gsize len); 51 void (*grow)(PurpleCircularBuffer *buffer, gsize len);
52 void (*append)(PurpleCircularBuffer *buffer, gconstpointer src, gsize len); 52 void (*append)(PurpleCircularBuffer *buffer, gconstpointer src, gsize len);
53 gsize (*max_read_size)(const PurpleCircularBuffer *buffer); 53 gsize (*max_read_size)(PurpleCircularBuffer *buffer);
54 gboolean (*mark_read)(PurpleCircularBuffer *buffer, gsize len); 54 gboolean (*mark_read)(PurpleCircularBuffer *buffer, gsize len);
55 55
56 void (*purple_reserved1)(void); 56 void (*purple_reserved1)(void);
57 void (*purple_reserved2)(void); 57 void (*purple_reserved2)(void);
58 void (*purple_reserved3)(void); 58 void (*purple_reserved3)(void);
98 * subsequent call after calling purple_circular_buffer_mark_read() may indicate 98 * subsequent call after calling purple_circular_buffer_mark_read() may indicate
99 * more data is available to read. 99 * more data is available to read.
100 * 100 *
101 * Returns: the number of bytes that can be read from the PurpleCircularBuffer 101 * Returns: the number of bytes that can be read from the PurpleCircularBuffer
102 */ 102 */
103 gsize purple_circular_buffer_get_max_read(const PurpleCircularBuffer *buffer); 103 gsize purple_circular_buffer_get_max_read(PurpleCircularBuffer *buffer);
104 104
105 /** 105 /**
106 * purple_circular_buffer_mark_read: 106 * purple_circular_buffer_mark_read:
107 * @buffer: The PurpleCircularBuffer to mark bytes read from 107 * @buffer: The PurpleCircularBuffer to mark bytes read from
108 * @len: The number of bytes to mark as read 108 * @len: The number of bytes to mark as read
131 * Returns the number of bytes by which the buffer grows when more space is 131 * Returns the number of bytes by which the buffer grows when more space is
132 * needed. 132 * needed.
133 * 133 *
134 * Returns: The grow size of the buffer. 134 * Returns: The grow size of the buffer.
135 */ 135 */
136 gsize purple_circular_buffer_get_grow_size(const PurpleCircularBuffer *buffer); 136 gsize purple_circular_buffer_get_grow_size(PurpleCircularBuffer *buffer);
137 137
138 /** 138 /**
139 * purple_circular_buffer_get_used: 139 * purple_circular_buffer_get_used:
140 * @buffer: The PurpleCircularBuffer from which to get used count. 140 * @buffer: The PurpleCircularBuffer from which to get used count.
141 * 141 *
142 * Returns the number of bytes of this buffer that contain unread data. 142 * Returns the number of bytes of this buffer that contain unread data.
143 * 143 *
144 * Returns: The number of bytes that contain unread data. 144 * Returns: The number of bytes that contain unread data.
145 */ 145 */
146 gsize purple_circular_buffer_get_used(const PurpleCircularBuffer *buffer); 146 gsize purple_circular_buffer_get_used(PurpleCircularBuffer *buffer);
147 147
148 /** 148 /**
149 * purple_circular_buffer_get_output: 149 * purple_circular_buffer_get_output:
150 * @buffer: The PurpleCircularBuffer from which to get the output pointer. 150 * @buffer: The PurpleCircularBuffer from which to get the output pointer.
151 * 151 *
154 * contiguous bytes that can be read from this output. After reading the data, 154 * contiguous bytes that can be read from this output. After reading the data,
155 * call purple_circular_buffer_mark_read() to mark the retrieved data as read. 155 * call purple_circular_buffer_mark_read() to mark the retrieved data as read.
156 * 156 *
157 * Returns: The output pointer for the buffer. 157 * Returns: The output pointer for the buffer.
158 */ 158 */
159 const gchar *purple_circular_buffer_get_output(const PurpleCircularBuffer *buffer); 159 const gchar *purple_circular_buffer_get_output(PurpleCircularBuffer *buffer);
160 160
161 /** 161 /**
162 * purple_circular_buffer_reset: 162 * purple_circular_buffer_reset:
163 * @buffer: The PurpleCircularBuffer to reset. 163 * @buffer: The PurpleCircularBuffer to reset.
164 * 164 *

mercurial