/* diversity-sms.h - DiversitySms * * 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_SMS_H_ #define _DIVERSITY_SMS_H_ #define G_DISABLE_CAST_CHECKS #include #include G_BEGIN_DECLS #define DIVERSITY_TYPE_SMS (diversity_sms_get_type()) #define DIVERSITY_SMS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), DIVERSITY_TYPE_SMS, DiversitySms)) #define DIVERSITY_IS_SMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), DIVERSITY_TYPE_SMS)) #define DIVERSITY_SMS_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), DIVERSITY_TYPE_SMS, DiversitySmsIface)) typedef struct _DiversitySms DiversitySms; /* dummy */ typedef struct _DiversitySmsIface DiversitySmsIface; typedef enum _DiversitySmsStatus DiversitySmsStatus; enum _DiversitySmsStatus { DIVERSITY_SMS_STATUS_NOTREADY, DIVERSITY_SMS_STATUS_READY, }; struct _DiversitySmsIface { GTypeInterface base_iface; /* methods */ DiversitySmsStatus (*get_status)(DiversitySms *sms); gboolean (*send)(DiversitySms *sms, const gchar *number, const gchar *message, gboolean ask_ds, GError **error); /* signals */ void (*status_changed)(DiversitySms *sms, DiversitySmsStatus status); }; GType diversity_sms_get_type(void) G_GNUC_CONST; DiversitySmsStatus diversity_sms_get_status(DiversitySms *sms); gboolean diversity_sms_send(DiversitySms *sms, const gchar *number, const gchar *message, gboolean ask_ds, GError **error); G_END_DECLS #endif /* _DIVERSITY_SMS_H_ */