File: structs.xml

package info (click to toggle)
php-doc 20061001-1
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 45,764 kB
  • ctags: 1,611
  • sloc: xml: 502,485; php: 7,645; cpp: 500; makefile: 297; perl: 161; sh: 141; awk: 28
file content (206 lines) | stat: -rw-r--r-- 7,527 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- Author: Wez Furlong <wez@thebrainroom.com>
  Please contact me before making any major amendments to the
  content of this section.  Splitting/Merging are fine if they are
  required for php-doc restructuring purposes - just drop me a line
  if you make a change (so I can update my local copy).
-->

 <sect1 id="streams.structs">
  <title>Streams Structures</title>

  <refentry id="streams.struct-php-stream-statbuf">
   <refnamediv>
    <refname>struct php_stream_statbuf</refname>
    <refpurpose>Holds information about a file or URL</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <synopsis>
     <structname>php_stream_statbuf</structname>
     <type>struct stat</type> <structfield>sb</structfield>
     </synopsis>
    <para>
     <structfield>sb</structfield> is a regular, system defined, struct stat.
     </para>
   </refsect1>
  </refentry>

  <refentry id="streams.struct-php-stream-dirent">
   <refnamediv>
    <refname>struct php_stream_dirent</refname>
    <refpurpose>Holds information about a single file during dir scanning</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <synopsis>
     <structname>php_stream_dirent</structname>
     <type>char</type> <structfield>d_name[MAXPATHLEN]</structfield>
     </synopsis>
    <para>
     <structfield>d_name</structfield> holds the name of the file, relative to the directory
     being scanned.
     </para>
   </refsect1>
  </refentry>
 
  <refentry id="streams.struct-php-stream-ops">
    <refnamediv>
        <refname>struct php_stream_ops</refname>
        <refpurpose>Holds member functions for a stream implementation</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
     <programlisting role="c">
<![CDATA[
        typedef struct _php_stream_ops {
             /* all streams MUST implement these operations */
             size_t (*write)(php_stream *stream, const char *buf, size_t count TSRMLS_DC);
             size_t (*read)(php_stream *stream, char *buf, size_t count TSRMLS_DC);
             int (*close)(php_stream *stream, int close_handle TSRMLS_DC);
             int (*flush)(php_stream *stream TSRMLS_DC);
             
             const char *label; /* name describing this class of stream */
             
             /* these operations are optional, and may be set to NULL if the stream does not
              * support a particular operation */
            int (*seek)(php_stream *stream, off_t offset, int whence TSRMLS_DC);
            char *(*gets)(php_stream *stream, char *buf, size_t size TSRMLS_DC);
            int (*cast)(php_stream *stream, int castas, void **ret TSRMLS_DC);
            int (*stat)(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC);
        } php_stream_ops;
]]>
     </programlisting>
    </refsect1>
  </refentry>
  <refentry id="streams.struct-php-stream-wrapper">
    <refnamediv>
        <refname>struct php_stream_wrapper</refname>
        <refpurpose>Holds wrapper properties and pointer to operations</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
     <programlisting role="c">
<![CDATA[
        struct _php_stream_wrapper  {
            php_stream_wrapper_ops *wops;   /* operations the wrapper can perform */
            void *abstract;                 /* context for the wrapper */
            int is_url;                     /* so that PG(allow_url_fopen) can be respected */

            /* support for wrappers to return (multiple) error messages to the stream opener */
            int err_count;
            char **err_stack;
        } php_stream_wrapper;
]]>
     </programlisting>
    </refsect1>
  </refentry>
  <refentry id="streams.struct-php-stream-wrapper-ops">
    <refnamediv>
        <refname>struct php_stream_wrapper_ops</refname>
        <refpurpose>Holds member functions for a stream wrapper implementation</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
     <programlisting role="c">
<![CDATA[
        typedef struct _php_stream_wrapper_ops {
            /* open/create a wrapped stream */
            php_stream *(*stream_opener)(php_stream_wrapper *wrapper, char *filename, char *mode,
                    int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);
            /* close/destroy a wrapped stream */
            int (*stream_closer)(php_stream_wrapper *wrapper, php_stream *stream TSRMLS_DC);
            /* stat a wrapped stream */
            int (*stream_stat)(php_stream_wrapper *wrapper, php_stream *stream, php_stream_statbuf *ssb TSR$
            /* stat a URL */
            int (*url_stat)(php_stream_wrapper *wrapper, char *url, php_stream_statbuf *ssb TSRMLS_DC);
            /* open a "directory" stream */
            php_stream *(*dir_opener)(php_stream_wrapper *wrapper, char *filename, char *mode,
                    int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC);

            const char *label;

            /* Delete/Unlink a file */
            int (*unlink)(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC);
        } php_stream_wrapper_ops;
]]>
     </programlisting>
    </refsect1>
  </refentry>
  <refentry id="streams.struct-php-stream-filter">
    <refnamediv>
        <refname>struct php_stream_filter</refname>
        <refpurpose>Holds filter properties and pointer to operations</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
     <programlisting role="c">
<![CDATA[
        struct _php_stream_filter {
            php_stream_filter_ops *fops;
            void *abstract; /* for use by filter implementation */
            php_stream_filter *next;
            php_stream_filter *prev;
            int is_persistent;

            /* link into stream and chain */
            php_stream_filter_chain *chain;

            /* buffered buckets */
            php_stream_bucket_brigade buffer;
        } php_stream_filter;
]]>
     </programlisting>
    </refsect1>
  </refentry>
  <refentry id="streams.struct-php-stream-filter-ops">
    <refnamediv>
        <refname>struct php_stream_filter_ops</refname>
        <refpurpose>Holds member functions for a stream filter implementation</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
     <programlisting role="c">
<![CDATA[
        typedef struct _php_stream_filter_ops {
            php_stream_filter_status_t (*filter)(
                    php_stream *stream,
                    php_stream_filter *thisfilter,
                    php_stream_bucket_brigade *buckets_in,
                    php_stream_bucket_brigade *buckets_out,
                    size_t *bytes_consumed,
                    int flags
                    TSRMLS_DC);

            void (*dtor)(php_stream_filter *thisfilter TSRMLS_DC);

            const char *label;
} php_stream_filter_ops;
]]>
     </programlisting>
    </refsect1>
  </refentry>
 </sect1>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->