cmCTestSubmitHandler.h 2.56 KB
Newer Older
Andy Cedilnik's avatar
Andy Cedilnik committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*=========================================================================

  Program:   CMake - Cross-Platform Makefile Generator
  Module:    $RCSfile$
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/
17
18
#ifndef cmCTestSubmitHandler_h
#define cmCTestSubmitHandler_h
Andy Cedilnik's avatar
Andy Cedilnik committed
19

20
#include "cmCTestGenericHandler.h"
Andy Cedilnik's avatar
Andy Cedilnik committed
21

22
/** \class cmCTestSubmitHandler
Andy Cedilnik's avatar
Andy Cedilnik committed
23
24
25
26
27
 * \brief Helper class for CTest
 *
 * Submit testing results
 * 
 */
28
class cmCTestSubmitHandler : public cmCTestGenericHandler
Andy Cedilnik's avatar
Andy Cedilnik committed
29
30
{
public:
31
32
  cmTypeMacro(cmCTestSubmitHandler, cmCTestGenericHandler);

33
  cmCTestSubmitHandler();
Andy Cedilnik's avatar
Andy Cedilnik committed
34
  ~cmCTestSubmitHandler() { this->LogFile = 0; }
Andy Cedilnik's avatar
Andy Cedilnik committed
35

36
37
  /*
   * The main entry point for this class
Andy Cedilnik's avatar
Andy Cedilnik committed
38
   */
39
  int ProcessHandler();
Andy Cedilnik's avatar
Andy Cedilnik committed
40

41
  void Initialize();
Andy Cedilnik's avatar
Andy Cedilnik committed
42
  
43
private:
Andy Cedilnik's avatar
Andy Cedilnik committed
44
  void SetLogFile(std::ostream* ost) { this->LogFile = ost; }
45

Andy Cedilnik's avatar
Andy Cedilnik committed
46
47
48
  /**
   * Submit file using various ways
   */
49
  bool SubmitUsingFTP(const cmStdString& localprefix, 
50
                      const std::set<cmStdString>& files,
51
52
53
                      const cmStdString& remoteprefix, 
                      const cmStdString& url);
  bool SubmitUsingHTTP(const cmStdString& localprefix, 
54
                       const std::set<cmStdString>& files,
55
56
                       const cmStdString& remoteprefix, 
                       const cmStdString& url);
Andy Cedilnik's avatar
Andy Cedilnik committed
57
58
  bool SubmitUsingSCP(const cmStdString& scp_command,
                      const cmStdString& localprefix, 
59
                      const std::set<cmStdString>& files,
60
61
                      const cmStdString& remoteprefix, 
                      const cmStdString& url);
Andy Cedilnik's avatar
Andy Cedilnik committed
62

63
  bool TriggerUsingHTTP(const std::set<cmStdString>& files,
64
65
                        const cmStdString& remoteprefix, 
                        const cmStdString& url);
66

67
  bool SubmitUsingXMLRPC(const cmStdString& localprefix, 
68
                       const std::set<cmStdString>& files,
69
70
71
                       const cmStdString& remoteprefix, 
                       const cmStdString& url);

72
73
  std::string GetSubmitResultsPrefix();

Andy Cedilnik's avatar
Andy Cedilnik committed
74
75
76
77
78
79
  cmStdString   HTTPProxy;
  int           HTTPProxyType;
  cmStdString   HTTPProxyAuth;
  cmStdString   FTPProxy;
  int           FTPProxyType;
  std::ostream* LogFile;
Bill Hoffman's avatar
Bill Hoffman committed
80
  bool CDash;
Andy Cedilnik's avatar
Andy Cedilnik committed
81
82
83
};

#endif