1 /* 2 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) 3 * Copyright (C) 2019 Red Hat, Inc. (www.redhat.com) 4 * 5 * This library is free software: you can redistribute it and/or modify it 6 * under the terms of the GNU Lesser General Public License as published by 7 * the Free Software Foundation. 8 * 9 * This library is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 12 * for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public License 15 * along with this library. If not, see <http://www.gnu.org/licenses/>. 16 * 17 */ 18 19 #if !defined (__LIBECAL_H_INSIDE__) && !defined (LIBECAL_COMPILATION) 20 #error "Only <libecal/libecal.h> should be included directly." 21 #endif 22 23 #ifndef E_CAL_COMPONENT_ALARMS_H 24 #define E_CAL_COMPONENT_ALARMS_H 25 26 #include <glib-object.h> 27 #include <libecal/e-cal-component-alarm-instance.h> 28 29 G_BEGIN_DECLS 30 31 /* Forward declaration */ 32 struct _ECalComponent; 33 34 /** 35 * ECalComponentAlarms: 36 * 37 * Opaque structure, which represents alarm trigger instances for a particular component. 38 * Use the functions below to work with it. 39 **/ 40 typedef struct _ECalComponentAlarms ECalComponentAlarms; 41 42 GType e_cal_component_alarms_get_type (void); 43 ECalComponentAlarms * 44 e_cal_component_alarms_new (struct _ECalComponent *comp); 45 ECalComponentAlarms * 46 e_cal_component_alarms_copy (const ECalComponentAlarms *alarms); 47 void e_cal_component_alarms_free (gpointer alarms); /* ECalComponentAlarms * */ 48 struct _ECalComponent * 49 e_cal_component_alarms_get_component 50 (const ECalComponentAlarms *alarms); 51 GSList * e_cal_component_alarms_get_instances /* ECalComponentAlarmInstance * */ 52 (const ECalComponentAlarms *alarms); 53 void e_cal_component_alarms_set_instances 54 (ECalComponentAlarms *alarms, 55 const GSList *instances); /* ECalComponentAlarmInstance * */ 56 void e_cal_component_alarms_take_instances 57 (ECalComponentAlarms *alarms, 58 GSList *instances); /* ECalComponentAlarmInstance * */ 59 void e_cal_component_alarms_add_instance 60 (ECalComponentAlarms *alarms, 61 const ECalComponentAlarmInstance *instance); 62 void e_cal_component_alarms_take_instance 63 (ECalComponentAlarms *alarms, 64 ECalComponentAlarmInstance *instance); 65 gboolean e_cal_component_alarms_remove_instance 66 (ECalComponentAlarms *alarms, 67 const ECalComponentAlarmInstance *instance); 68 69 G_END_DECLS 70 71 #endif /* E_CAL_COMPONENT_ALARMS_H */ 72