]> git.mxchange.org Git - simgear.git/blob - simgear/io/http_svn.cxx
Expose total bytes to download / remaining
[simgear.git] / simgear / io / http_svn.cxx
1 #include <cstdio>
2 #include <cstring>
3 #include <signal.h>
4
5 #include <iostream>
6 #include <boost/foreach.hpp>
7
8
9 #include <simgear/io/sg_file.hxx>
10 #include <simgear/io/HTTPClient.hxx>
11 #include <simgear/io/HTTPRequest.hxx>
12 #include <simgear/io/sg_netChannel.hxx>
13 #include <simgear/io/DAVMultiStatus.hxx>
14 #include <simgear/io/SVNRepository.hxx>
15 #include <simgear/debug/logstream.hxx>
16
17 #include <simgear/misc/strutils.hxx>
18 #include <simgear/timing/timestamp.hxx>
19
20 using namespace simgear;
21 using std::cout;
22 using std::endl;
23 using std::cerr;
24 using std::string;
25
26 HTTP::Client* httpClient;
27
28 int main(int argc, char* argv[])
29 {
30   sglog().setLogLevels( SG_ALL, SG_INFO );
31   HTTP::Client cl;
32   httpClient = &cl;
33
34   
35   SGPath p("/Users/jmt/Desktop/traffic");
36   SVNRepository airports(p, &cl);
37  //  airports.setBaseUrl("http://svn.goneabitbursar.com/testproject1");
38 //  airports.setBaseUrl("http://terrascenery.googlecode.com/svn/trunk/data/Scenery/Models");
39   
40   airports.setBaseUrl("http://fgfs.goneabitbursar.com/fgfsai/trunk/AI/Traffic");
41   
42 //  airports.setBaseUrl("http://terrascenery.googlecode.com/svn/trunk/data/Scenery/Airports");
43   airports.update();
44   
45   while (airports.isDoingSync()) {
46     cl.update(100);
47   }
48   
49   cout << "all done!" << endl;
50   return EXIT_SUCCESS;
51 }