rename info tests
[m6w6/ext-http] / php_http_strlist.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: http |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2014, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13 #ifndef PHP_HTTP_STRLIST_H
14 #define PHP_HTTP_STRLIST_H
15
16 #ifdef NUL
17 # undef NUL
18 #endif
19 #define NUL "\0"
20
21 #define PHP_HTTP_STRLIST(name) const char name[]
22 #define PHP_HTTP_STRLIST_ITEM(item) item NUL
23 #define PHP_HTTP_STRLIST_NEXT NUL
24 #define PHP_HTTP_STRLIST_STOP NUL NUL
25
26 PHP_HTTP_API const char *php_http_strlist_find(const char list[], unsigned factor, unsigned item);
27
28 typedef struct php_http_strlist_iterator {
29 const char *p;
30 unsigned factor, major, minor;
31 } php_http_strlist_iterator_t;
32
33 PHP_HTTP_API php_http_strlist_iterator_t *php_http_strlist_iterator_init(php_http_strlist_iterator_t *iter, const char list[], unsigned factor);
34 PHP_HTTP_API const char *php_http_strlist_iterator_this(php_http_strlist_iterator_t *iter, unsigned *id);
35 PHP_HTTP_API const char *php_http_strlist_iterator_next(php_http_strlist_iterator_t *iter);
36 PHP_HTTP_API void php_http_strlist_iterator_dtor(php_http_strlist_iterator_t *iter);
37 PHP_HTTP_API void php_http_strlist_iterator_free(php_http_strlist_iterator_t **iter);
38
39 #endif /* PHP_HTTP_STRLIST_H */
40
41 /*
42 * Local variables:
43 * tab-width: 4
44 * c-basic-offset: 4
45 * End:
46 * vim600: noet sw=4 ts=4 fdm=marker
47 * vim<600: noet sw=4 ts=4
48 */
49