2 +--------------------------------------------------------------------+
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-2011, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
13 #ifndef PHP_HTTP_STRLIST_H
14 #define PHP_HTTP_STRLIST_H
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
26 PHP_HTTP_API
const char *php_http_strlist_find(const char list
[], unsigned factor
, unsigned item
);
28 typedef struct php_http_strlist_iterator
{
30 unsigned factor
, major
, minor
;
31 } php_http_strlist_iterator_t
;
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
);
39 #endif /* PHP_HTTP_STRLIST_H */
46 * vim600: noet sw=4 ts=4 fdm=marker
47 * vim<600: noet sw=4 ts=4