cmCTestSubmit.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmCTestSubmit_h
  14. #define cmCTestSubmit_h
  15. #include "cmStandardIncludes.h"
  16. /** \class cmCTestSubmit
  17. * \brief Helper class for CTest
  18. *
  19. * Submit testing results
  20. *
  21. */
  22. class cmCTestSubmit
  23. {
  24. public:
  25. cmCTestSubmit();
  26. ~cmCTestSubmit() { m_LogFile = 0; }
  27. /**
  28. * Set verbosity of send
  29. */
  30. void SetVerbose(bool i) { m_Verbose = i; }
  31. void VerboseOn() { this->SetVerbose(1); }
  32. void VerboseOff() { this->SetVerbose(0); }
  33. void SetLogFile(std::ostream* ost) { m_LogFile = ost; }
  34. /**
  35. * Submit file using various ways
  36. */
  37. bool SubmitUsingFTP(const cmStdString& localprefix,
  38. const std::vector<cmStdString>& files,
  39. const cmStdString& remoteprefix,
  40. const cmStdString& url);
  41. bool SubmitUsingHTTP(const cmStdString& localprefix,
  42. const std::vector<cmStdString>& files,
  43. const cmStdString& remoteprefix,
  44. const cmStdString& url);
  45. bool SubmitUsingSCP(const cmStdString& scp_command,
  46. const cmStdString& localprefix,
  47. const std::vector<cmStdString>& files,
  48. const cmStdString& remoteprefix,
  49. const cmStdString& url);
  50. bool TriggerUsingHTTP(const std::vector<cmStdString>& files,
  51. const cmStdString& remoteprefix,
  52. const cmStdString& url);
  53. private:
  54. cmStdString m_HTTPProxy;
  55. int m_HTTPProxyType;
  56. cmStdString m_HTTPProxyAuth;
  57. cmStdString m_FTPProxy;
  58. int m_FTPProxyType;
  59. bool m_Verbose;
  60. std::ostream* m_LogFile;
  61. };
  62. #endif