![]() |
![]() |
![]() |
Gypsy Reference Manual | ![]() |
---|---|---|---|---|
GypsyCourse; #define GYPSY_COURSE_DBUS_INTERFACE #define GYPSY_COURSE_DBUS_SERVICE enum GypsyCourseFields; GypsyCourse* gypsy_course_new (const char *object_path); GypsyCourseFields gypsy_course_get_course (GypsyCourse *course, int *timestamp, double *speed, double *direction, double *climb, GError **error);
#define GYPSY_COURSE_DBUS_INTERFACE "org.freedesktop.Gypsy.Course"
A define containing the name of the Course interface
#define GYPSY_COURSE_DBUS_SERVICE "org.freedesktop.Gypsy"
A define containing the address of the Course service
typedef enum { GYPSY_COURSE_FIELDS_NONE = 1 << 0, GYPSY_COURSE_FIELDS_SPEED = 1 << 1, GYPSY_COURSE_FIELDS_DIRECTION = 1 << 2, GYPSY_COURSE_FIELDS_CLIMB = 1 << 3 } GypsyCourseFields;
A bitfield telling which fields in the course_changed callback are valid
GypsyCourse* gypsy_course_new (const char *object_path);
Creates a new GypsyCourse object that listens for course changes
from the GPS device found at object_path
.
object_path : |
Object path to the GPS device. |
Returns : | A GypsyCourse object |
GypsyCourseFields gypsy_course_get_course (GypsyCourse *course, int *timestamp, double *speed, double *direction, double *climb, GError **error);
Obtains the course details from course
. timestamp
, speed
, direction
and
climb
can be NULL if that detail is not required.
course : |
A GypsyCourse object |
timestamp : |
Pointer for the timestamp to be returned |
speed : |
Pointer for the speed to be returned |
direction : |
Pointer for the direction to be returned |
climb : |
Pointer for the climb to be returned |
error : |
A GError for error return |
Returns : | A bitmask of the fields that are set. |
void user_function (GypsyCourse *fields, gint timestamp, gint speed, gdouble direction, gdouble climb, gdouble arg5, gpointer user_data) : Run First / No Recursion
The ::course-changed signal is emitted when the GPS device
indicates that one or more of the course fields has changed.
The fields which have changed will be indicated in the fields
bitmask.
fields : |
A bitmask of GypsyCourseFields indicating which of the following fields are valid |
timestamp : |
The time this change occurred |
speed : |
The new speed |
direction : |
The new direction |
climb : |
The new rate of climb |
user_data : |
user data set when the signal handler was connected. |