libpurple/circbuffer.h

changeset 32787
7072f190d6ad
parent 20147
66f05a854eee
child 34529
68cf25486001
equal deleted inserted replaced
32786:fba34a7937d1 32787:7072f190d6ad
24 #ifndef _CIRCBUFFER_H 24 #ifndef _CIRCBUFFER_H
25 #define _CIRCBUFFER_H 25 #define _CIRCBUFFER_H
26 26
27 #include <glib.h> 27 #include <glib.h>
28 28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 typedef struct _PurpleCircBuffer { 29 typedef struct _PurpleCircBuffer {
34 30
35 /** A pointer to the starting address of our chunk of memory. */ 31 /** A pointer to the starting address of our chunk of memory. */
36 gchar *buffer; 32 gchar *buffer;
37 33
52 /** A pointer to the next byte of buffered data that should be 48 /** A pointer to the next byte of buffered data that should be
53 * read by the consumer. */ 49 * read by the consumer. */
54 gchar *outptr; 50 gchar *outptr;
55 51
56 } PurpleCircBuffer; 52 } PurpleCircBuffer;
53
54 G_BEGIN_DECLS
57 55
58 /** 56 /**
59 * Creates a new circular buffer. This will not allocate any memory for the 57 * Creates a new circular buffer. This will not allocate any memory for the
60 * actual buffer until data is appended to it. 58 * actual buffer until data is appended to it.
61 * 59 *
109 * @return TRUE if we successfully marked the bytes as having been read, FALSE 107 * @return TRUE if we successfully marked the bytes as having been read, FALSE
110 * otherwise. 108 * otherwise.
111 */ 109 */
112 gboolean purple_circ_buffer_mark_read(PurpleCircBuffer *buf, gsize len); 110 gboolean purple_circ_buffer_mark_read(PurpleCircBuffer *buf, gsize len);
113 111
114 #ifdef __cplusplus 112 G_END_DECLS
115 }
116 #endif
117 113
118 #endif /* _CIRCBUFFER_H */ 114 #endif /* _CIRCBUFFER_H */

mercurial