| Top |
| void | (*LpfProviderGotLocsNotify) () |
| void | (*LpfProviderGotTripsNotify) () |
| LpfProvider * | (*LpfProviderCreateFunc) () |
| LpfProvider * | lpf_provider_create () |
| const char * | lpf_provider_get_name () |
| void | lpf_provider_activate () |
| void | lpf_provider_deactivate () |
| GQuark | lpf_provider_error_quark () |
| gint | lpf_provider_get_locs () |
| void | lpf_provider_free_locs () |
| gint | lpf_provider_get_trips () |
| void | lpf_provider_free_trips () |
| #define | LPF_PROVIDER_MAJOR_VERSION |
| #define | LPF_PROVIDER_MINOR_VERSION |
| #define | LPF_PROVIDER_ERROR |
| enum | LpfProviderError |
| enum | LpfProviderGetLocsFlags |
| enum | LpfProviderGetTripsFlags |
| #define | LPF_PROVIDER_PROP_NAME |
| LpfProviderInterface |
A LpfProvider represents a provider of public transport information such as timetables or location information
void (*LpfProviderGotLocsNotify) (GSList *locs,gpointer user_data,GError *err);
Callback invoked after the locations matching the query were
received. In case of an error locs
is NULL.
void (*LpfProviderGotTripsNotify) (GSList *trips,gpointer user_data,GError *err);
Callback invoked after the trips matching the query were
received. In case of an error trips
is NULL.
gint lpf_provider_get_locs (LpfProvider *self,const gchar *match,LpfProviderGetLocsFlags flags,LpfProviderGotLocsNotify callback,gpointer user_data);
Initiate a lookup for locations that match match
. Once complete
callback
is invoked with a GSList of matched LpfLocation s. The
caller is responsible for freeing the locations list via
lpf_provider_free_locs.
self |
||
match |
locations to match |
|
flags |
LpfProviderGetLocsFlags for loation lookup |
|
callback |
LpfProviderGotLocsNotify to invoke once locations are available. |
[scope async] |
user_data |
User data for the callback. |
[allow-none] |
void lpf_provider_free_locs (LpfProvider *self,GSList *locs);
Free the location list
gint lpf_provider_get_trips (LpfProvider *self,LpfLoc *start,LpfLoc *end,GDateTime *date,LpfProviderGetTripsFlags flags,LpfProviderGotLocsNotify callback,gpointer user_data);
Initiate a lookup for trips starting at the location start
, ending
at end
and starting (or depending on flags
) ending at date
.
Once completed callback
is invoked with a GSList of matched
trips. The caller is responsible for freeing the locations list via
lpf_provider_free_trips.
self |
||
start |
start of trip location |
|
end |
end of trip location |
|
date |
Date and time the trip starts as GDateTime |
|
flags |
LpfProviderGetTripsFlags for trip lookups |
|
callback |
LpfProviderGotTripsNotify to invoke once trips are available. |
[scope async] |
user_data |
User data for the callback. |
[allow-none] |
void lpf_provider_free_trips (LpfProvider *self,GSList *trips);
Free the trips list
Flags passed to lpf_provider_get_locs. Currently only here for symmetry with other API functions.
typedef struct {
GTypeInterface parent;
void (*activate) (LpfProvider *self, GObject *obj);
void (*deactivate) (LpfProvider *self, GObject *obj);
const gchar* (*get_name) (LpfProvider *self);
gint (*get_locs) (LpfProvider *self, const gchar *match, LpfProviderGetLocsFlags flags, LpfProviderGotLocsNotify callback, gpointer user_data);
gint (*get_trips) (LpfProvider *self, LpfLoc *start, LpfLoc *end, GDateTime *date, LpfProviderGetTripsFlags flags, LpfProviderGotLocsNotify callback, gpointer user_data);
} LpfProviderInterface;