/[projects]/smsdaemon/plugins/TrainInfo.cpp
ViewVC logotype

Diff of /smsdaemon/plugins/TrainInfo.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 64 by torben, Thu Jun 12 12:47:32 2008 UTC revision 158 by torben, Mon Dec 8 21:49:49 2008 UTC
# Line 2  Line 2 
2  #include "TrainInfo.h"  #include "TrainInfo.h"
3    
4  #include "string_nocase.h"  #include "string_nocase.h"
5  #include "util.h"  #include "Util.h"
6    
7  #include <vector>  #include <vector>
8  #include <sstream>  #include <sstream>
9    #include <stdexcept>
10    
11    
12  using namespace std;  using namespace std;
13    
# Line 59  vector<TrainInfo> GetTrainInfo(string st Line 61  vector<TrainInfo> GetTrainInfo(string st
61          string url = string("http://www.bane.dk/visStation.asp?W=FJRN&S=") + stationcode + "&artikelId=4275&statnavn=" + stationname;          string url = string("http://www.bane.dk/visStation.asp?W=FJRN&S=") + stationcode + "&artikelId=4275&statnavn=" + stationname;
62    
63          string raw_doc = Util::readUrl(url, "/tmp/sms_tog.tmp" );          string raw_doc = Util::readUrl(url, "/tmp/sms_tog.tmp" );
64    
65            if (raw_doc == "")
66            {
67                    throw std::runtime_error("Connection timeout");
68            }
69    
70          raw_doc = Util::str_replace(raw_doc, "\"", "'");          raw_doc = Util::str_replace(raw_doc, "\"", "'");
71    
72          string_nocase html = raw_doc.c_str();          string_nocase html = raw_doc.c_str();

Legend:
Removed from v.64  
changed lines
  Added in v.158

  ViewVC Help
Powered by ViewVC 1.1.20