Simias::Sync::InFile Class Reference

Class to handle files that are being imported. More...

Inheritance diagram for Simias::Sync::InFile:

Inheritance graph
[legend]
Collaboration diagram for Simias::Sync::InFile:

Collaboration graph
[legend]

List of all members.

Public Member Functions

int Read (byte[] buffer, int offset, int count)
 Reads data into the buffer.
void Write (Stream stream, int count)
 Writes data from buffer into file.
int Write (Stream stream, int count, int actualCount, string encryptionAlgorithm, string encryptionKey)
 Writes data from buffer into file.
void Copy (long originalOffset, long offset, int count)
 Copyt the data from the original file into the new file.
void SetLength (long length)
 Set the Length of the file.
void CheckAndResolveNodeConflict (out string removeNodeToserver)
 Delete the node if the file names are same and node ID is different.

Protected Member Functions

 InFile (Collection collection)
 Constructs an InFile object.
void Open (BaseFileNode node)
 Called to open the file.
void Close (bool commit)
 Called to close the file and cleanup resources.

Protected Attributes

BaseFileNode oldNode
 The Old Node if it exists.

Properties

StreamStream inStream [get]
 Get the stream.
FileStream ReadStream [get]
 Gets the original stream.
long ReadPosition [get, set]
 Gets or Sets the file position.
long WritePosition [get, set]
 Gets or Sets the file position.
long Length [get]
 Gets the length of the stream.
long LocalFileLength [get]
 Gets the length of the local file stream.


Detailed Description

Class to handle files that are being imported.


Constructor & Destructor Documentation

Simias::Sync::InFile::InFile ( Collection  collection  )  [inline, protected]

Constructs an InFile object.

Parameters:
collection The collection that the node belongs to.


Member Function Documentation

int Simias::Sync::InFile::Read ( byte[]  buffer,
int  offset,
int  count 
) [inline]

Reads data into the buffer.

Parameters:
buffer The buffer to read into.
offset The offset in the buffer to read into.
count The number of bytes to read.
Returns:

void Simias::Sync::InFile::Write ( Stream  stream,
int  count 
) [inline]

Writes data from buffer into file.

Parameters:
stream The stream to write.
count The number of bytes to write.

int Simias::Sync::InFile::Write ( Stream  stream,
int  count,
int  actualCount,
string  encryptionAlgorithm,
string  encryptionKey 
) [inline]

Writes data from buffer into file.

Parameters:
stream The stream to write.
count The number of bytes to write.
count The encryption Key.

void Simias::Sync::InFile::Copy ( long  originalOffset,
long  offset,
int  count 
) [inline]

Copyt the data from the original file into the new file.

Parameters:
originalOffset The offset in the original file to copy from.
offset The offset in the file where the data is to be written.
count The number of bytes to write.

void Simias::Sync::InFile::SetLength ( long  length  )  [inline]

Set the Length of the file.

Parameters:
length The size to set.

void Simias::Sync::InFile::Open ( BaseFileNode  node  )  [inline, protected]

Called to open the file.

Parameters:
node The node that represents the file.

void Simias::Sync::InFile::Close ( bool  commit  )  [inline, protected]

Called to close the file and cleanup resources.

Reimplemented in Simias::Sync::HttpClientInFile, and Simias::Sync::ServerInFile.

void Simias::Sync::InFile::CheckAndResolveNodeConflict ( out string  removeNodeToserver  )  [inline]

Delete the node if the file names are same and node ID is different.

<param

Returns:
bool.

This may result into file conflict if both name (server and client) macth in case insensitive compare If so it will result into name conflict isLocalNodeAvailable = false; //not required sinc ethe default value is false

do a case sensitive compare, case insensitive names will be considered as a name conflict in CheckFileNameConflict()


Member Data Documentation

The Old Node if it exists.


Property Documentation

StreamStream Simias::Sync::InFile::inStream [get]

Get the stream.

FileStream Simias::Sync::InFile::ReadStream [get]

Gets the original stream.

long Simias::Sync::InFile::ReadPosition [get, set]

Gets or Sets the file position.

long Simias::Sync::InFile::WritePosition [get, set]

Gets or Sets the file position.

long Simias::Sync::InFile::Length [get]

Gets the length of the stream.

long Simias::Sync::InFile::LocalFileLength [get]

Gets the length of the local file stream.


The documentation for this class was generated from the following file:

Generated on Wed Apr 8 14:57:31 2009 for simias by  doxygen 1.5.6