Simias::Sync::Http::HttpSyncProxy Class Reference

Class used to talk to the HTTP SyncService (SyncHandler.ashx.cs). More...

Collaboration diagram for Simias::Sync::Http::HttpSyncProxy:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 HttpSyncProxy (Collection collection, string userName, string userID)
void ResetConnection ()
 Reset the established connection.
string SyncEngineVersion ()
 Returns the string format of the SyncEngineVersion In future we may want to return Major and Minor seperately.
void StartSync (ref StartSyncInfo si)
 Start a sync pass.
SyncNodeInfo[] GetNextInfoList (out string context)
 Returns the next set of NodeInfos.
SyncNodeStatus[] PutNodes (SyncNode[] nodes)
 Sync the supplied nodes to the server.
SyncNode[] GetNodes (string[] nids)
 Download the nodes from the server.
SyncNodeStatus[] PutDirs (SyncNode[] nodes)
 Sync the Directory nodes to the server.
SyncNode[] GetDirs (string[] nids)
 Download the Directory nodes from the server.
SyncNodeStatus[] DeleteNodes (string[] nodeIDs)
 Delete the nodes on the server.
SyncStatus OpenFilePut (SyncNode node)
 Opens the file to sync up to the server.
SyncNode OpenFileGet (string nodeID)
 Opens the file to sync down from the server.
HashData[] GetHashMap (out int blockSize)
 Get the HashMap for the opened file.
HttpWebResponse ReadFile (DownloadSegment seg, int blockSize)
 Reads the specified blocks from the server.
void WriteFile (StreamStream stream, long offset, int count, string encryptionAlgorithm, string EncryptionKey)
 Write the file data to the server.
void PutHashMap (FileStream mapStream, int length)
 Put the HashMap for the syned file.
void CopyFile (ArrayList copyArray, int blockSize)
 Called to copy data from the original file on the server to the new file.
void CloseFile ()
 Called to close a downloaded file.
SyncNodeStatus CloseFile (bool commit)
 Called to close the file being synced.
void EndSync ()
 Called to end this sync cycle.


Detailed Description

Class used to talk to the HTTP SyncService (SyncHandler.ashx.cs).


Constructor & Destructor Documentation

Simias::Sync::Http::HttpSyncProxy::HttpSyncProxy ( Collection  collection,
string  userName,
string  userID 
) [inline]

Constructor to create a Http sync proxy from collection for particular user

Parameters:
collection Collection for which proxy has to be created
userName Name of the user
userID ID of the user


Member Function Documentation

void Simias::Sync::Http::HttpSyncProxy::ResetConnection (  )  [inline]

Reset the established connection.

string Simias::Sync::Http::HttpSyncProxy::SyncEngineVersion (  )  [inline]

Returns the string format of the SyncEngineVersion In future we may want to return Major and Minor seperately.

void Simias::Sync::Http::HttpSyncProxy::StartSync ( ref StartSyncInfo  si  )  [inline]

Start a sync pass.

Parameters:
si The StartSyncInfo to control the sync.

SyncNodeInfo [] Simias::Sync::Http::HttpSyncProxy::GetNextInfoList ( out string  context  )  [inline]

Returns the next set of NodeInfos.

Returns:

SyncNodeStatus [] Simias::Sync::Http::HttpSyncProxy::PutNodes ( SyncNode[]  nodes  )  [inline]

Sync the supplied nodes to the server.

Parameters:
nodes The nodes to sync.
Returns:
The status of the sync.

SyncNode [] Simias::Sync::Http::HttpSyncProxy::GetNodes ( string[]  nids  )  [inline]

Download the nodes from the server.

Parameters:
nids The nodes to sync down.
Returns:
The nodes requested.

SyncNodeStatus [] Simias::Sync::Http::HttpSyncProxy::PutDirs ( SyncNode[]  nodes  )  [inline]

Sync the Directory nodes to the server.

Parameters:
nodes The nodes to sync.
Returns:
The status of the sync.

SyncNode [] Simias::Sync::Http::HttpSyncProxy::GetDirs ( string[]  nids  )  [inline]

Download the Directory nodes from the server.

Parameters:
nids The nodes to sync down.
Returns:
The nodes requested.

SyncNodeStatus [] Simias::Sync::Http::HttpSyncProxy::DeleteNodes ( string[]  nodeIDs  )  [inline]

Delete the nodes on the server.

Parameters:
nodeIDs The array of node IDs to delete.
Returns:
An array of status codes.

SyncStatus Simias::Sync::Http::HttpSyncProxy::OpenFilePut ( SyncNode  node  )  [inline]

Opens the file to sync up to the server.

Parameters:
node The node to sync.
Returns:
The Status of the sync.

SyncNode Simias::Sync::Http::HttpSyncProxy::OpenFileGet ( string  nodeID  )  [inline]

Opens the file to sync down from the server.

Parameters:
nodeID The ID of the node.
Returns:
The node that represents the file.

HashData [] Simias::Sync::Http::HttpSyncProxy::GetHashMap ( out int  blockSize  )  [inline]

Get the HashMap for the opened file.

Returns:
The HashData[]

HttpWebResponse Simias::Sync::Http::HttpSyncProxy::ReadFile ( DownloadSegment  seg,
int  blockSize 
) [inline]

Reads the specified blocks from the server.

Parameters:
seg The range of blocks to read.
blockSize The block size.
Returns:
The response to the read. The data is in the responseStream. This response must be closed.

void Simias::Sync::Http::HttpSyncProxy::WriteFile ( StreamStream  stream,
long  offset,
int  count,
string  encryptionAlgorithm,
string  EncryptionKey 
) [inline]

Write the file data to the server.

Parameters:
stream The stream containing the data.
offset The offset to write at.
count The number of bytes to write.

void Simias::Sync::Http::HttpSyncProxy::PutHashMap ( FileStream  mapStream,
int  length 
) [inline]

Put the HashMap for the syned file.

void Simias::Sync::Http::HttpSyncProxy::CopyFile ( ArrayList  copyArray,
int  blockSize 
) [inline]

Called to copy data from the original file on the server to the new file.

Parameters:
copyArray The array of blocks and offsets to copy from the original file.

void Simias::Sync::Http::HttpSyncProxy::CloseFile (  )  [inline]

Called to close a downloaded file.

SyncNodeStatus Simias::Sync::Http::HttpSyncProxy::CloseFile ( bool  commit  )  [inline]

Called to close the file being synced.

Parameters:
commit True if the file should be commited.
Returns:
The sync status.

void Simias::Sync::Http::HttpSyncProxy::EndSync (  )  [inline]

Called to end this sync cycle.


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

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