summaryrefslogtreecommitdiff
path: root/main/php_streams.h
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-03-19 03:51:01 +0000
committerWez Furlong <wez@php.net>2002-03-19 03:51:01 +0000
commit06712a508a82965acbfa9a59eb8a55df11948acd (patch)
tree8cba8bb62ef4d06050d68170c64a9814d10d856c /main/php_streams.h
parent9e14ed02550d21443dc2467d7c16d2d8b5f709bd (diff)
downloadphp-git-06712a508a82965acbfa9a59eb8a55df11948acd.tar.gz
Implement user-space streams.
There's probably room for improvement, docs will following some time this week.
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-xmain/php_streams.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/main/php_streams.h b/main/php_streams.h
index 28f9e89794..4a46902536 100755
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -101,12 +101,13 @@ typedef struct _php_stream_ops {
} php_stream_ops;
/* options uses the IGNORE_URL family of defines from fopen_wrappers.h */
-typedef php_stream *(*php_stream_factory_func_t)(char *filename, char *mode, int options, char **opened_path STREAMS_DC TSRMLS_DC);
+typedef php_stream *(*php_stream_factory_func_t)(char *filename, char *mode, int options, char **opened_path, void * wrappercontext STREAMS_DC TSRMLS_DC);
typedef void (*php_stream_wrapper_dtor_func_t)(php_stream *stream TSRMLS_DC);
typedef struct _php_stream_wrapper {
php_stream_factory_func_t create;
php_stream_wrapper_dtor_func_t destroy;
+ void * wrappercontext;
} php_stream_wrapper;
struct _php_stream {
@@ -253,6 +254,7 @@ PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show
# define IGNORE_URL_WIN 0
#endif
+int php_init_user_streams(TSRMLS_D);
int php_init_stream_wrappers(TSRMLS_D);
int php_shutdown_stream_wrappers(TSRMLS_D);
PHPAPI int php_register_url_stream_wrapper(char *protocol, php_stream_wrapper *wrapper TSRMLS_DC);
@@ -268,6 +270,11 @@ PHPAPI php_stream *_php_stream_open_wrapper(char *path, char *mode, int options,
PHPAPI int _php_stream_make_seekable(php_stream *origstream, php_stream **newstream STREAMS_DC TSRMLS_DC);
#define php_stream_make_seekable(origstream, newstream) _php_stream_make_seekable(origstream, newstream STREAMS_CC TSRMLS_CC)
+
+/* for user-space streams */
+extern php_stream_ops php_stream_userspace_ops;
+#define PHP_STREAM_IS_USERSPACE &php_stream_userspace_ops
+
#endif
/*