Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

fileinputstream.h File Reference

#include <stdio.h>

Go to the source code of this file.

Typedefs

typedef xmlcpgFILEINPUTSTREAM xmlcpgFileInputStream
 The file input stream declaration.


Functions

xmlcpgFileInputStreamxmlcpgnewFileInputStreamFILE (FILE *f)
 Creates a new file input stream with a FILE stream.

xmlcpgFileInputStreamxmlcpgnewFileInputStreamString (const char *name)
 Creates a new file input stream with a file name.

xmlcpgFileInputStreamxmlcpgnewFileInputStreamFD (int fd)
 Creates a new file input stream with a file descriptor.

void xmlcpgdeleteFileInputStream (xmlcpgFileInputStream *is)
 Destroys the file input stream.

int xmlcpgisFileInputStream (const xmlcpgFileInputStream *is)
 Tells if the the object is a file input stream.

int xmlcpggetFileInputStreamFD (const xmlcpgFileInputStream *is)
 Gets the file input stream file descriptor.

int xmlcpggetFileInputStreamEOS (const xmlcpgFileInputStream *is)
 Tests the end of stream indicator of the file input stream.

int xmlcpgreadFileInputStreamChar (xmlcpgFileInputStream *is)
 Reads a character from the file input stream.

int xmlcpgreadFileInputStream (xmlcpgFileInputStream *is, void *ptr, int nbytes)
 Reads some bytes of data into the location pointed by ptr.

int xmlcpgcloseFileInputStream (xmlcpgFileInputStream *is)
 Closes the file input stream.

int xmlcpggetFileInputStreamError (const xmlcpgFileInputStream *is)
 Tests the error indicator of the file input stream.

const char * xmlcpggetFileInputStreamErrorString (const xmlcpgFileInputStream *is)
 Gets the string describing the error.


Typedef Documentation

typedef struct xmlcpgFILEINPUTSTREAM xmlcpgFileInputStream
 

The file input stream declaration.


Function Documentation

int xmlcpgcloseFileInputStream xmlcpgFileInputStream   is
 

Closes the file input stream.

Parameters:
is  the file input stream.
Returns:
0 upon successful completion, -1 is returned otherwise.

void xmlcpgdeleteFileInputStream xmlcpgFileInputStream   is
 

Destroys the file input stream.

The stream must be closed before with the xmlcpgcloseFileInputStream function.

Parameters:
is  the file input stream.

int xmlcpggetFileInputStreamEOS const xmlcpgFileInputStream   is
 

Tests the end of stream indicator of the file input stream.

Parameters:
is  the file input stream.
Returns:
a non-zero if it is set or if is is not an file input stream.

int xmlcpggetFileInputStreamError const xmlcpgFileInputStream   is
 

Tests the error indicator of the file input stream.

Parameters:
is  the file input stream.
Returns:
a non-zero if an error occured.

const char* xmlcpggetFileInputStreamErrorString const xmlcpgFileInputStream   is
 

Gets the string describing the error.

Parameters:
is  the file input stream.
Returns:
the error string.

int xmlcpggetFileInputStreamFD const xmlcpgFileInputStream   is
 

Gets the file input stream file descriptor.

Parameters:
is  the file input stream.
Returns:
the file descriptor or -1 if is is not a file input stream or NULL.

int xmlcpgisFileInputStream const xmlcpgFileInputStream   is
 

Tells if the the object is a file input stream.

Parameters:
is  the file input stream.
Returns:
0 if is is NULL or not a file input stream, non-zero otherwise.

xmlcpgFileInputStream* xmlcpgnewFileInputStreamFD int    fd
 

Creates a new file input stream with a file descriptor.

Parameters:
fd  the file descriptor.
Returns:
the new file input stream or NULL otherwise.

xmlcpgFileInputStream* xmlcpgnewFileInputStreamFILE FILE *    f
 

Creates a new file input stream with a FILE stream.

Parameters:
f  the FILE stream.
Returns:
the new file input stream or NULL otherwise.

xmlcpgFileInputStream* xmlcpgnewFileInputStreamString const char *    name
 

Creates a new file input stream with a file name.

Parameters:
name  the file name.
Returns:
the new file input stream or NULL otherwise.

int xmlcpgreadFileInputStream xmlcpgFileInputStream   is,
void *    ptr,
int    nbytes
 

Reads some bytes of data into the location pointed by ptr.

Parameters:
is  the file input stream.
ptr  the location where to store the input.
nbytes  the number of bytes to read.
Returns:
the number of bytes read or 0 on end of stream or -1 on error.

int xmlcpgreadFileInputStreamChar xmlcpgFileInputStream   is
 

Reads a character from the file input stream.

Parameters:
is  the file input stream.
Returns:
the character cast to an int or -1 on end of stream or error.


Generated on Tue Nov 11 14:59:47 2003 for xmlcpg by doxygen1.2.18