/* diversity-nmea.h - DiversityNmea * * Copyright 2008 OpenMoko, Inc. * Authored by Chia-I Wu * * 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _DIVERSITY_NMEA_H_ #define _DIVERSITY_NMEA_H_ #define G_DISABLE_CAST_CHECKS #include #include #include G_BEGIN_DECLS #define DIVERSITY_TYPE_NMEA (diversity_nmea_get_type()) #define DIVERSITY_NMEA(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), DIVERSITY_TYPE_NMEA, DiversityNmea)) #define DIVERSITY_NMEA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), DIVERSITY_TYPE_NMEA, DiversityNmeaClass)) #define DIVERSITY_IS_NMEA(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), DIVERSITY_TYPE_NMEA)) #define DIVERSITY_IS_NMEA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), DIVERSITY_TYPE_NMEA)) #define DIVERSITY_NMEA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), DIVERSITY_TYPE_NMEA, DiversityNmeaClass)) typedef struct _DiversityNmea DiversityNmea; typedef struct _DiversityNmeaClass DiversityNmeaClass; struct _DiversityNmea { DiversityEquipment parent_object; }; struct _DiversityNmeaClass { DiversityEquipmentClass parent_class; void (*throttle_changed)(DiversityNmea *nmea, gint sec, gboolean hard); void (*gprmc)(DiversityNmea *nmea, gboolean fixed, gdouble lon, gdouble lat); }; GType diversity_nmea_get_type(void) G_GNUC_CONST; DiversityNmea *diversity_nmea_new(void); void diversity_nmea_set_log(DiversityNmea *nmea, const gchar *log); const gchar *diversity_nmea_get_log(DiversityNmea *nmea); void diversity_nmea_throttle(DiversityNmea *nmea, gint sec, gboolean hard); void diversity_nmea_add_pipe(DiversityNmea *nmea, GIOChannel *ch); void diversity_nmea_remove_pipe(DiversityNmea *nmea, GIOChannel *ch); G_END_DECLS #endif /* _DIVERSITY_NMEA_H_ */