cmCTestSubmit.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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& localprefix,
  46. const std::vector<cmStdString>& files,
  47. const cmStdString& remoteprefix,
  48. const cmStdString& url);
  49. bool TriggerUsingHTTP(const std::vector<cmStdString>& files,
  50. const cmStdString& remoteprefix,
  51. const cmStdString& url);
  52. private:
  53. cmStdString m_HTTPProxy;
  54. int m_HTTPProxyType;
  55. cmStdString m_FTPProxy;
  56. int m_FTPProxyType;
  57. bool m_Verbose;
  58. std::ostream* m_LogFile;
  59. };
  60. #endif