]> git.mxchange.org Git - simgear.git/blob - simgear/io/SVNReportParser.hxx
SVN read-only client code using our HTTP engine.
[simgear.git] / simgear / io / SVNReportParser.hxx
1 // SVNReportParser -- parser for SVN report XML data
2 //
3 // Copyright (C) 2012  James Turner <zakalawe@mac.com>
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License as
7 // published by the Free Software Foundation; either version 2 of the
8 // License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful, but
11 // WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 // General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18
19
20 #ifndef SG_IO_SVNREPORTPARSER_HXX
21 #define SG_IO_SVNREPORTPARSER_HXX
22
23 #include <string>
24 #include <memory> // for auto_ptr
25
26 #include "SVNRepository.hxx"
27
28 class SGPath;
29
30 namespace simgear
31 {
32   
33 class SVNRepository;
34
35 class SVNReportParser
36 {
37 public:
38   SVNReportParser(SVNRepository* repo);
39   ~SVNReportParser();
40   
41   // incremental XML parsing
42   SVNRepository::ResultCode parseXML(const char* data, int size);
43   
44   SVNRepository::ResultCode finishParse();
45         
46   static std::string etagFromRevision(unsigned int revision);
47           
48   class SVNReportParserPrivate;
49 private:
50     SVNRepository::ResultCode innerParseXML(const char* data, int size);
51         
52   std::auto_ptr<SVNReportParserPrivate> _d;
53 };
54
55 } // of namespace simgear
56
57 #endif // of SG_IO_SVNREPORTPARSER_HXX