Bug 793125 - Crash due to popup menus left attached too long
[evolution.git] / src / calendar / gui / e-cal-ops.h
blobf465a8dd9e6933241d96c0f1b3d8e98c18de6fef
1 /*
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
11 * for more details.
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>
19 #ifndef E_CAL_OPS_H
20 #define E_CAL_OPS_H
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,
28 ECalClient *client,
29 icalcomponent *original_icalcomp,
30 const gchar *new_uid,
31 gpointer user_data);
32 typedef void (* ECalOpsGetDefaultComponentFunc) (ECalModel *model,
33 ECalClient *client,
34 icalcomponent *default_component,
35 gpointer user_data);
37 typedef enum {
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
44 } ECalOpsSendFlags;
46 void e_cal_ops_create_component (ECalModel *model,
47 ECalClient *client,
48 icalcomponent *icalcomp,
49 ECalOpsCreateComponentFunc callback,
50 gpointer user_data,
51 GDestroyNotify user_data_free);
52 void e_cal_ops_modify_component (ECalModel *model,
53 ECalClient *client,
54 icalcomponent *icalcomp,
55 ECalObjModType mod,
56 ECalOpsSendFlags send_flags);
57 void e_cal_ops_remove_component (ECalModel *model,
58 ECalClient *client,
59 const gchar *uid,
60 const gchar *rid,
61 ECalObjModType mod,
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,
68 ECalClient *client,
69 icalcomponent *icalcomp);
70 void e_cal_ops_purge_components (ECalModel *model,
71 time_t older_than);
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,
75 gboolean all_day,
76 ECalOpsGetDefaultComponentFunc callback,
77 gpointer user_data,
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,
86 gboolean is_meeting,
87 gboolean all_day,
88 gboolean use_default_reminder,
89 gint default_reminder_interval,
90 EDurationType default_reminder_units,
91 time_t dtstart,
92 time_t dtend);
93 void e_cal_ops_new_component_editor_from_model
94 (ECalModel *model,
95 const gchar *for_client_uid,
96 time_t dtstart,
97 time_t dtend,
98 gboolean is_assigned,
99 gboolean all_day);
100 void e_cal_ops_open_component_in_editor_sync (ECalModel *model,
101 ECalClient *client,
102 icalcomponent *icalcomp,
103 gboolean force_attendees);
105 void e_cal_ops_transfer_components (EShellView *shell_view,
106 ECalModel *model,
107 ECalClientSourceType source_type,
108 GHashTable *icalcomps_by_source, /* ESource ~> GSList{icalcomponent} */
109 ESource *destination,
110 gboolean is_move);
112 #endif /* E_CAL_OPS_H */