ArServerFileFromClient Class Reference

#include <ArServerFileUtils.h>

List of all members.


Detailed Description

Note:
Linux only
This class is set up so that a client can put files on the robot, this class ONLY puts files. This class will take a file from a client, writing it into the tempDir given in the constructor, then after receiving the file it'll move it over to the actual location requested. You should use this class by using ArClientFileToClient and NOT by using this classes interface directly, this is because the API is and will remain fairly volatile... if you need more functionality let us know and we'll add it if its reasonable.


Public Member Functions

void addPostMoveCallback (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST)
 Adds a callback to be called after moving from temp dir to final loc.
void addPreMoveCallback (ArFunctor *functor, ArListPos::Pos position=ArListPos::LAST)
 Adds a callback to be called before moving from temp dir to final loc.
 ArServerFileFromClient (ArServerBase *server, const char *topDir, const char *tempDir)
 Constructor.
const char * getMovingFileName (void)
 Internal call for getting the name of the file we're moving.
void putFile (ArServerClient *client, ArNetPacket *packet)
 Puts the file.
void putFileInterleaved (ArServerClient *client, ArNetPacket *packet)
 Puts the file with interleaved responses.
void putFileWithTimestamp (ArServerClient *client, ArNetPacket *packet)
 Puts the file.
void putFileWithTimestampInterleaved (ArServerClient *client, ArNetPacket *packet)
 Puts the file with interleaved responses.
void remPostMoveCallback (ArFunctor *functor)
 Removes a callback to be called after moving from temp dir to final loc.
void remPreMoveCallback (ArFunctor *functor)
 Removes a callback to be called before moving from temp dir to final loc.
virtual ~ArServerFileFromClient ()
 Destructor.

Protected Member Functions

void internalPutFile (ArServerClient *client, ArNetPacket *packet, bool interleaved, bool isSetTimestamp)

Protected Attributes

char myBaseDir [2048]
int myFileNumber
std::map< std::string, FileInfo * > myMap
std::string myMovingFileName
std::list< ArFunctor * > myPostMoveCallbacks
std::list< ArFunctor * > myPreMoveCallbacks
ArFunctor2C< ArServerFileFromClient,
ArServerClient *, ArNetPacket * > 
myPutFileCB
ArFunctor2C< ArServerFileFromClient,
ArServerClient *, ArNetPacket * > 
myPutFileInterleavedCB
ArFunctor2C< ArServerFileFromClient,
ArServerClient *, ArNetPacket * > 
myPutFileWithTimestampCB
ArFunctor2C< ArServerFileFromClient,
ArServerClient *, ArNetPacket * > 
myPutFileWithTimestampInterleavedCB
ArServerBasemyServer
char myTempDir [2048]

Classes

class  FileInfo


Constructor & Destructor Documentation

ArServerFileFromClient::ArServerFileFromClient ( ArServerBase server,
const char *  topDir,
const char *  tempDir 
)

Constructor.

ArServerFileFromClient::~ArServerFileFromClient (  )  [virtual]

Destructor.


Member Function Documentation

void ArServerFileFromClient::addPostMoveCallback ( ArFunctor functor,
ArListPos::Pos  position = ArListPos::LAST 
)

Adds a callback to be called after moving from temp dir to final loc.

void ArServerFileFromClient::addPreMoveCallback ( ArFunctor functor,
ArListPos::Pos  position = ArListPos::LAST 
)

Adds a callback to be called before moving from temp dir to final loc.

const char* ArServerFileFromClient::getMovingFileName ( void   )  [inline]

Internal call for getting the name of the file we're moving.

void ArServerFileFromClient::internalPutFile ( ArServerClient client,
ArNetPacket packet,
bool  interleaved,
bool  isSetTimestamp 
) [protected]

void ArServerFileFromClient::putFile ( ArServerClient client,
ArNetPacket packet 
)

Puts the file.

void ArServerFileFromClient::putFileInterleaved ( ArServerClient client,
ArNetPacket packet 
)

Puts the file with interleaved responses.

void ArServerFileFromClient::putFileWithTimestamp ( ArServerClient client,
ArNetPacket packet 
)

Puts the file.

void ArServerFileFromClient::putFileWithTimestampInterleaved ( ArServerClient client,
ArNetPacket packet 
)

Puts the file with interleaved responses.

void ArServerFileFromClient::remPostMoveCallback ( ArFunctor functor  ) 

Removes a callback to be called after moving from temp dir to final loc.

void ArServerFileFromClient::remPreMoveCallback ( ArFunctor functor  ) 

Removes a callback to be called before moving from temp dir to final loc.


Member Data Documentation

char ArServerFileFromClient::myBaseDir[2048] [protected]

int ArServerFileFromClient::myFileNumber [protected]

std::map<std::string, FileInfo *> ArServerFileFromClient::myMap [protected]

std::string ArServerFileFromClient::myMovingFileName [protected]

std::list<ArFunctor *> ArServerFileFromClient::myPostMoveCallbacks [protected]

std::list<ArFunctor *> ArServerFileFromClient::myPreMoveCallbacks [protected]

ArFunctor2C<ArServerFileFromClient, ArServerClient *, ArNetPacket *> ArServerFileFromClient::myPutFileCB [protected]

ArFunctor2C<ArServerFileFromClient, ArServerClient *, ArNetPacket *> ArServerFileFromClient::myPutFileInterleavedCB [protected]

ArFunctor2C<ArServerFileFromClient, ArServerClient *, ArNetPacket *> ArServerFileFromClient::myPutFileWithTimestampCB [protected]

ArFunctor2C<ArServerFileFromClient, ArServerClient *, ArNetPacket *> ArServerFileFromClient::myPutFileWithTimestampInterleavedCB [protected]

ArServerBase* ArServerFileFromClient::myServer [protected]

char ArServerFileFromClient::myTempDir[2048] [protected]


The documentation for this class was generated from the following files:
Generated on Fri Jul 31 12:37:29 2009 for ArNetworking by  doxygen 1.4.7