#ifndef waTRANSFER_H
#define waTRANSFER_H
/*******************************************************************************
* E.S.O. - VLT project
*
* "@(#) $Id$"
*
* who       when      what
* --------  --------  ----------------------------------------------
* gchiozzi  15/04/99  created
*/

/************************************************************************
 *
 *----------------------------------------------------------------------
 */

#ifndef __cplusplus
#error This is a C++ include file and cannot be used from plain C
#endif

#include "ECCS.h"
#include "eccsTestTools.h"

#include "evhHANDLER.h"
#include "evhCOMMAND.h"

/******************************************/
/* Definition for the waTRANSFER class    */
/******************************************/

class waTRANSFER: public fndOBJECT, virtual public eccsERROR_CLASS
{
  public:

    static ccsCOMPL_STAT TransferCommand(const ccsENVNAME   destenv, 
					 const ccsPROCNAME  destproc,
					 const msgMESSAGE  &msg,
					 const eccsTIMEVAL  interval);
    virtual ~waTRANSFER();

  protected:
    virtual evhCB_COMPL_STAT  ReplyCB(msgMESSAGE &msg, void *udata);
    virtual evhCB_COMPL_STAT  ErrReplyCB(msgMESSAGE &msg, void *udata);
    virtual evhCB_COMPL_STAT  TimeoutCB(msgMESSAGE &msg, void *udata);

    ccsCOMPL_STAT SendReply(const char *newBuffer, 
			    msgLENGTH   newBuflen=0,
			    vltLOGICAL  lastReply=ccsTRUE);
    ccsCOMPL_STAT SendReply(const ccsERROR &errmsg);

  private:
    waTRANSFER(const ccsENVNAME   destenv, 
	       const ccsPROCNAME  destproc,
	       const msgMESSAGE  &msg,
	       const eccsTIMEVAL  interval);

    msgMESSAGE msg;
    evhCOMMAND cmd;

};

#endif /*!waTRANSFER_H*/

/*___oOo___*/
