LibPublicTransportation
Goal
- Separate application implementation (UI) and providers : use a library for providers
- LibPublicTransportation that can be used in different applications
- Extendable via plugins (called providers)
Implementation
A provider is a class that is able to fetch information about public transportation and provide them to other classes.
A provider can have many capabilities
- Display timetables
- Display a map
- Display when a transport will pass to a station (real time)
- Routing
- etc.
A provider is then an interface (Qt plugin interface) that has these methods
- A method to return information about the provider (name, description, author, country)
- A method to return provider capabilities
- A method to display timetables
- A method to display a map
- etc
And each plugin will implement this interface and declare it through Qt plugins.
The LibPublicTransportation also provides a class that manages plugins. This class should be used by applications in order to get the available providers and to query them.
In the future, if more needs come, the provider interface should evolve in order to provide more informations ...
Work done
- Plugin architecture
- XML file to describe a provider
- XML file to store lines and stations
- Loading plugins (basic)
- Lausanne's TL provider (test provider)
- Caching
- Real time information about the time to wait
Future work
- More work on the plugin loader
- Initial release
How to contribute