class FileCast

Class representing output to a local file. More...

Definition#include <FileCast.h>
InheritsCastSink [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Private Methods

Private Members


Detailed Description

Class representing output to a local file.

Ref<FileSink> targetFile

targetFile

[private]

inline void  init ( FileSink * targetFile )
throw ( Exception )

init

[private]

Initalize the object.

Parameters:
targetFilethe file to send the encoded data to.

Throws: Exception

Reimplemented from CastSink.

inline void  strip ( void )
throw ( Exception )

strip

[private]

De-initalize the object.

Throws: Exception

Reimplemented from CastSink.

inline  FileCast ( void )
throw ( Exception )

FileCast

[protected]

Default constructor. Always throws an Exception.

Throws: Exception

inline bool  sendLogin ( void )
throw ( Exception )

sendLogin

[protected virtual]

Log in to the server using the socket avialable. No need to log in to a file.

Returns: true if login was successful, false otherwise.

Throws: Exception

Reimplemented from CastSink.

inline  FileCast ( FileSink * targetFile )
throw ( Exception )

FileCast

Constructor.

Parameters:
targetFilethe file to send all the data to.

Throws: Exception

inline  FileCast ( const FileCast & cs )
throw ( Exception )

FileCast

Copy constructor.

Parameters:
csthe FileCast to copy.

inline  ~FileCast ( void )
throw ( Exception )

~FileCast

[virtual]

Destructor.

Throws: Exception

inline FileCast &  operator= ( const FileCast & cs )
throw ( Exception )

operator=

[virtual]

Assignment operator.

Parameters:
csthe FileCast to assign this to.

Returns: a reference to this FileCast.

Throws: Exception

Reimplemented from CastSink.

bool  open ( void )
throw ( Exception )

open

[virtual]

Open the FileCast.

Returns: true if opening was successfull, false otherwise.

Throws: Exception

Reimplemented from CastSink.

inline bool  isOpen ( void )
throw ()

isOpen

[const virtual]

Check if the FileCast is open.

Returns: true if the FileCast is open, false otherwise.

Reimplemented from CastSink.

inline bool  canWrite ( unsigned int sec, unsigned int usec )
throw ( Exception )

canWrite

[virtual]

Check if the FileCast is ready to accept data. Blocks until the specified time for data to be available.

Parameters:
secthe maximum seconds to block.
usecmicro seconds to block after the full seconds.

Returns: true if the FileCast is ready to accept data, false otherwise.

Throws: Exception

Reimplemented from CastSink.

inline unsigned int  write ( const void * buf, unsigned int len )
throw ( Exception )

write

[virtual]

Write data to the FileCast.

Parameters:
bufthe data to write.
lennumber of bytes to write from buf.

Returns: the number of bytes written (may be less than len).

Throws: Exception

Reimplemented from CastSink.

inline void  flush ( void )
throw ( Exception )

flush

[virtual]

Flush all data that was written to the FileCast to the server.

Throws: Exception

Reimplemented from CastSink.

inline void  close ( void )
throw ( Exception )

close

[virtual]

Close the FileCast.

Throws: Exception

Reimplemented from CastSink.