Back to index

nordugrid-arc-nox  1.1.0~rc6
FTPControl.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifndef __ARC_FTPCONTROL_H__
00004 #define __ARC_FTPCONTROL_H__
00005 
00006 
00007 #include <globus_ftp_control.h>
00008 
00009 #include <arc/URL.h>
00010 
00011 namespace Arc {
00012 
00013   class Logger;
00014 
00015   class FTPControl {
00016 
00017   public:
00018     FTPControl();
00019     ~FTPControl();
00020 
00021     bool Connect(const URL& url, const std::string& proxyPath,
00022                  const std::string& certificatePath,
00023                  const std::string& keyPath, int timeout);
00024     bool SendCommand(const std::string& cmd, int timeout);
00025     bool SendCommand(const std::string& cmd, std::string& response,
00026                      int timeout);
00027     bool SendData(const std::string& data, const std::string& filename,
00028                   int timeout);
00029     bool Disconnect(int timeout);
00030 
00031     class CBArg;
00032 
00033   private:
00034     static Logger logger;
00035     globus_ftp_control_handle_t control_handle;
00036     CBArg* cb;
00037     bool connected;
00038   };
00039 
00040 } // namespace Arc
00041 
00042 #endif // __ARC_FTPCONTROL_H__