Revision 1226270...
Go back to digest for 25th November 2012Features in Utilities
Add provider states, prevent multiple feed imports
- Add provider states, currently only useful for GTFS providers,
use state "ready" if the provider can be used to get timetable data,
eg. because the GTFS feed was successfully imported
- Other states are "gtfs_feed_import_pending" and "importing_gtfs_feed"
- Publish state in service provider data sources, update on changes,
including state data like the progress of an import
or whether or not an updated GTFS feed is available
- Only allow to start a GTFS service job that accesses the database,
if no other such job is already running for the same provider,
ie. no two GTFS feed import jobs can run at the same time anymore
- Use provider states to check if a GTFS feed import is already running,
update state in the engine when a GTFS service job is started/finished
- Add base class AbstractGtfsDatabaseJob, automatically asks the engine
if it can be started to access the database,
do not emitResult() in start()
- Remove ServiceProvider::progress() signal and state handling from
ServiceProviderGtfs, it just needs to know if it is ready or not,
the engine prevents usage of providers which are not ready
- Add more functionality to DataSource classes, add derivates:
ProvidersDataSource, SimpleDataSource -> TimetableDataSource
- Store data for "ServiceProviders" and "ServiceProvider [id]" data
sources in one ProvidersDataSource object, but separate data of
the providers, ProvidersDataSource::data() combines data of all
providers for the "ServiceProviders" data source
- Add enumerable GtfsServiceError for errors in the GTFS service
- Close database connection before deleting it in the GTFS service
- Update documentation
File Changes
- engine/datasource.cpp
- engine/datasource.h
- engine/enums.h
- engine/publictransportdataengine.cpp
- engine/publictransportdataengine.h
- engine/serviceprovider.h
- engine/gtfs/gtfsdatabase.h
- engine/gtfs/gtfsservice.cpp
- engine/gtfs/gtfsservice.h
- engine/gtfs/publictransport.operations
- engine/gtfs/serviceprovidergtfs.cpp
- engine/gtfs/serviceprovidergtfs.h