GMime 2.4 Reference Manual | ||||
---|---|---|---|---|
GMimeStreamFile; GMimeStream* g_mime_stream_file_new (FILE *fp); GMimeStream* g_mime_stream_file_new_with_bounds (FILE *fp, gint64 start, gint64 end); gboolean g_mime_stream_file_get_owner (GMimeStreamFile *stream); void g_mime_stream_file_set_owner (GMimeStreamFile *stream, gboolean owner);
A simple GMimeStream implementation that sits on top of the Standard C FILE pointer based I/O layer. Unlike GMimeStreamFs, a GMimeStreamFile will typically buffer read and write operations at the FILE level and so it may be wasteful to wrap one in a GMimeStreamBuffer stream.
typedef struct _GMimeStreamFile GMimeStreamFile;
A GMimeStream wrapper around standard-c FILE pointers.
GMimeStream* g_mime_stream_file_new (FILE *fp);
Creates a new GMimeStreamFile object around fp
.
Note: The created GMimeStreamFile object will own the FILE pointer passed in.
|
file pointer |
Returns : |
a stream using fp .
|
GMimeStream* g_mime_stream_file_new_with_bounds (FILE *fp, gint64 start, gint64 end);
Creates a new GMimeStreamFile object around fp
with bounds start
and end
.
Note: The created GMimeStreamFile object will own the FILE pointer passed in.
|
file pointer |
|
start boundary |
|
end boundary |
Returns : |
a stream using fp with bounds start and end .
|
gboolean g_mime_stream_file_get_owner (GMimeStreamFile *stream);
Gets whether or not stream
owns the backend FILE pointer.
|
file stream |
Returns : |
TRUE if stream owns the backend FILE pointer or FALSE
otherwise.
|
void g_mime_stream_file_set_owner (GMimeStreamFile *stream, gboolean owner);
Sets whether or not stream
owns the backend FILE pointer.
Note: owner
should be TRUE
if the stream should fclose()
the
backend FILE pointer when destroyed or FALSE
otherwise.
|
file stream |
|
owner |