Mercurial > pidgin
comparison libpurple/circbuffer.h @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
| author | Elliott Sales de Andrade <qulogic@pidgin.im> |
|---|---|
| date | Sat, 02 Jun 2012 02:30:49 +0000 |
| parents | 98520ee78f12 |
| children |
comparison
equal
deleted
inserted
replaced
| 32818:01ff09d4a463 | 32819:2c6510167895 |
|---|---|
| 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 */ |
