![]() |
![]() |
![]() |
Camel Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
struct CamelStream;gssize camel_stream_read (CamelStream *stream
,,
gchar *buffer,
gsize n,
GCancellable *cancellable);
GError **errorgssize camel_stream_write (CamelStream *stream
,const
,gchar *buffer,
gsize n,
GCancellable *cancellable);
GError **errorgint camel_stream_flush (CamelStream *stream
,,
GCancellable *cancellable);
GError **errorgint camel_stream_close (CamelStream *stream
,,
GCancellable *cancellable);
GError **errorgboolean camel_stream_eos (CamelStream *stream
);gssize camel_stream_write_string (CamelStream *stream
,const
,gchar *string,
GCancellable *cancellable);
GError **errorgssize camel_stream_write_to_stream (CamelStream *stream
,CamelStream *output_stream
,,
GCancellable *cancellable);
GError **error
GObject +----CamelObject +----CamelStream +----CamelHttpStream +----CamelStreamBuffer +----CamelStreamFilter +----CamelStreamFs +----CamelStreamMem +----CamelStreamNull +----CamelStreamProcess +----CamelStreamVFS +----CamelTcpStream
gssize camel_stream_read (CamelStream *stream
,,
gchar *buffer,
gsize n,
GCancellable *cancellable);
GError **error
Attempts to read up to len
bytes from stream
into buf
.
|
a CamelStream object. |
|
output buffer |
|
max number of bytes to read. |
|
optional NULL |
|
return location for a NULL |
Returns : |
the number of bytes actually read, or -1 |
gssize camel_stream_write (CamelStream *stream
,const
,gchar *buffer,
gsize n,
GCancellable *cancellable);
GError **error
Attempts to write up to n
bytes of buffer
into stream
.
|
a CamelStream object |
|
buffer to write. |
|
number of bytes to write |
|
optional NULL |
|
return location for a NULL |
Returns : |
the number of bytes written to the stream, or -1 |
gint camel_stream_flush (CamelStream *stream
,,
GCancellable *cancellable);
GError **error
Flushes any buffered data to the stream's backing store. Only meaningful for writable streams.
|
a CamelStream object |
|
optional NULL |
|
return location for a NULL |
Returns : |
0 -1 error
|
gint camel_stream_close (CamelStream *stream
,,
GCancellable *cancellable);
GError **error
Closes the stream.
|
a CamelStream object |
|
optional NULL |
|
return location for a NULL |
Returns : |
0 -1 |
gboolean camel_stream_eos (CamelStream *stream
);
Tests if there are bytes left to read on the stream
object.
|
a CamelStream object |
Returns : |
TRUE FALSE |
gssize camel_stream_write_string (CamelStream *stream
,const
,gchar *string,
GCancellable *cancellable);
GError **error
Writes the string to the stream.
|
a CamelStream object |
|
a string |
|
return location for a NULL |
Returns : |
the number of characters written or -1 |
gssize camel_stream_write_to_stream (CamelStream *stream
,CamelStream *output_stream
,,
GCancellable *cancellable);
GError **error
Write all of a stream (until eos) into another stream, in a blocking fashion.
|
source CamelStream object |
|
destination CamelStream object |
|
optional NULL |
|
return location for a NULL |
Returns : |
-1 |