diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-07-30 15:15:59 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-07-30 15:15:59 +0530 |
commit | d335baac87c2c59796a543fc2df44e2db33f5e8e (patch) | |
tree | 4bb38fadb157887c4dec1c08b4a55afa35e51a68 /src/include/gnunet_buffer_lib.h | |
parent | 740355cd63dcd248d7cfd75129dc67e7667ecfe9 (diff) | |
download | gnunet-d335baac87c2c59796a543fc2df44e2db33f5e8e.tar.gz gnunet-d335baac87c2c59796a543fc2df44e2db33f5e8e.zip |
implement GNUNET_buffer_write_data_encoded
Diffstat (limited to 'src/include/gnunet_buffer_lib.h')
-rw-r--r-- | src/include/gnunet_buffer_lib.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/gnunet_buffer_lib.h b/src/include/gnunet_buffer_lib.h index e09ec130a..046aee72b 100644 --- a/src/include/gnunet_buffer_lib.h +++ b/src/include/gnunet_buffer_lib.h | |||
@@ -110,6 +110,21 @@ GNUNET_buffer_write_str (struct GNUNET_Buffer *buf, const char *str); | |||
110 | 110 | ||
111 | 111 | ||
112 | /** | 112 | /** |
113 | * Write data encoded via #GNUNET_STRINGS_data_to_string to the buffer. | ||
114 | * | ||
115 | * Grows the buffer if necessary. | ||
116 | * | ||
117 | * @param buf buffer to write to | ||
118 | * @param data data to read from | ||
119 | * @param len number of bytes to copy from @a data to @a buf | ||
120 | */ | ||
121 | void | ||
122 | GNUNET_buffer_write_data_encoded (struct GNUNET_Buffer *buf, | ||
123 | const char *data, | ||
124 | size_t len); | ||
125 | |||
126 | |||
127 | /** | ||
113 | * Write a path component to a buffer, ensuring that | 128 | * Write a path component to a buffer, ensuring that |
114 | * there is exactly one slash between the previous contents | 129 | * there is exactly one slash between the previous contents |
115 | * of the buffer and the new string. | 130 | * of the buffer and the new string. |