comparison internal.h @ 6389:054de75e4a49 libavformat

Make parse_key_value from httpauth a common lavf internal function
author mstorsjo
date Thu, 19 Aug 2010 14:49:53 +0000
parents 3f938b3a355a
children 27242bd0812c
comparison
equal deleted inserted replaced
6388:8ba781dd8b2b 6389:054de75e4a49
190 */ 190 */
191 int ff_get_line(ByteIOContext *s, char *buf, int maxlen); 191 int ff_get_line(ByteIOContext *s, char *buf, int maxlen);
192 192
193 #define SPACE_CHARS " \t\r\n" 193 #define SPACE_CHARS " \t\r\n"
194 194
195 /**
196 * Callback function type for ff_parse_key_value.
197 *
198 * @param key a pointer to the key
199 * @param key_len the number of bytes that belong to the key, including the '='
200 * char
201 * @param dest return the destination pointer for the value in *dest, may
202 * be null to ignore the value
203 * @param dest_len the length of the *dest buffer
204 */
205 typedef void (*ff_parse_key_val_cb)(void *context, const char *key,
206 int key_len, char **dest, int *dest_len);
207 /**
208 * Parse a string with comma-separated key=value pairs. The value strings
209 * may be quoted and may contain escaped characters within quoted strings.
210 *
211 * @param str the string to parse
212 * @param callback_get_buf function that returns where to store the
213 * unescaped value string.
214 * @param context the opaque context pointer to pass to callback_get_buf
215 */
216 void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf,
217 void *context);
218
195 #endif /* AVFORMAT_INTERNAL_H */ 219 #endif /* AVFORMAT_INTERNAL_H */