2 * Copyright (C) 2014 Red Hat, Inc. (www.redhat.com)
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 * Authors: Milan Crha <mcrha@redhat.com>
22 #include <libecal/libecal.h>
23 #include <shell/e-shell-window.h>
24 #include <shell/e-shell-view.h>
25 #include <calendar/gui/e-cal-model.h>
27 typedef void (* ECalOpsCreateComponentFunc
) (ECalModel
*model
,
29 icalcomponent
*original_icalcomp
,
32 typedef void (* ECalOpsGetDefaultComponentFunc
) (ECalModel
*model
,
34 icalcomponent
*default_component
,
38 E_CAL_OPS_SEND_FLAG_ASK
= 0,
39 E_CAL_OPS_SEND_FLAG_SEND
= 1 << 0,
40 E_CAL_OPS_SEND_FLAG_DONT_SEND
= 1 << 1,
41 E_CAL_OPS_SEND_FLAG_IS_NEW_COMPONENT
= 1 << 2,
42 E_CAL_OPS_SEND_FLAG_ONLY_NEW_ATTENDEES
= 1 << 3,
43 E_CAL_OPS_SEND_FLAG_STRIP_ALARMS
= 1 << 4
46 void e_cal_ops_create_component (ECalModel
*model
,
48 icalcomponent
*icalcomp
,
49 ECalOpsCreateComponentFunc callback
,
51 GDestroyNotify user_data_free
);
52 void e_cal_ops_modify_component (ECalModel
*model
,
54 icalcomponent
*icalcomp
,
56 ECalOpsSendFlags send_flags
);
57 void e_cal_ops_remove_component (ECalModel
*model
,
62 gboolean check_detached_instance
);
63 void e_cal_ops_delete_ecalmodel_components (ECalModel
*model
,
64 const GSList
*objects
); /* data is 'ECalModelComponent *' */
65 void e_cal_ops_paste_components (ECalModel
*model
,
66 const gchar
*icalcompstr
);
67 void e_cal_ops_send_component (ECalModel
*model
,
69 icalcomponent
*icalcomp
);
70 void e_cal_ops_purge_components (ECalModel
*model
,
72 void e_cal_ops_delete_completed_tasks (ECalModel
*model
);
73 void e_cal_ops_get_default_component (ECalModel
*model
,
74 const gchar
*for_client_uid
,
76 ECalOpsGetDefaultComponentFunc callback
,
78 GDestroyNotify user_data_free
);
80 void e_cal_ops_new_component_editor (EShellWindow
*shell_window
,
81 ECalClientSourceType source_type
,
82 const gchar
*for_client_uid
,
83 gboolean is_assigned
);
84 void e_cal_ops_new_event_editor (EShellWindow
*shell_window
,
85 const gchar
*for_client_uid
,
88 gboolean use_default_reminder
,
89 gint default_reminder_interval
,
90 EDurationType default_reminder_units
,
93 void e_cal_ops_new_component_editor_from_model
95 const gchar
*for_client_uid
,
100 void e_cal_ops_open_component_in_editor_sync (ECalModel
*model
,
102 icalcomponent
*icalcomp
,
103 gboolean force_attendees
);
105 void e_cal_ops_transfer_components (EShellView
*shell_view
,
107 ECalClientSourceType source_type
,
108 GHashTable
*icalcomps_by_source
, /* ESource ~> GSList{icalcomponent} */
109 ESource
*destination
,
112 #endif /* E_CAL_OPS_H */