Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

InFile Class Reference
[Test - Command line program incorporating Y-Modem source]

Inheritance diagram for InFile:

YModemTx::InStream List of all members.

Detailed Description

Class for presenting a file as a input stream.

Definition at line 377 of file ymodem_main.cpp.

Public Member Functions

 InFile ()
int Open (const char *fileName)
void Close ()
size_t Size ()
int In (uint8_t *data, size_t size)

Private Attributes

FILE * File
size_t TotalSize
size_t TransferredSize


Member Function Documentation

int InFile::Open const char *  fileName  ) 
 

Open stream for reading a file.

Parameters:
fileName Name of the file to read.
Returns:
Zero if successful, or a negative error value if failed.

Definition at line 392 of file ymodem_main.cpp.

void InFile::Close  ) 
 

Close the stream.

Definition at line 416 of file ymodem_main.cpp.

size_t InFile::Size  ) 
 

Return the size of the file.

Returns:
File size.

Definition at line 430 of file ymodem_main.cpp.

int InFile::In uint8_t data,
size_t  size
[virtual]
 

Read data from the stream.

Parameters:
[out] data Pointer to buffer to hold data read from stream.
size Maximum size of data to read.
Returns:
Zero if successful, or a negative error value if failed.

Implements YModemTx::InStream.

Definition at line 443 of file ymodem_main.cpp.


The documentation for this class was generated from the following file:
Generated by  doxygen 1.4.4