[-]
[+]
|
Changed |
_service:tar_git:harbour-fahrplan2.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-fahrplan2.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/poetaster/fahrplan</param>
<param name="branch">master</param>
- <param name="revision"> 2.0.38 </param>
+ <param name="revision"> 2.0.40</param>
<param name="token"/>
<param name="debian">N</param>
<param name="dumb">N</param>
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-fahrplan2-2.0.38.tar.bz2/src/parser/parser_dubai_efa.cpp
^
|
@@ -1,50 +0,0 @@
-/****************************************************************************
-**
-** This file is a part of Fahrplan.
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License along
-** with this program. If not, see <http://www.gnu.org/licenses/>.
-**
-****************************************************************************/
-
-/* This parser was written by Evan Sebire
- * Dubai uses EFAv9
- */
-
-
-#include "parser_dubai_efa.h"
-
-#include <QBuffer>
-#include <QDomDocument>
-#include <QFile>
-#include <QNetworkReply>
-
-
-ParserDubaiEFA::ParserDubaiEFA(QObject *parent) :
- ParserEFA(parent)
-{
- baseRestUrl = "https://wojhati.rta.ae/dub/";
-}
-
-
-QStringList ParserDubaiEFA::getTrainRestrictions()
-{
- QStringList result;
- result.append(tr("All"));
- result.append(tr("Bus"));
- result.append(tr("Water Bus"));
- result.append(tr("Metro"));
- result.append(tr("Taxi"));
- return result;
-}
-
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-fahrplan2-2.0.38.tar.bz2/src/parser/parser_dubai_efa.h
^
|
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** This file is a part of Fahrplan.
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License along
-** with this program. If not, see <http://www.gnu.org/licenses/>.
-**
-****************************************************************************/
-
-#ifndef PARSER_DUBAI_EFA_H
-#define PARSER_DUBAI_EFA_H
-
-#include <QObject>
-#include "parser_efa.h"
-
-class ParserDubaiEFA : public ParserEFA
-{
- Q_OBJECT
-public:
- explicit ParserDubaiEFA(QObject *parent = 0);
- static QString getName() { return QString("%1 (rta.ae)").arg(tr("Dubai")); }
- virtual QString name() { return getName(); }
- virtual QString shortName() { return "rta.ae"; }
-
-protected:
- QStringList getTrainRestrictions();
-
-};
-
-
-#endif // PARSER_DUBAI_EFA_H
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-fahrplan2-2.0.38.tar.bz2/src/parser/parser_sf_bay_efa.cpp
^
|
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** This file is a part of Fahrplan.
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License along
-** with this program. If not, see <http://www.gnu.org/licenses/>.
-**
-****************************************************************************/
-
-/* This parser was written by Evan Sebire
- * San Francisco area, uses EFAv9
- * Seems to have a ridiculous number of transit option, these were copied from website
- */
-
-
-#include "parser_sf_bay_efa.h"
-
-#include <QBuffer>
-#include <QDomDocument>
-#include <QFile>
-#include <QNetworkReply>
-
-
-ParserSFBayEFA::ParserSFBayEFA(QObject *parent) :
- ParserEFA(parent)
-
-{
- // deprecated!
- baseRestUrl = "https://tripplanner.transit.511.org/mtc/";
-}
-
-
-QStringList ParserSFBayEFA::getTrainRestrictions()
-{
- QStringList result;
- result.append(tr("All"));
- result.append(tr("AC Transit (Local Service)"));
- result.append(tr("AC Transit (Transbay Service)"));
- result.append(tr("ACE"));
- result.append(tr("AirBART"));
- result.append(tr("American Canyon Transit"));
- result.append(tr("Amtrak Capitol Cor. & Reg. Svc"));
- result.append(tr("Angel Island - Tiburon Ferry"));
- result.append(tr("BART"));
- result.append(tr("Blue & Gold Fleet"));
- result.append(tr("Caltrain"));
- result.append(tr("County Connection"));
- result.append(tr("Dumbarton Express"));
- result.append(tr("Emery Go-Round"));
- result.append(tr("Fairfield and Suisun Transit (FAST)"));
- result.append(tr("Golden Gate Ferry"));
- result.append(tr("Golden Gate Transit"));
- result.append(tr("Hornblower Alcatraz Ferry"));
- result.append(tr("Marin Transit"));
- result.append(tr("Petaluma Transit"));
- result.append(tr("Rio Vista Delta Breeze"));
- result.append(tr("SamTrans"));
- result.append(tr("San Francisco Muni"));
- result.append(tr("Santa Clara VTA"));
- result.append(tr("Santa Rosa CityBus"));
- result.append(tr("SF Bay Ferry"));
- result.append(tr("SolTrans"));
- result.append(tr("Sonoma County Transit"));
- result.append(tr("St Helena VINE"));
- result.append(tr("Stanford Marguerite Shuttle"));
- result.append(tr("Tri Delta Transit"));
- result.append(tr("Union City Transit"));
- result.append(tr("Vacaville City Transit"));
- result.append(tr("VINE (Napa County)"));
- result.append(tr("WestCAT"));
- result.append(tr("WHEELS"));
- result.append(tr("Yountville Shuttle"));
- return result;
-}
-
-
-
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-fahrplan2-2.0.38.tar.bz2/src/parser/parser_sf_bay_efa.h
^
|
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** This file is a part of Fahrplan.
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License along
-** with this program. If not, see <http://www.gnu.org/licenses/>.
-**
-****************************************************************************/
-
-#ifndef PARSER_SF_BAY_EFA_H
-#define PARSER_SF_BAY_EFA_H
-
-#include <QObject>
-#include "parser_efa.h"
-
-class ParserSFBayEFA : public ParserEFA
-{
- Q_OBJECT
-public:
- explicit ParserSFBayEFA(QObject *parent = 0);
- static QString getName() { return QString("%1, %2 (511.org)").arg(tr("USA"), tr("SF Bay")); }
- virtual QString name() { return getName(); }
- virtual QString shortName() { return "511.org"; }
-
-protected:
- QStringList getTrainRestrictions();
-
-};
-
-
-#endif // PARSER_SF_BAY_EFA_H
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-fahrplan2-2.0.38.tar.bz2/src/parser/parser_xmlsbbch.cpp
^
|
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** This file is a part of Fahrplan.
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License along
-** with this program. If not, see <http://www.gnu.org/licenses/>.
-**
-****************************************************************************/
-
-#include "parser_xmlsbbch.h"
-
-#include <QNetworkReply>
-
-ParserXmlSbbCh::ParserXmlSbbCh(QObject *parent) :
- ParserHafasXml(parent)
-{
- baseXmlUrl = "https://fahrplan.sbb.ch/bin/extxml.exe";
- baseUrl = "https://fahrplan.sbb.ch/bin/query.exe";
- userAgent = "SBBMobile/4.8 CFNetwork/609.1.4 Darwin/13.0.0";
-
- hafasHeader.accessid = "YJpyuPISerpXNNRTo50fNMP0yVu7L6IMuOaBgS0Xz89l3f6I3WhAjnto4kS9oz1";
- hafasHeader.prod = "iPhone3.1";
- hafasHeader.ver = "2.3";
-}
-
-void ParserXmlSbbCh::parseStationsByName(QNetworkReply *networkReply)
-{
- QString data = QString::fromUtf8(networkReply->readAll());
- const StationsList result = internalParseStationsByName(data);
- emit stationsResult(result);
-}
-
-QString ParserXmlSbbCh::getTrainRestrictionsCodes(int trainrestrictions)
-{
- QString trainrestr = "1111111111111111";
- if (trainrestrictions == 0) {
- trainrestr = "1111111111111111"; //ALL
- } else if (trainrestrictions == 1) {
- trainrestr = "0111111111000000"; //All without ICE
- }
-
- return trainrestr;
-}
-
-QStringList ParserXmlSbbCh::getTrainRestrictions()
-{
- QStringList result;
- result.append(tr("All"));
- result.append(tr("All without ICE"));
- return result;
-}
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-fahrplan2-2.0.38.tar.bz2/src/parser/parser_xmlsbbch.h
^
|
@@ -1,41 +0,0 @@
-/****************************************************************************
-**
-** This file is a part of Fahrplan.
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License as published by
-** the Free Software Foundation; either version 2 of the License, or
-** (at your option) any later version.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License along
-** with this program. If not, see <http://www.gnu.org/licenses/>.
-**
-****************************************************************************/
-
-#ifndef PARSER_XMLSBBCH_H
-#define PARSER_XMLSBBCH_H
-
-#include "parser_hafasxml.h"
-
-class ParserXmlSbbCh : public ParserHafasXml
-{
- Q_OBJECT
-
-public:
- explicit ParserXmlSbbCh(QObject *parent = 0);
- static QString getName() { return QString("%1 (sbb.ch)").arg(tr("Switzerland")); }
- virtual QString name() { return getName(); }
- virtual QString shortName() { return "sbb.ch"; }
-
-protected:
- void parseStationsByName(QNetworkReply *networkReply);
- QStringList getTrainRestrictions();
- QString getTrainRestrictionsCodes(int trainrestrictions);
-};
-
-#endif // PARSER_XMLSBBCH_H
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-fahrplan2-2.0.40.tar.bz2/fahrplan2.pro
^
|
@@ -2,7 +2,7 @@
APP_NAME = Fahrplan
# Define Version
-VERSION = 2.0.38-1
+VERSION = 2.0.40-1
#CONFIG+= openrepos
@@ -105,7 +105,6 @@
src/parser/parser_hafasxml.h \
src/parser/parser_abstract.h \
src/parser/parser_definitions.h \
- src/parser/parser_xmlsbbch.h \
src/parser/parser_xmlrejseplanendk.h \
src/parser/parser_xmloebbat.h \
src/parser/parser_xmlvasttrafikse.h \
@@ -127,20 +126,18 @@
src/parser/parser_efa.h \
src/parser/parser_ireland_efa.h \
src/parser/parser_sydney_efa.h \
- src/parser/parser_sf_bay_efa.h \
- src/parser/parser_dubai_efa.h \
src/parser/parser_ninetwo.h \
src/parser/parser_munich_efa.h \
src/parser/parser_salzburg_efa.h \
src/parser/parser_resrobot.h \
src/parser/parser_finland_matka.h \
+ src/parser/parser_vrr_efa.h \
src/models/backends.h
SOURCES += src/main.cpp \
src/parser/parser_hafasxml.cpp \
src/parser/parser_abstract.cpp \
src/parser/parser_definitions.cpp \
- src/parser/parser_xmlsbbch.cpp \
src/parser/parser_xmlrejseplanendk.cpp \
src/parser/parser_xmloebbat.cpp \
src/parser/parser_xmlvasttrafikse.cpp \
@@ -162,13 +159,12 @@
src/parser/parser_efa.cpp \
src/parser/parser_ireland_efa.cpp \
src/parser/parser_sydney_efa.cpp \
- src/parser/parser_sf_bay_efa.cpp \
- src/parser/parser_dubai_efa.cpp \
src/parser/parser_ninetwo.cpp \
src/parser/parser_munich_efa.cpp \
src/parser/parser_salzburg_efa.cpp \
src/parser/parser_resrobot.cpp \
src/parser/parser_finland_matka.cpp \
+ src/parser/parser_vrr_efa.cpp \
src/models/backends.cpp
LIBS += $$PWD/3rdparty/gauss-kruger-cpp/gausskruger.cpp
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-fahrplan2-2.0.40.tar.bz2/src/fahrplan_backend_manager.cpp
^
|
@@ -32,19 +32,17 @@
result.append(ParserMobileBahnDe::getName());
result.append(ParserXmlOebbAt::getName());
result.append(ParserXmlRejseplanenDk::getName());
- result.append(ParserXmlSbbCh::getName());
result.append(ParserXmlNri::getName());
result.append(ParserXmlVasttrafikSe::getName());
result.append(ParserPTVVicGovAu::getName());
result.append(ParserSydneyEFA::getName());
- result.append(ParserSFBayEFA::getName());
result.append(ParserIrelandEFA::getName());
- result.append(ParserDubaiEFA::getName());
result.append(ParserNinetwo::getName());
result.append(ParserMunichEFA::getName());
result.append(ParserSalzburgEFA::getName());
result.append(ParserResRobot::getName());
result.append(ParserFinlandMatka::getName());
+ result.append(ParserVRREFA::getName());
// Make sure the index is in bounds
if (currentParserIndex > (result.count() - 1) || currentParserIndex < 0) {
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-fahrplan2-2.0.40.tar.bz2/src/fahrplan_parser_thread.cpp
^
|
@@ -132,43 +132,37 @@
m_parser = new ParserXmlRejseplanenDk();
break;
case 3:
- m_parser = new ParserXmlSbbCh();
+ m_parser = new ParserXmlNri();
break;
case 4:
- m_parser = new ParserXmlNri();
+ m_parser = new ParserXmlVasttrafikSe();
break;
case 5:
- m_parser = new ParserXmlVasttrafikSe();
+ m_parser = new ParserPTVVicGovAu();
break;
case 6:
- m_parser = new ParserPTVVicGovAu();
+ m_parser = new ParserSydneyEFA();
break;
case 7:
- m_parser = new ParserSydneyEFA();
+ m_parser = new ParserIrelandEFA();
break;
case 8:
- m_parser = new ParserSFBayEFA();
+ m_parser = new ParserNinetwo();
break;
case 9:
- m_parser = new ParserIrelandEFA();
+ m_parser = new ParserMunichEFA();
break;
case 10:
- m_parser = new ParserDubaiEFA();
+ m_parser = new ParserSalzburgEFA();
break;
case 11:
- m_parser = new ParserNinetwo();
+ m_parser = new ParserResRobot();
break;
case 12:
- m_parser = new ParserMunichEFA();
+ m_parser = new ParserFinlandMatka();
break;
case 13:
- m_parser = new ParserSalzburgEFA();
- break;
- case 14:
- m_parser = new ParserResRobot();
- break;
- case 15:
- m_parser = new ParserFinlandMatka();
+ m_parser = new ParserVRREFA();
break;
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-fahrplan2-2.0.40.tar.bz2/src/fahrplan_parser_thread.h
^
|
@@ -27,19 +27,17 @@
#include "parser/parser_xmloebbat.h"
#include "parser/parser_xmlvasttrafikse.h"
#include "parser/parser_xmlrejseplanendk.h"
-#include "parser/parser_xmlsbbch.h"
#include "parser/parser_xmlnri.h"
#include "parser/parser_mobilebahnde.h"
#include "parser/parser_ptvvicgovau.h"
-#include "parser/parser_sf_bay_efa.h"
#include "parser/parser_sydney_efa.h"
#include "parser/parser_ireland_efa.h"
-#include "parser/parser_dubai_efa.h"
#include "parser/parser_ninetwo.h"
#include "parser/parser_munich_efa.h"
#include "parser/parser_salzburg_efa.h"
#include "parser/parser_resrobot.h"
#include "parser/parser_finland_matka.h"
+#include "parser/parser_vrr_efa.h"
class FahrplanParserThread : public QThread
{
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-fahrplan2-2.0.40.tar.bz2/src/main.cpp
^
|
@@ -91,10 +91,12 @@
qDebug() <<"configfile: "<< oldConfigFileStr ;
qDebug() <<"newfile: "<< newConfigFileStr ;
- if (!config.exists("de.smurfy/harbour-fahrplan2"))
+ if (!config.exists("de.smurfy/harbour-fahrplan2/fahrplan2.conf"))
+ {
config.mkpath("de.smurfy/harbour-fahrplan2");
- QFile cCnf(oldConfigFileStr);
- cCnf.copy(newConfigFileStr);
+ QFile cCnf(oldConfigFileStr);
+ cCnf.copy(newConfigFileStr);
+ }
}
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-fahrplan2-2.0.40.tar.bz2/src/parser/parser_efa.cpp
^
|
@@ -65,6 +65,7 @@
* http://mobil.efa.de/mobile3/ GVH
* Donau-Iller-Nahverkehrsverbund-GmbH; http://www.ding.eu/fahrplaene/fahrplanauskunft.html
* http://195.30.98.162:8081/vvv2/ Verkehrsverbund Vogtland (VVV), In West-Sachsen
+ * http://efa.vrr.de/standard/XML_STOPFINDER_REQUEST?doNotSearchForStops_sf=1&language=en&locationInfoActive=1&locationServerActive=1&name_sf=Solingen&serverInfo=1&type_sf=any
*
* Ireland
@@ -96,6 +97,7 @@
#include <QNetworkReply>
#include <QtCore/QUrl>
#include <QXmlStreamReader>
+#include <memory>
#if defined(BUILD_FOR_QT5)
#include <QUrlQuery>
#endif
@@ -375,8 +377,9 @@
Station item;
item.name = nameElement.text();
// sidney
- if(item.name.isNull())
+ if(item.name.isNull() || item.name == "")
item.name = nameElement.attribute("objectName");
+ qDebug() << "objectName: " << nameElement.attribute("objectName") ;
item.id = nameElement.attribute("stopID");
if(item.id.isNull())
item.id = nameElement.attribute("id");
@@ -384,7 +387,8 @@
item.longitude = nameElement.attribute("y").toDouble();
result << item;
- //qDebug() << "Namelist: " << item.name ;
+ qDebug() << "Namelist: " << item.name ;
+ qDebug() << "id: " << item.id ;
}
}
checkForError(&doc);
@@ -533,7 +537,9 @@
QDomElement route = doc.firstChildElement("itdRequest").firstChildElement("itdTripRequest").firstChildElement("itdItinerary").firstChildElement("itdRouteList").firstChildElement("itdRoute");
for (; !route.isNull(); route = route.nextSiblingElement("itdRoute")) {
QStringList motNameList;
+
JourneyDetailResultList *detailsList = new JourneyDetailResultList();
+ std::unique_ptr<JourneyResultList> journeyResultList{ new JourneyResultList};
QDomElement partialRoute = route.firstChildElement("itdPartialRouteList").firstChildElement("itdPartialRoute");
for (; !partialRoute.isNull(); partialRoute = partialRoute.nextSiblingElement("itdPartialRoute")) {
QDomElement motElement = partialRoute.firstChildElement("itdMeansOfTransport");
@@ -631,13 +637,15 @@
}
else {
qDebug() << "!m_latestResultDeparture.isValid(), ";
- JourneyResultList *journeyResultList = new JourneyResultList();
+ //JourneyResultList *journeyResultList = new JourneyResultList();
+ std::unique_ptr<JourneyResultList> journeyResultList{ new JourneyResultList};
+
journeyResultList->setDepartureStation(m_searchJourneyParameters.departureStation.name);
journeyResultList->setViaStation(m_searchJourneyParameters.viaStation.name);
journeyResultList->setArrivalStation(m_searchJourneyParameters.arrivalStation.name);
//: DATE, TIME
journeyResultList->setTimeInfo(tr("%1, %2", "DATE, TIME").arg(m_searchJourneyParameters.dateTime.date().toString(Qt::DefaultLocaleShortDate)).arg(m_searchJourneyParameters.dateTime.time().toString(Qt::DefaultLocaleShortDate)));
- emit journeyResult(journeyResultList);
+ emit journeyResult(journeyResultList.release());
}
}
@@ -647,13 +655,14 @@
if (m_earliestArrival.isValid())
searchJourney(m_searchJourneyParameters.departureStation, m_searchJourneyParameters.viaStation, m_searchJourneyParameters.arrivalStation, m_earliestArrival, Arrival, 0);
else {
- JourneyResultList *journeyResultList = new JourneyResultList();
+ // JourneyResultList *journeyResultList = new JourneyResultList();
+ std::unique_ptr<JourneyResultList> journeyResultList{ new JourneyResultList};
journeyResultList->setDepartureStation(m_searchJourneyParameters.departureStation.name);
journeyResultList->setViaStation(m_searchJourneyParameters.viaStation.name);
journeyResultList->setArrivalStation(m_searchJourneyParameters.arrivalStation.name);
//: DATE, TIME
journeyResultList->setTimeInfo(tr("%1, %2", "DATE, TIME").arg(m_searchJourneyParameters.dateTime.date().toString(Qt::DefaultLocaleShortDate)).arg(m_searchJourneyParameters.dateTime.time().toString(Qt::DefaultLocaleShortDate)));
- emit journeyResult(journeyResultList);
+ emit journeyResult(journeyResultList.release());
}
}
@@ -675,11 +684,13 @@
TimetableEntry item;
item.platform = departure.attribute("platformName");
QDomElement servingLineElement = departure.firstChildElement("itdServingLine");
+
item.destinationStation = servingLineElement.attribute("direction");
item.trainType = servingLineElement.attribute("motType");
QDomElement dateTimeElement = departure.firstChildElement("itdDateTime");
const QDateTime scheduledDateTime = parseItdDateTime(dateTimeElement);
item.time = scheduledDateTime.time();
+
const QString realTimeStr = departure.attribute("countdown"); // In minutes from search time
if (!realTimeStr.isEmpty()) {
const int realCountdown = realTimeStr.toInt();
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-fahrplan2-2.0.40.tar.bz2/src/parser/parser_salzburg_efa.cpp
^
|
@@ -27,7 +27,9 @@
ParserSalzburgEFA::ParserSalzburgEFA(QObject *parent) :
ParserEFA(parent)
{
- baseRestUrl = "https://efa.svv-info.at/svv/";
+ // MIGRATE to hafas
+ //baseRestUrl = "https://efa.svv-info.at/svv/";
+ baseRestUrl = "https://fahrplan.salzburg-verkehr.at/bin/mgate.exe";
acceptEncoding = "gzip";
}
|
[-]
[+]
|
Added |
_service:tar_git:harbour-fahrplan2-2.0.40.tar.bz2/src/parser/parser_vrr_efa.cpp
^
|
@@ -0,0 +1,116 @@
+/****************************************************************************
+**
+** This file is a part of Fahrplan.
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License along
+** with this program. If not, see <http://www.gnu.org/licenses/>.
+**
+****************************************************************************/
+
+#include "parser_vrr_efa.h"
+
+#include <QBuffer>
+#include <QDomDocument>
+#include <QFile>
+#include <QtCore/QUrl>
+#if defined(BUILD_FOR_QT5)
+ #include <QUrlQuery>
+#endif
+
+//http://efa.vrr.de/standard/XML_STOPFINDER_REQUEST?doNotSearchForStops_sf=1&language=en&locationInfoActive=1&locationServerActive=1&name_sf=Solingen&serverInfo=1&type_sf=any
+/*
+https://www.vrr.de/vrr-efa/XML_STOPFINDER_REQUEST?
+convertAddressesITKernel2LocationServer=1
+&convertCoord2LocationServer=1
+&convertCrossingsITKernel2LocationServer=1
+&convertPOIsITKernel2LocationServer=1
+&convertStopsPTKernel2LocationServer=1
+&coordOutputFormat=WGS84%5Bdd.ddddd%5D
+&doNotSearchForStops_sf=1
+&language=en
+&locationInfoActive=1
+&locationServerActive=1
+&name_sf=E
+&outputFormat=rapidJSON
+&serverInfo=1
+&type_sf=any
+&vrrStopFinderMacro=1
+*/
+ParserVRREFA::ParserVRREFA(QObject *parent) :
+ ParserEFA(parent)
+{
+ // new https://www.vrr.de/vrr-efa
+ baseRestUrl = "https://www.vrr.de/vrr-efa/";
+ //baseRestUrl = "http://efa.vrr.de/standard/";
+ acceptEncoding = "gzip";
+}
+
+QStringList ParserVRREFA::getTrainRestrictions()
+{
+ QStringList result;
+ result.append(tr("All"));
+ result.append(tr("S-Bahn"));
+ result.append(tr("U-Bahn"));
+ result.append(tr("Tram"));
+ result.append(tr("Bus"));
+ return result;
+}
+
+/*
+ * efa in VRR requires some extra params which are ok for münich, but break sydney
+*/
+void ParserVRREFA::findStationsByName(const QString &stationName)
+{
+ // http://efa.vrr.de/standard/XML_STOPFINDER_REQUEST?doNotSearchForStops_sf=1&language=en&locationInfoActive=1&locationServerActive=1&name_sf=Solingen&serverInfo=1&type_sf=any
+
+ qDebug() << "ParserEFA::findStationsByName(" << stationName << ")";
+ if (currentRequestState != FahrplanNS::noneRequest) {
+ return;
+ }
+ currentRequestState = FahrplanNS::stationsByNameRequest;
+ QUrl uri(baseRestUrl + "XML_STOPFINDER_REQUEST");
+
+#if defined(BUILD_FOR_QT5)
+ QUrlQuery query;
+#else
+ QUrl query;
+#endif
+ /*
+&coordOutputFormat=WGS84%5Bdd.ddddd%5D
+&outputFormat=rapidJSON
+&type_sf=any */
+ query.addQueryItem("language", "en");
+ //query.addQueryItem("convertAddressesITKernel2LocationServer", "1");
+ //query.addQueryItem("convertCoord2LocationServer", "1");
+ //query.addQueryItem("convertCrossingsITKernel2LocationServe", "1");
+ //query.addQueryItem("convertPOIsITKernel2LocationServer", "1");
+ //query.addQueryItem("convertStopsPTKernel2LocationServer", "1");
+ //query.addQueryItem("convertStopsPTKernel2LocationServer", "1");
+ //query.addQueryItem("serverInfo", "1");
+ query.addQueryItem("outputFormat", "XML");
+ query.addQueryItem("type_sf", "any"); // could be any, poi or stop
+ query.addQueryItem("coordOutputFormat","WGS84");
+ query.addQueryItem("doNotSearchForStops_sf","1");
+ query.addQueryItem("locationInfoActive","1");
+ query.addQueryItem("locationServerActive", "1");
+ query.addQueryItem("anyObjFilter_sf", "2");
+ query.addQueryItem("name_sf", stationName);
+
+#if defined(BUILD_FOR_QT5)
+ uri.setQuery(query);
+#else
+ uri.setQueryItems(query.queryItems());
+#endif
+ sendHttpRequest(uri);
+ //qDebug() << "search station url:" << uri;
+}
|
[-]
[+]
|
Added |
_service:tar_git:harbour-fahrplan2-2.0.40.tar.bz2/src/parser/parser_vrr_efa.h
^
|
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** This file is a part of Fahrplan.
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License along
+** with this program. If not, see <http://www.gnu.org/licenses/>.
+**
+****************************************************************************/
+
+#ifndef PARSER_VRR_EFA_H
+#define PARSER_VRR_EFA_H
+
+#include <QObject>
+#include "parser_efa.h"
+
+class ParserVRREFA : public ParserEFA
+{
+ Q_OBJECT
+public:
+ explicit ParserVRREFA(QObject *parent = 0);
+ static QString getName() { return QString("%1, %2 (vrr.de)").arg(tr("Germany"), tr("Rhine Ruhr")); }
+ virtual QString name() { return getName(); }
+ virtual QString shortName() { return "vrr.de"; }
+
+ virtual void findStationsByName(const QString &stationName);
+
+protected:
+ QStringList getTrainRestrictions();
+
+};
+
+
+#endif // PARSER_VRR_EFA_H
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-fahrplan2-2.0.40.tar.bz2/src/parser/parser_xmlrejseplanendk.cpp
^
|
@@ -22,7 +22,7 @@
ParserXmlRejseplanenDk::ParserXmlRejseplanenDk(QObject *parent) :
ParserHafasXml(parent)
{
- //https://mobil.rejseplanen.dk/bin/iphone.exe?
+ //baseUrl = "https://rejseplanen.dk/bin/iphone.exe";
baseXmlUrl = "https://www.rejseplanen.dk/bin/query.exe";
baseSTTableUrl = "https://mobil.rejseplanen.dk/bin/iphone.exe/en";
baseUrl = "https://www.rejseplanen.dk/bin/query.exe";
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-fahrplan2-2.0.40.tar.bz2/translations/fahrplan_de.ts
^
|
@@ -1468,6 +1468,44 @@
</message>
</context>
<context>
+ <name>ParserVRREFA</name>
+ <message>
+ <location filename="../src/parser/parser_vrr_efa.cpp" line="38"/>
+ <source>All</source>
+ <translation>Alle</translation>
+ </message>
+ <message>
+ <location filename="../src/parser/parser_vrr_efa.cpp" line="38"/>
+ <source>S-Bahn</source>
+ <translation>S-Bahn</translation>
+ </message>
+ <message>
+ <location filename="../src/parser/parser_vrr_efa.cpp" line="39"/>
+ <source>U-Bahn</source>
+ <translation>U-Bahn</translation>
+ </message>
+ <message>
+ <location filename="../src/parser/parser_vrr_efa.cpp" line="40"/>
+ <source>Tram</source>
+ <translation>Straßenbahn</translation>
+ </message>
+ <message>
+ <location filename="../src/parser/parser_vrr_efa.cpp" line="41"/>
+ <source>Bus</source>
+ <translation>Bus</translation>
+ </message>
+ <message>
+ <location filename="../src/parser/parser_vrr_efa.h" line="31"/>
+ <source>Germany</source>
+ <translation>Deutschland</translation>
+ </message>
+ <message>
+ <location filename="../src/parser/parser_vrr_efa.h" line="31"/>
+ <source>Rhine Ruhr</source>
+ <translation>Rhein Ruhr</translation>
+ </message>
+</context>
+<context>
<name>ParserNinetwo</name>
<message>
<location filename="../src/parser/parser_ninetwo.cpp" line="192"/>
|