Merge lp:~wingpanel-devs/wingpanel-indicator-datetime/fresh-ui into lp:~wingpanel-devs/wingpanel-indicator-datetime/trunk
- fresh-ui
- Merge into trunk
Proposed by
Danielle Foré
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Cody Garver | ||||
Approved revision: | 40 | ||||
Merged at revision: | 101 | ||||
Proposed branch: | lp:~wingpanel-devs/wingpanel-indicator-datetime/fresh-ui | ||||
Merge into: | lp:~wingpanel-devs/wingpanel-indicator-datetime/trunk | ||||
Diff against target: |
7651 lines (+7345/-87) 23 files modified
CMakeLists.txt (+7/-4) schemas/CMakeLists.txt (+2/-0) schemas/org.pantheon.desktop.wingpanel.indicators.datetime.gschema.xml (+10/-0) src/CMakeLists.txt (+19/-2) src/Indicator.vala (+65/-21) src/Services/SettingsManager.vala (+36/-0) src/Widgets/Calendar.vala (+0/-60) src/Widgets/calendar/Calendar.vala (+100/-0) src/Widgets/calendar/CalendarModel.vala (+476/-0) src/Widgets/calendar/CalendarView.vala (+161/-0) src/Widgets/calendar/ControlHeader.vala (+55/-0) src/Widgets/calendar/Grid.vala (+182/-0) src/Widgets/calendar/GridDay.vala (+132/-0) src/Widgets/calendar/Header.vala (+69/-0) src/Widgets/calendar/Util.vala (+813/-0) src/Widgets/calendar/WeekLabels.vala (+123/-0) vapi/libecalendar-1.2.deps (+3/-0) vapi/libecalendar-1.2.metadata (+237/-0) vapi/libecalendar-1.2.vapi (+669/-0) vapi/libedataserver-1.2.metadata (+176/-0) vapi/libedataserver-1.2.vapi (+1010/-0) vapi/libical.metadata (+36/-0) vapi/libical.vapi (+2964/-0) |
||||
To merge this branch: | bzr merge lp:~wingpanel-devs/wingpanel-indicator-datetime/fresh-ui | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
WingPanel Devs | Pending | ||
Review via email: mp+282367@code.launchpad.net |
Commit message
add new calendar widget in maya style
Description of the change
This branch provides a new calendar widget in the style of the calendar in maya.
These classes are from maya and are slightly tweaked for the new context.
Widgets/
Widgets/
Widgets/
Widgets/
Widgets/
Widgets/
Widgets/
Widgets/
The vapi files are also copied from maya.
So new code is
Widgets/
and in Indicator.vala
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2015-06-19 21:46:36 +0000 |
3 | +++ CMakeLists.txt 2016-02-03 23:24:26 +0000 |
4 | @@ -37,14 +37,17 @@ |
5 | # Traslation stuff |
6 | add_subdirectory (po) |
7 | |
8 | +# GSettings schema |
9 | +add_subdirectory (schemas) |
10 | + |
11 | # Code |
12 | add_subdirectory(src) |
13 | |
14 | # Uninstall target |
15 | configure_file( |
16 | - "${CMAKE_SOURCE_DIR}/cmake/Uninstall.cmake" |
17 | - "${CMAKE_CURRENT_BINARY_DIR}/Uninstall.cmake" |
18 | - IMMEDIATE @ONLY) |
19 | + "${CMAKE_SOURCE_DIR}/cmake/Uninstall.cmake" |
20 | + "${CMAKE_CURRENT_BINARY_DIR}/Uninstall.cmake" |
21 | + IMMEDIATE @ONLY) |
22 | |
23 | add_custom_target(uninstall |
24 | - COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/Uninstall.cmake) |
25 | + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/Uninstall.cmake) |
26 | |
27 | === added directory 'schemas' |
28 | === added file 'schemas/CMakeLists.txt' |
29 | --- schemas/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
30 | +++ schemas/CMakeLists.txt 2016-02-03 23:24:26 +0000 |
31 | @@ -0,0 +1,2 @@ |
32 | +include(GSettings) |
33 | +add_schema("org.pantheon.desktop.wingpanel.indicators.datetime.gschema.xml") |
34 | |
35 | === added file 'schemas/org.pantheon.desktop.wingpanel.indicators.datetime.gschema.xml' |
36 | --- schemas/org.pantheon.desktop.wingpanel.indicators.datetime.gschema.xml 1970-01-01 00:00:00 +0000 |
37 | +++ schemas/org.pantheon.desktop.wingpanel.indicators.datetime.gschema.xml 2016-02-03 23:24:26 +0000 |
38 | @@ -0,0 +1,10 @@ |
39 | +<?xml version="1.0" encoding="UTF-8"?> |
40 | +<schemalist> |
41 | + <schema path="/org/pantheon/desktop/wingpanel/indicators/datetime/" id="org.pantheon.desktop.wingpanel.indicators.datetime" gettext-domain="datetime-indicator"> |
42 | + <key type="b" name="show-weeks"> |
43 | + <default>false</default> |
44 | + <summary>Show week numbers.</summary> |
45 | + <description>If this is set to true, week numbers will be shown in the calendar.</description> |
46 | + </key> |
47 | + </schema> |
48 | +</schemalist> |
49 | \ No newline at end of file |
50 | |
51 | === modified file 'src/CMakeLists.txt' |
52 | --- src/CMakeLists.txt 2015-05-03 11:51:04 +0000 |
53 | +++ src/CMakeLists.txt 2016-02-03 23:24:26 +0000 |
54 | @@ -1,7 +1,8 @@ |
55 | find_package (PkgConfig) |
56 | |
57 | # Add all your dependencies to the list below |
58 | -pkg_check_modules (DEPS REQUIRED gthread-2.0 gtk+-3.0 wingpanel-2.0 granite) |
59 | +pkg_check_modules (DEPS REQUIRED gthread-2.0 gtk+-3.0 wingpanel-2.0 granite |
60 | + libecal-1.2 libical libsoup-2.4 libedataserver-1.2) |
61 | |
62 | add_definitions (${DEPS_CFLAGS}) |
63 | link_directories (${DEPS_LIBRARY_DIRS}) |
64 | @@ -15,13 +16,29 @@ |
65 | vala_precompile (VALA_C ${CMAKE_PROJECT_NAME} |
66 | Indicator.vala |
67 | Widgets/PanelLabel.vala |
68 | - Widgets/Calendar.vala |
69 | + Widgets/calendar/Calendar.vala |
70 | + Widgets/calendar/CalendarModel.vala |
71 | + Widgets/calendar/CalendarView.vala |
72 | + Widgets/calendar/ControlHeader.vala |
73 | + Widgets/calendar/Util.vala |
74 | + Widgets/calendar/Grid.vala |
75 | + Widgets/calendar/GridDay.vala |
76 | + Widgets/calendar/Header.vala |
77 | + Widgets/calendar/WeekLabels.vala |
78 | Services/TimeManager.vala |
79 | + Services/SettingsManager.vala |
80 | ${CMAKE_CURRENT_BINARY_DIR}/config.vala |
81 | PACKAGES |
82 | wingpanel-2.0 |
83 | + glib-2.0>=2.32 |
84 | granite |
85 | + libecalendar-1.2 |
86 | + libedataserver-1.2 |
87 | + libical |
88 | + libsoup-2.4 |
89 | OPTIONS |
90 | + --target-glib=2.32 |
91 | + --vapidir=${CMAKE_SOURCE_DIR}/vapi |
92 | --thread |
93 | ) |
94 | |
95 | |
96 | === modified file 'src/Indicator.vala' |
97 | --- src/Indicator.vala 2015-10-20 21:45:31 +0000 |
98 | +++ src/Indicator.vala 2016-02-03 23:24:26 +0000 |
99 | @@ -1,5 +1,5 @@ |
100 | /* |
101 | - * Copyright (c) 2011-2015 Wingpanel Developers (http://launchpad.net/wingpanel) |
102 | + * Copyright (c) 2011-2016 Wingpanel Developers (http://launchpad.net/wingpanel) |
103 | * |
104 | * This program is free software; you can redistribute it and/or |
105 | * modify it under the terms of the GNU General Public |
106 | @@ -24,12 +24,15 @@ |
107 | |
108 | private Gtk.Grid main_grid; |
109 | |
110 | - private Wingpanel.Widgets.Button today_button; |
111 | + private Gtk.Label weekday_label; |
112 | + private Gtk.Label date_label; |
113 | |
114 | private Widgets.Calendar calendar; |
115 | |
116 | private Wingpanel.Widgets.Button settings_button; |
117 | |
118 | + private Gtk.Box event_box; |
119 | + |
120 | public Indicator () { |
121 | Object (code_name: Wingpanel.Indicator.DATETIME, |
122 | display_name: _("Date & Time"), |
123 | @@ -46,21 +49,34 @@ |
124 | |
125 | public override Gtk.Widget? get_widget () { |
126 | if (main_grid == null) { |
127 | + int position = 0; |
128 | main_grid = new Gtk.Grid (); |
129 | |
130 | - today_button = new Wingpanel.Widgets.Button (""); |
131 | - today_button.clicked.connect (() => { |
132 | - calendar.show_today (); |
133 | - }); |
134 | + weekday_label = new Gtk.Label (""); |
135 | + weekday_label.get_style_context ().add_class ("h2"); |
136 | + weekday_label.halign = Gtk.Align.START; |
137 | + weekday_label.margin_top = 10; |
138 | + weekday_label.margin_start = 20; |
139 | + main_grid.attach (weekday_label, 0, position++, 1, 1); |
140 | |
141 | - main_grid.attach (today_button, 0, 0, 1, 1); |
142 | + date_label = new Gtk.Label (""); |
143 | + date_label.get_style_context ().add_class ("h3"); |
144 | + date_label.halign = Gtk.Align.START; |
145 | + date_label.margin_start = 20; |
146 | + date_label.margin_top = 10; |
147 | + date_label.margin_bottom = 15; |
148 | + main_grid.attach (date_label, 0, position++, 1, 1); |
149 | |
150 | calendar = new Widgets.Calendar (); |
151 | - calendar.date_doubleclicked.connect (() => { |
152 | + calendar.day_double_click.connect (() => { |
153 | this.close (); |
154 | }); |
155 | - |
156 | - main_grid.attach (calendar, 0, 1, 1, 1); |
157 | + calendar.margin_bottom = 6; |
158 | + |
159 | + main_grid.attach (calendar, 0, position++, 1, 1); |
160 | + |
161 | + event_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); |
162 | + main_grid.attach (event_box, 0, position++, 1, 1); |
163 | |
164 | settings_button = new Wingpanel.Widgets.Button (_("Date & Time Settings…")); |
165 | settings_button.clicked.connect (() => { |
166 | @@ -68,28 +84,61 @@ |
167 | this.close (); |
168 | }); |
169 | |
170 | - main_grid.attach (new Wingpanel.Widgets.Separator (), 0, 2, 1, 1); |
171 | - |
172 | - main_grid.attach (settings_button, 0, 3, 1, 1); |
173 | + main_grid.attach (new Wingpanel.Widgets.Separator (), 0, position++, 1, 1); |
174 | + |
175 | + main_grid.attach (settings_button, 0, position++, 1, 1); |
176 | + |
177 | + calendar.selection_changed.connect ((date) => { |
178 | + Idle.add (update_events); |
179 | + }); |
180 | } |
181 | |
182 | - /* I do have something to display! */ |
183 | this.visible = true; |
184 | |
185 | return main_grid; |
186 | } |
187 | |
188 | + private void update_events_model (E.Source source, Gee.Collection<E.CalComponent> events) { |
189 | + Idle.add (update_events); |
190 | + } |
191 | + |
192 | + private bool update_events () { |
193 | + foreach (var w in event_box.get_children ()) { |
194 | + w.destroy (); |
195 | + } |
196 | + foreach (var e in Widgets.CalendarModel.get_default ().get_events (calendar.selected_date)) { |
197 | + var but = new Wingpanel.Widgets.Button (e.get_label (), e.get_icon ()); |
198 | + event_box.add (but); |
199 | + but.clicked.connect (() => { |
200 | + calendar.show_date_in_maya (e.date); |
201 | + this.close (); |
202 | + }); |
203 | + } |
204 | + |
205 | + event_box.show_all (); |
206 | + return false; |
207 | + } |
208 | + |
209 | public override void opened () { |
210 | update_today_button (); |
211 | + calendar.show_today (); |
212 | + |
213 | Services.TimeManager.get_default ().minute_changed.connect (update_today_button); |
214 | + Widgets.CalendarModel.get_default ().events_added.connect (update_events_model); |
215 | + Widgets.CalendarModel.get_default ().events_updated.connect (update_events_model); |
216 | + Widgets.CalendarModel.get_default ().events_removed.connect (update_events_model); |
217 | } |
218 | |
219 | public override void closed () { |
220 | Services.TimeManager.get_default ().minute_changed.disconnect (update_today_button); |
221 | + Widgets.CalendarModel.get_default ().events_added.disconnect (update_events_model); |
222 | + Widgets.CalendarModel.get_default ().events_updated.disconnect (update_events_model); |
223 | + Widgets.CalendarModel.get_default ().events_removed.disconnect (update_events_model); |
224 | } |
225 | |
226 | private void update_today_button () { |
227 | - today_button.set_caption (Services.TimeManager.get_default ().format (_("%A, %d. %B %Y"))); |
228 | + weekday_label.set_label (Services.TimeManager.get_default ().format ("%A")); |
229 | + date_label.set_label (Services.TimeManager.get_default ().format (_("%B %d, %Y"))); |
230 | } |
231 | |
232 | private void show_settings () { |
233 | @@ -98,13 +147,8 @@ |
234 | } |
235 | } |
236 | |
237 | -public Wingpanel.Indicator? get_indicator (Module module, Wingpanel.IndicatorManager.ServerType server_type) { |
238 | +public Wingpanel.Indicator get_indicator (Module module) { |
239 | debug ("Activating DateTime Indicator"); |
240 | - |
241 | - if (server_type != Wingpanel.IndicatorManager.ServerType.SESSION) { |
242 | - return null; |
243 | - } |
244 | - |
245 | var indicator = new DateTime.Indicator (); |
246 | |
247 | return indicator; |
248 | |
249 | === added file 'src/Services/SettingsManager.vala' |
250 | --- src/Services/SettingsManager.vala 1970-01-01 00:00:00 +0000 |
251 | +++ src/Services/SettingsManager.vala 2016-02-03 23:24:26 +0000 |
252 | @@ -0,0 +1,36 @@ |
253 | +/* |
254 | + * Copyright (c) 2011-2016 elementary Developers (https://launchpad.net/elementary) |
255 | + * |
256 | + * This program is free software; you can redistribute it and/or |
257 | + * modify it under the terms of the GNU General Public |
258 | + * License as published by the Free Software Foundation; either |
259 | + * version 2 of the License, or (at your option) any later version. |
260 | + * |
261 | + * This program is distributed in the hope that it will be useful, |
262 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
263 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
264 | + * General Public License for more details. |
265 | + * |
266 | + * You should have received a copy of the GNU General Public |
267 | + * License along with this program; if not, write to the |
268 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
269 | + * Boston, MA 02111-1307, USA. |
270 | + */ |
271 | + |
272 | +public class DateTime.Services.SettingsManager : Granite.Services.Settings { |
273 | + private static SettingsManager? instance = null; |
274 | + |
275 | + public bool show_weeks{ get; set; } |
276 | + |
277 | + public SettingsManager () { |
278 | + base ("org.pantheon.desktop.wingpanel.indicators.datetime"); |
279 | + } |
280 | + |
281 | + public static SettingsManager get_default () { |
282 | + if (instance == null) { |
283 | + instance = new SettingsManager (); |
284 | + } |
285 | + |
286 | + return instance; |
287 | + } |
288 | +} |
289 | \ No newline at end of file |
290 | |
291 | === removed file 'src/Widgets/Calendar.vala' |
292 | --- src/Widgets/Calendar.vala 2015-10-20 21:45:32 +0000 |
293 | +++ src/Widgets/Calendar.vala 1970-01-01 00:00:00 +0000 |
294 | @@ -1,60 +0,0 @@ |
295 | -/* |
296 | - * Copyright (c) 2011-2015 Wingpanel Developers (http://launchpad.net/wingpanel) |
297 | - * |
298 | - * This program is free software; you can redistribute it and/or |
299 | - * modify it under the terms of the GNU General Public |
300 | - * License as published by the Free Software Foundation; either |
301 | - * version 2 of the License, or (at your option) any later version. |
302 | - * |
303 | - * This program is distributed in the hope that it will be useful, |
304 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
305 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
306 | - * General Public License for more details. |
307 | - * |
308 | - * You should have received a copy of the GNU General Public |
309 | - * License along with this program; if not, write to the |
310 | - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
311 | - * Boston, MA 02111-1307, USA. |
312 | - */ |
313 | - |
314 | -public class DateTime.Widgets.Calendar : Gtk.Calendar { |
315 | - private const string CALENDAR_EXEC = "/usr/bin/maya-calendar"; |
316 | - |
317 | - public signal void date_doubleclicked (); |
318 | - |
319 | - public Calendar () { |
320 | - this.margin_start = 10; |
321 | - this.margin_end = 10; |
322 | - |
323 | - this.day_selected_double_click.connect (() => { |
324 | - show_date_in_maya (); |
325 | - date_doubleclicked (); |
326 | - }); |
327 | - } |
328 | - |
329 | - public void show_today () { |
330 | - var current_time = Services.TimeManager.get_default ().get_current_time (); |
331 | - |
332 | - if (current_time == null) { |
333 | - return; |
334 | - } |
335 | - |
336 | - this.select_month (current_time.get_month () - 1, current_time.get_year ()); |
337 | - this.select_day (current_time.get_day_of_month ()); |
338 | - } |
339 | - |
340 | - /* TODO: As far as maya supports it use the Dbus Activation feature to run the calendar-app. */ |
341 | - private void show_date_in_maya () { |
342 | - uint selected_year, selected_month, selected_day; |
343 | - this.get_date (out selected_year, out selected_month, out selected_day); |
344 | - |
345 | - /* Month-correction */ |
346 | - selected_month += 1; |
347 | - |
348 | - var parameter_string = @" --show-day $selected_day/$selected_month/$selected_year"; |
349 | - var command = CALENDAR_EXEC + parameter_string; |
350 | - |
351 | - var cmd = new Granite.Services.SimpleCommand ("/usr/bin", command); |
352 | - cmd.run (); |
353 | - } |
354 | -} |
355 | \ No newline at end of file |
356 | |
357 | === added directory 'src/Widgets/calendar' |
358 | === added file 'src/Widgets/calendar/Calendar.vala' |
359 | --- src/Widgets/calendar/Calendar.vala 1970-01-01 00:00:00 +0000 |
360 | +++ src/Widgets/calendar/Calendar.vala 2016-02-03 23:24:26 +0000 |
361 | @@ -0,0 +1,100 @@ |
362 | +/* |
363 | + * Copyright (c) 2011-2016 elementary Developers (https://launchpad.net/elementary) |
364 | + * |
365 | + * This program is free software; you can redistribute it and/or |
366 | + * modify it under the terms of the GNU General Public |
367 | + * License as published by the Free Software Foundation; either |
368 | + * version 2 of the License, or (at your option) any later version. |
369 | + * |
370 | + * This program is distributed in the hope that it will be useful, |
371 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
372 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
373 | + * General Public License for more details. |
374 | + * |
375 | + * You should have received a copy of the GNU General Public |
376 | + * License along with this program; if not, write to the |
377 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
378 | + * Boston, MA 02111-1307, USA. |
379 | + */ |
380 | + |
381 | +namespace DateTime.Widgets { |
382 | + public class Calendar : Gtk.Box { |
383 | + private const string CALENDAR_EXEC = "/usr/bin/maya-calendar"; |
384 | + |
385 | + ControlHeader heading; |
386 | + CalendarView cal; |
387 | + public signal void selection_changed (GLib.DateTime new_date); |
388 | + public signal void day_double_click (GLib.DateTime date); |
389 | + |
390 | + public GLib.DateTime? selected_date { get { |
391 | + return cal.selected_date; |
392 | + } set { |
393 | + }} |
394 | + |
395 | + public Calendar () { |
396 | + Object (orientation: Gtk.Orientation.VERTICAL, halign: Gtk.Align.CENTER, valign: Gtk.Align.CENTER, can_focus: false); |
397 | + this.margin_start = 10; |
398 | + this.margin_end = 10; |
399 | + heading = new ControlHeader (); |
400 | + cal = new CalendarView (); |
401 | + cal.selection_changed.connect ((date) => { |
402 | + selection_changed (date); |
403 | + }); |
404 | + cal.on_event_add.connect ((date) => { |
405 | + show_date_in_maya (date); |
406 | + day_double_click (date); |
407 | + }); |
408 | + heading.left_clicked.connect (() => { |
409 | + CalendarModel.get_default ().change_month (-1); |
410 | + }); |
411 | + heading.right_clicked.connect (() => { |
412 | + CalendarModel.get_default ().change_month (1); |
413 | + }); |
414 | + heading.center_clicked.connect (() => { |
415 | + cal.today (); |
416 | + }); |
417 | + add (heading); |
418 | + add (cal); |
419 | + } |
420 | + |
421 | + public void show_today () { |
422 | + cal.today (); |
423 | + } |
424 | + |
425 | + // TODO: As far as maya supports it use the Dbus Activation feature to run the calendar-app. |
426 | + public void show_date_in_maya (GLib.DateTime date) { |
427 | + int selected_year, selected_month, selected_day; |
428 | + selected_year = date.get_year (); |
429 | + selected_month = date.get_month (); |
430 | + selected_day= date.get_day_of_month (); |
431 | + |
432 | + var parameter_string = @" --show-day $selected_day/$selected_month/$selected_year"; |
433 | + var command = CALENDAR_EXEC + parameter_string; |
434 | + |
435 | + var cmd = new Granite.Services.SimpleCommand ("/usr/bin", command); |
436 | + cmd.run (); |
437 | + } |
438 | + |
439 | + public override bool draw (Cairo.Context cr) { |
440 | + base.draw (cr); |
441 | + Gtk.Allocation size; |
442 | + cal.get_allocation (out size); |
443 | + cr.set_source_rgba (0.0, 0.0, 0.0, 0.25); |
444 | + cr.set_line_width (1.0); |
445 | + int y = 59; |
446 | + int height = size.height - 25; |
447 | + cr.move_to (4.5, y + 0.5); |
448 | + cr.line_to (size.width - 4.5, y + 0.5); |
449 | + cr.curve_to (size.width - 4.5, y + 0.5, size.width - 0.5, y + 0.5, size.width - 0.5, y + 4.5); |
450 | + cr.line_to (size.width - 0.5, y + height - 4.5); |
451 | + cr.curve_to (size.width - 0.5, y + height - 4.5, size.width - 0.5, y + height - 0.5, size.width - 4.5, y + height - 0.5); |
452 | + cr.line_to (4.5, y + height - 0.5); |
453 | + cr.curve_to (4.5, y + height - 0.5, 0.5, y + height - 0.5, 0.5, y + height - 4.5); |
454 | + cr.line_to (0.5, y + 4.5); |
455 | + cr.curve_to (0.5, y + 4.5, 0.5, y + 0.5, 4.5, y + 0.5); |
456 | + cr.stroke (); |
457 | + |
458 | + return false; |
459 | + } |
460 | + } |
461 | +} |
462 | \ No newline at end of file |
463 | |
464 | === added file 'src/Widgets/calendar/CalendarModel.vala' |
465 | --- src/Widgets/calendar/CalendarModel.vala 1970-01-01 00:00:00 +0000 |
466 | +++ src/Widgets/calendar/CalendarModel.vala 2016-02-03 23:24:26 +0000 |
467 | @@ -0,0 +1,476 @@ |
468 | +/* |
469 | + * Copyright (c) 2011-2016 elementary Developers (https://launchpad.net/elementary) |
470 | + * |
471 | + * This program is free software; you can redistribute it and/or |
472 | + * modify it under the terms of the GNU General Public |
473 | + * License as published by the Free Software Foundation; either |
474 | + * version 2 of the License, or (at your option) any later version. |
475 | + * |
476 | + * This program is distributed in the hope that it will be useful, |
477 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
478 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
479 | + * General Public License for more details. |
480 | + * |
481 | + * You should have received a copy of the GNU General Public |
482 | + * License along with this program; if not, write to the |
483 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
484 | + * Boston, MA 02111-1307, USA. |
485 | + */ |
486 | + |
487 | +/* |
488 | + * This program is free software: you can redistribute it and/or modify |
489 | + * it under the terms of the GNU General Public License as published by |
490 | + * the Free Software Foundation, either version 3 of the License, or |
491 | + * (at your option) any later version. |
492 | + * |
493 | + * This program is distributed in the hope that it will be useful, |
494 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
495 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
496 | + * GNU General Public License for more details. |
497 | + * |
498 | + * You should have received a copy of the GNU General Public License |
499 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
500 | + * |
501 | + */ |
502 | +namespace DateTime.Widgets { |
503 | + public class Event : GLib.Object { |
504 | + public GLib.DateTime date; |
505 | + Util.DateRange range; |
506 | + public string summary; |
507 | + public bool day_event = false; |
508 | + public bool alarm = false; |
509 | + public GLib.DateTime start_time; |
510 | + public GLib.DateTime end_time; |
511 | + |
512 | + public Event (GLib.DateTime date, Util.DateRange range, iCal.Component comp) { |
513 | + this.date = date; |
514 | + this.range = range; |
515 | + this.summary = comp.get_summary (); |
516 | + |
517 | + Util.get_local_datetimes_from_icalcomponent (comp, out start_time, out end_time); |
518 | + if (end_time == null) { |
519 | + alarm = true; |
520 | + } else if (Util.is_the_all_day (start_time, end_time)) { |
521 | + day_event = true; |
522 | + return; |
523 | + } |
524 | + } |
525 | + |
526 | + public string get_label () { |
527 | + if (day_event) { |
528 | + return summary; |
529 | + } else if (alarm) { |
530 | + return "%s - %s".printf (start_time.format (Util.TimeFormat ()), summary); |
531 | + } else if (range.days > 0 && date.compare (range.first) != 0) { |
532 | + return summary; |
533 | + } |
534 | + return "%s - %s".printf (summary, start_time.format (Util.TimeFormat ())); |
535 | + } |
536 | + |
537 | + public string get_icon () { |
538 | + if (alarm) { |
539 | + return "alarm-symbolic"; |
540 | + } |
541 | + return "office-calendar-symbolic"; |
542 | + } |
543 | + } |
544 | + |
545 | + public class CalendarModel : Object { |
546 | + /* The data_range is the range of dates for which this model is storing |
547 | + * data. The month_range is a subset of this range corresponding to the |
548 | + * calendar month that is being focused on. In summary: |
549 | + * |
550 | + * data_range.first <= month_range.first < month_range.last <= data_range.last |
551 | + * |
552 | + * There is no way to set the ranges publicly. They can only be modified by |
553 | + * changing one of the following properties: month_start, num_weeks, and |
554 | + * week_starts_on. |
555 | + */ |
556 | + public Util.DateRange data_range { get; private set; } |
557 | + public Util.DateRange month_range { get; private set; } |
558 | + public E.SourceRegistry registry { get; private set; } |
559 | + |
560 | + /* The first day of the month */ |
561 | + public GLib.DateTime month_start { get; set; } |
562 | + |
563 | + /* The number of weeks to show in this model */ |
564 | + public int num_weeks { get; private set; default = 6; } |
565 | + |
566 | + /* The start of week, ie. Monday=1 or Sunday=7 */ |
567 | + public Weekday week_starts_on { get; set; } |
568 | + |
569 | + /* Notifies when events are added, updated, or removed */ |
570 | + public signal void events_added (E.Source source, Gee.Collection<E.CalComponent> events); |
571 | + public signal void events_updated (E.Source source, Gee.Collection<E.CalComponent> events); |
572 | + public signal void events_removed (E.Source source, Gee.Collection<E.CalComponent> events); |
573 | + |
574 | + public signal void connecting (E.Source source, Cancellable cancellable); |
575 | + public signal void connected (E.Source source); |
576 | + public signal void error_received (string error); |
577 | + |
578 | + /* The month_start, num_weeks, or week_starts_on have been changed */ |
579 | + public signal void parameters_changed (); |
580 | + |
581 | + HashTable<string, E.CalClient> source_client; |
582 | + HashTable<string, E.CalClientView> source_view; |
583 | + HashTable<E.Source, Gee.TreeMap<string, E.CalComponent> > source_events; |
584 | + |
585 | + private static CalendarModel? calendar_model = null; |
586 | + |
587 | + public enum Weekday { |
588 | + SUNDAY, |
589 | + MONDAY, |
590 | + TUESDAY, |
591 | + WEDNESDAY, |
592 | + THURSDAY, |
593 | + FRIDAY, |
594 | + SATURDAY |
595 | + } |
596 | + |
597 | + public static CalendarModel get_default () { |
598 | + if (calendar_model == null) { |
599 | + calendar_model = new CalendarModel (); |
600 | + calendar_model.load_all_sources (); |
601 | + } |
602 | + |
603 | + return calendar_model; |
604 | + } |
605 | + |
606 | + private CalendarModel () { |
607 | + /* It's dirty, but there is no other way to get it for the moment. */ |
608 | + string output; |
609 | + int week_start = 2; |
610 | + try { |
611 | + GLib.Process.spawn_command_line_sync ("locale first_weekday", out output, null, null); |
612 | + week_start = int.parse (output); |
613 | + } catch (SpawnError e) { |
614 | + critical (e.message); |
615 | + } |
616 | + |
617 | + switch (week_start) { |
618 | + case 1 : |
619 | + week_starts_on = Weekday.SUNDAY; |
620 | + break; |
621 | + case 2: |
622 | + week_starts_on = Weekday.MONDAY; |
623 | + break; |
624 | + case 3: |
625 | + week_starts_on = Weekday.TUESDAY; |
626 | + break; |
627 | + case 4: |
628 | + week_starts_on = Weekday.WEDNESDAY; |
629 | + break; |
630 | + case 5: |
631 | + week_starts_on = Weekday.THURSDAY; |
632 | + break; |
633 | + case 6: |
634 | + week_starts_on = Weekday.FRIDAY; |
635 | + break; |
636 | + case 7: |
637 | + week_starts_on = Weekday.SATURDAY; |
638 | + break; |
639 | + default: |
640 | + week_starts_on = Weekday.MONDAY; |
641 | + message ("Locale has a bad first_weekday value"); |
642 | + break; |
643 | + } |
644 | + |
645 | + this.month_start = Util.get_start_of_month (); |
646 | + compute_ranges (); |
647 | + |
648 | + source_client = new HashTable<string, E.CalClient> (str_hash, str_equal); |
649 | + source_events = new HashTable<E.Source, Gee.TreeMap<string, E.CalComponent> > (Util.source_hash_func, Util.source_equal_func); |
650 | + source_view = new HashTable<string, E.CalClientView> (str_hash, str_equal); |
651 | + |
652 | + notify["month-start"].connect (on_parameter_changed); |
653 | + try { |
654 | + registry = new E.SourceRegistry.sync (null); |
655 | + registry.source_removed.connect (remove_source); |
656 | + registry.source_changed.connect (on_source_changed); |
657 | + registry.source_added.connect (add_source); |
658 | + |
659 | + /* Add sources */ |
660 | + foreach (var source in registry.list_sources (E.SOURCE_EXTENSION_CALENDAR)) { |
661 | + E.SourceCalendar cal = (E.SourceCalendar)source.get_extension (E.SOURCE_EXTENSION_CALENDAR); |
662 | + |
663 | + if (cal.selected == true && source.enabled == true) { |
664 | + add_source (source); |
665 | + } |
666 | + } |
667 | + } catch (GLib.Error error) { |
668 | + critical (error.message); |
669 | + } |
670 | + } |
671 | + |
672 | + /* --- Public Methods ---// */ |
673 | + |
674 | + public Gee.ArrayList<Event> get_events (GLib.DateTime date) { |
675 | + var events_on_day = new Gee.TreeMap<string,Event> (); |
676 | + foreach (var entry in source_events.get_values ()) { |
677 | + foreach (var comp in entry.values) { |
678 | + unowned iCal.Component ical = comp.get_icalcomponent (); |
679 | + foreach (var dt_range in Util.event_date_ranges (ical, data_range)) { |
680 | + if (dt_range.contains (date)) { |
681 | + if (!events_on_day.has_key (ical.get_uid ())) { |
682 | + events_on_day.set (ical.get_uid (), new Event (date, dt_range, ical)); |
683 | + } |
684 | + } |
685 | + } |
686 | + } |
687 | + } |
688 | + var list = new Gee.ArrayList<Event>.wrap (events_on_day.values.to_array ()); |
689 | + list.sort (sort_events); |
690 | + return list; |
691 | + } |
692 | + |
693 | + public int sort_events (Event e1, Event e2) { |
694 | + if (e1.start_time.compare (e2.start_time) != 0) |
695 | + return e1.start_time.compare(e2.start_time); |
696 | + |
697 | + // If they have the same date, sort them wholeday first |
698 | + if (e1.day_event) |
699 | + return -1; |
700 | + if (e2.day_event) |
701 | + return 1; |
702 | + return 0; |
703 | + } |
704 | + |
705 | + public bool calclient_is_readonly (E.Source source) { |
706 | + E.CalClient client; |
707 | + lock (source_client) { |
708 | + client = source_client.get (source.dup_uid ()); |
709 | + } |
710 | + |
711 | + if (client != null) { |
712 | + return client.is_readonly (); |
713 | + } else { |
714 | + critical ("No calendar client was found"); |
715 | + } |
716 | + |
717 | + return true; |
718 | + } |
719 | + |
720 | + public void load_all_sources () { |
721 | + lock (source_client) { |
722 | + foreach (var id in source_client.get_keys ()) { |
723 | + var source = registry.ref_source (id); |
724 | + E.SourceCalendar cal = (E.SourceCalendar)source.get_extension (E.SOURCE_EXTENSION_CALENDAR); |
725 | + |
726 | + if (cal.selected == true && source.enabled == true) { |
727 | + load_source (source); |
728 | + } |
729 | + } |
730 | + } |
731 | + } |
732 | + |
733 | + public void add_source (E.Source source) { |
734 | + add_source_async.begin (source); |
735 | + } |
736 | + |
737 | + public void remove_source (E.Source source) { |
738 | + debug ("Removing source '%s'", source.dup_display_name ()); |
739 | + /* Already out of the model, so do nothing */ |
740 | + var uid = source.dup_uid (); |
741 | + |
742 | + if (!source_view.contains (uid)) { |
743 | + return; |
744 | + } |
745 | + |
746 | + var current_view = source_view.get (uid); |
747 | + try { |
748 | + current_view.stop (); |
749 | + } catch (Error e) { |
750 | + warning (e.message); |
751 | + } |
752 | + |
753 | + source_view.remove (uid); |
754 | + lock (source_client) { |
755 | + source_client.remove (uid); |
756 | + } |
757 | + |
758 | + var events = source_events.get (source).values.read_only_view; |
759 | + events_removed (source, events); |
760 | + source_events.remove (source); |
761 | + } |
762 | + |
763 | + public void change_month (int relative) { |
764 | + month_start = month_start.add_months (relative); |
765 | + } |
766 | + |
767 | + public void change_year (int relative) { |
768 | + month_start = month_start.add_years (relative); |
769 | + } |
770 | + |
771 | + /* --- Helper Methods ---// */ |
772 | + |
773 | + private void compute_ranges () { |
774 | + var month_end = month_start.add_full (0, 1, -1); |
775 | + month_range = new Util.DateRange (month_start, month_end); |
776 | + |
777 | + int dow = month_start.get_day_of_week (); |
778 | + int wso = (int)week_starts_on; |
779 | + int offset = 0; |
780 | + |
781 | + if (wso < dow) { |
782 | + offset = dow - wso; |
783 | + } else if (wso > dow) { |
784 | + offset = 7 + dow - wso; |
785 | + } |
786 | + |
787 | + var data_range_first = month_start.add_days (-offset); |
788 | + |
789 | + dow = month_end.get_day_of_week (); |
790 | + wso = (int)(week_starts_on + 6); |
791 | + |
792 | + /* WSO must be between 1 and 7 */ |
793 | + if (wso > 7) { |
794 | + wso = wso - 7; |
795 | + } |
796 | + |
797 | + offset = 0; |
798 | + |
799 | + if (wso < dow) { |
800 | + offset = 7 + wso - dow; |
801 | + } else if (wso > dow) { |
802 | + offset = wso - dow; |
803 | + } |
804 | + |
805 | + var data_range_last = month_end.add_days (offset); |
806 | + |
807 | + data_range = new Util.DateRange (data_range_first, data_range_last); |
808 | + num_weeks = data_range.to_list ().size / 7; |
809 | + |
810 | + debug (@"Date ranges: ($data_range_first <= $month_start < $month_end <= $data_range_last)"); |
811 | + } |
812 | + |
813 | + private void load_source (E.Source source) { |
814 | + /* create empty source-event map */ |
815 | + var events = new Gee.TreeMap<string, E.CalComponent> ( |
816 | + (GLib.CompareDataFunc<E.CalComponent> ? )GLib.strcmp, |
817 | + (Gee.EqualDataFunc<E.CalComponent>? )Util.calcomponent_equal_func); |
818 | + source_events.set (source, events); |
819 | + /* query client view */ |
820 | + var iso_first = E.Util.isodate_from_time_t ((time_t)data_range.first.to_unix ()); |
821 | + var iso_last = E.Util.isodate_from_time_t ((time_t)data_range.last.add_days (1).to_unix ()); |
822 | + var query = @"(occur-in-time-range? (make-time \"$iso_first\") (make-time \"$iso_last\"))"; |
823 | + |
824 | + E.CalClient client; |
825 | + lock (source_client) { |
826 | + client = source_client.get (source.dup_uid ()); |
827 | + } |
828 | + |
829 | + if (client == null) { |
830 | + return; |
831 | + } |
832 | + |
833 | + debug ("Getting client-view for source '%s'", source.dup_display_name ()); |
834 | + client.get_view.begin (query, null, (obj, results) => { |
835 | + var view = on_client_view_received (results, source, client); |
836 | + view.objects_added.connect ((objects) => on_objects_added (source, client, objects)); |
837 | + view.objects_removed.connect ((objects) => on_objects_removed (source, client, objects)); |
838 | + view.objects_modified.connect ((objects) => on_objects_modified (source, client, objects)); |
839 | + try { |
840 | + view.start (); |
841 | + } catch (Error e) { |
842 | + critical (e.message); |
843 | + } |
844 | + |
845 | + source_view.set (source.dup_uid (), view); |
846 | + }); |
847 | + } |
848 | + |
849 | + private async void add_source_async (E.Source source) { |
850 | + debug ("Adding source '%s'", source.dup_display_name ()); |
851 | + try { |
852 | + var cancellable = new GLib.Cancellable (); |
853 | + connecting (source, cancellable); |
854 | + var client = new E.CalClient.connect_sync (source, E.CalClientSourceType.EVENTS, -1, cancellable); |
855 | + source_client.insert (source.dup_uid (), client); |
856 | + } catch (Error e) { |
857 | + error_received (e.message); |
858 | + } |
859 | + |
860 | + Idle.add (() => { |
861 | + connected (source); |
862 | + load_source (source); |
863 | + |
864 | + return false; |
865 | + }); |
866 | + } |
867 | + |
868 | + private void debug_event (E.Source source, E.CalComponent event) { |
869 | + unowned iCal.Component comp = event.get_icalcomponent (); |
870 | + debug (@"Event ['$(comp.get_summary())', $(source.dup_display_name()), $(comp.get_uid()))]"); |
871 | + } |
872 | + |
873 | + /* --- Signal Handlers ---// */ |
874 | + private void on_parameter_changed () { |
875 | + compute_ranges (); |
876 | + load_all_sources (); |
877 | + parameters_changed (); |
878 | + } |
879 | + |
880 | + private void on_source_changed (E.Source source) { |
881 | + } |
882 | + |
883 | + private E.CalClientView on_client_view_received (AsyncResult results, E.Source source, E.CalClient client) { |
884 | + E.CalClientView view; |
885 | + try { |
886 | + debug (@"Received client-view for source '%s'", source.dup_display_name ()); |
887 | + bool status = client.get_view.end (results, out view); |
888 | + assert (status == true); |
889 | + } catch (Error e) { |
890 | + critical ("Error loading client-view from source '%s': %s", source.dup_display_name (), e.message); |
891 | + } |
892 | + |
893 | + return view; |
894 | + } |
895 | + |
896 | + private void on_objects_added (E.Source source, E.CalClient client, SList<unowned iCal.Component> objects) { |
897 | + debug (@"Received $(objects.length()) added event(s) for source '%s'", source.dup_display_name ()); |
898 | + var events_from_source = source_events.get (source); |
899 | + var added_events = new Gee.ArrayList<E.CalComponent> ((Gee.EqualDataFunc<E.CalComponent>? )Util.calcomponent_equal_func); |
900 | + |
901 | + foreach (unowned iCal.Component comp in objects) { |
902 | + var event = new E.CalComponent (); |
903 | + event.set_icalcomponent (new iCal.Component.clone (comp)); |
904 | + string uid = comp.get_uid (); |
905 | + debug_event (source, event); |
906 | + events_from_source.set (uid, event); |
907 | + added_events.add (event); |
908 | + } |
909 | + |
910 | + events_added (source, added_events.read_only_view); |
911 | + } |
912 | + |
913 | + private void on_objects_modified (E.Source source, E.CalClient client, SList<unowned iCal.Component> objects) { |
914 | + debug (@"Received $(objects.length()) modified event(s) for source '%s'", source.dup_display_name ()); |
915 | + var updated_events = new Gee.ArrayList<E.CalComponent> ((Gee.EqualDataFunc<E.CalComponent>? )Util.calcomponent_equal_func); |
916 | + |
917 | + foreach (unowned iCal.Component comp in objects) { |
918 | + string uid = comp.get_uid (); |
919 | + E.CalComponent event = source_events.get (source).get (uid); |
920 | + event.set_icalcomponent (new iCal.Component.clone (comp)); |
921 | + updated_events.add (event); |
922 | + debug_event (source, event); |
923 | + } |
924 | + |
925 | + events_updated (source, updated_events.read_only_view); |
926 | + } |
927 | + |
928 | + private void on_objects_removed (E.Source source, E.CalClient client, SList<unowned E.CalComponentId? > cids) { |
929 | + debug (@"Received $(cids.length()) removed event(s) for source '%s'", source.dup_display_name ()); |
930 | + var events_from_source = source_events.get (source); |
931 | + var removed_events = new Gee.ArrayList<E.CalComponent> ((Gee.EqualDataFunc<E.CalComponent>? )Util.calcomponent_equal_func); |
932 | + |
933 | + foreach (unowned E.CalComponentId? cid in cids) { |
934 | + assert (cid != null); |
935 | + E.CalComponent event = events_from_source.get (cid.uid); |
936 | + removed_events.add (event); |
937 | + debug_event (source, event); |
938 | + } |
939 | + |
940 | + events_removed (source, removed_events.read_only_view); |
941 | + } |
942 | + } |
943 | +} |
944 | \ No newline at end of file |
945 | |
946 | === added file 'src/Widgets/calendar/CalendarView.vala' |
947 | --- src/Widgets/calendar/CalendarView.vala 1970-01-01 00:00:00 +0000 |
948 | +++ src/Widgets/calendar/CalendarView.vala 2016-02-03 23:24:26 +0000 |
949 | @@ -0,0 +1,161 @@ |
950 | +// -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- |
951 | +/*- |
952 | + * Copyright (c) 2011-2015 Maya Developers (http://launchpad.net/maya) |
953 | + * |
954 | + * This program is free software: you can redistribute it and/or modify |
955 | + * it under the terms of the GNU General Public License as published by |
956 | + * the Free Software Foundation, either version 3 of the License, or |
957 | + * (at your option) any later version. |
958 | + * |
959 | + * This program is distributed in the hope that it will be useful, |
960 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
961 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
962 | + * GNU General Public License for more details. |
963 | + * |
964 | + * You should have received a copy of the GNU General Public License |
965 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
966 | + * |
967 | + * Authored by: Maxwell Barvian |
968 | + * Corentin Noël <corentin@elementaryos.org> |
969 | + */ |
970 | + |
971 | +/** |
972 | + * Represents the entire calendar, including the headers, the week labels and the grid. |
973 | + */ |
974 | +public class DateTime.Widgets.CalendarView : Gtk.Grid { |
975 | + /* |
976 | + * Event emitted when the day is double clicked or the ENTER key is pressed. |
977 | + */ |
978 | + public signal void on_event_add (GLib.DateTime date); |
979 | + public signal void selection_changed (GLib.DateTime new_date); |
980 | + public signal void event_updates (); |
981 | + |
982 | + public GLib.DateTime? selected_date { get; private set; } |
983 | + |
984 | + private WeekLabels weeks { get; private set; } |
985 | + private Header header { get; private set; } |
986 | + private Grid grid { get; private set; } |
987 | + private Gtk.Stack stack { get; private set; } |
988 | + private Gtk.Grid big_grid { get; private set; } |
989 | + |
990 | + public CalendarView () { |
991 | + big_grid = create_big_grid (); |
992 | + |
993 | + stack = new Gtk.Stack (); |
994 | + stack.add (big_grid); |
995 | + stack.show_all (); |
996 | + stack.expand = true; |
997 | + |
998 | + sync_with_model (); |
999 | + |
1000 | + var model = CalendarModel.get_default (); |
1001 | + model.parameters_changed.connect (on_model_parameters_changed); |
1002 | + |
1003 | + Services.SettingsManager.get_default ().changed["show-weeks"].connect (on_show_weeks_changed); |
1004 | + events |= Gdk.EventMask.BUTTON_PRESS_MASK; |
1005 | + events |= Gdk.EventMask.KEY_PRESS_MASK; |
1006 | + events |= Gdk.EventMask.SCROLL_MASK; |
1007 | + events |= Gdk.EventMask.SMOOTH_SCROLL_MASK; |
1008 | + add (stack); |
1009 | + } |
1010 | + |
1011 | + public Gtk.Grid create_big_grid () { |
1012 | + weeks = new WeekLabels (); |
1013 | + weeks.notify["child-revealed"].connect (() => { |
1014 | + header.queue_draw (); |
1015 | + }); |
1016 | + |
1017 | + header = new Header (); |
1018 | + grid = new Grid (); |
1019 | + grid.on_event_add.connect ((date) => on_event_add (date)); |
1020 | + grid.selection_changed.connect ((date) => { |
1021 | + selected_date = date; |
1022 | + selection_changed (date); |
1023 | + }); |
1024 | + |
1025 | + // Grid properties |
1026 | + var new_big_grid = new Gtk.Grid (); |
1027 | + new_big_grid.attach (header, 1, 0, 1, 1); |
1028 | + new_big_grid.attach (grid, 1, 1, 1, 1); |
1029 | + new_big_grid.attach (weeks, 0, 1, 1, 1); |
1030 | + new_big_grid.show_all (); |
1031 | + new_big_grid.expand = true; |
1032 | + return new_big_grid; |
1033 | + } |
1034 | + |
1035 | + public override bool scroll_event (Gdk.EventScroll event) { |
1036 | + return Util.on_scroll_event (event); |
1037 | + } |
1038 | + |
1039 | + //--- Public Methods ---// |
1040 | + |
1041 | + public void today () { |
1042 | + var calmodel = CalendarModel.get_default (); |
1043 | + var today = Util.strip_time (new GLib.DateTime.now_local ()); |
1044 | + var start = Util.get_start_of_month (today); |
1045 | + selected_date = today; |
1046 | + if (!start.equal (calmodel.month_start)) |
1047 | + calmodel.month_start = start; |
1048 | + sync_with_model (); |
1049 | + grid.focus_date (today); |
1050 | + } |
1051 | + |
1052 | + //--- Signal Handlers ---// |
1053 | + |
1054 | + void on_show_weeks_changed () { |
1055 | + var model = CalendarModel.get_default (); |
1056 | + weeks.update (model.data_range.first, model.num_weeks); |
1057 | + } |
1058 | + |
1059 | + /* Indicates the month has changed */ |
1060 | + void on_model_parameters_changed () { |
1061 | + var model = CalendarModel.get_default (); |
1062 | + if (grid.grid_range != null && model.data_range.equals (grid.grid_range)) |
1063 | + return; // nothing to do |
1064 | + |
1065 | + Idle.add ( () => { |
1066 | + sync_with_model (); |
1067 | + return false; |
1068 | + }); |
1069 | + } |
1070 | + |
1071 | + //--- Helper Methods ---// |
1072 | + |
1073 | + /* Sets the calendar widgets to the date range of the model */ |
1074 | + void sync_with_model () { |
1075 | + var model = CalendarModel.get_default (); |
1076 | + if (grid.grid_range != null && (model.data_range.equals (grid.grid_range) || grid.grid_range.first.compare (model.data_range.first) == 0)) |
1077 | + return; // nothing to do |
1078 | + |
1079 | + GLib.DateTime previous_first = null; |
1080 | + if (grid.grid_range != null) |
1081 | + previous_first = grid.grid_range.first; |
1082 | + var previous_big_grid = big_grid; |
1083 | + big_grid = create_big_grid (); |
1084 | + stack.add (big_grid); |
1085 | + |
1086 | + header.update_columns (model.week_starts_on); |
1087 | + weeks.update (model.data_range.first, model.num_weeks); |
1088 | + grid.set_range (model.data_range, model.month_start); |
1089 | + |
1090 | + // keep focus date on the same day of the month |
1091 | + if (selected_date != null) { |
1092 | + var bumpdate = model.month_start.add_days (selected_date.get_day_of_month() - 1); |
1093 | + grid.focus_date (bumpdate); |
1094 | + } |
1095 | + |
1096 | + if (previous_first != null) { |
1097 | + if (previous_first.compare (grid.grid_range.first) == -1) { |
1098 | + stack.transition_type = Gtk.StackTransitionType.SLIDE_LEFT; |
1099 | + } else { |
1100 | + stack.transition_type = Gtk.StackTransitionType.SLIDE_RIGHT; |
1101 | + } |
1102 | + } |
1103 | + |
1104 | + stack.set_visible_child (big_grid); |
1105 | + Timeout.add (stack.transition_duration, () => { |
1106 | + previous_big_grid.destroy (); |
1107 | + return false; |
1108 | + }); |
1109 | + } |
1110 | +} |
1111 | \ No newline at end of file |
1112 | |
1113 | === added file 'src/Widgets/calendar/ControlHeader.vala' |
1114 | --- src/Widgets/calendar/ControlHeader.vala 1970-01-01 00:00:00 +0000 |
1115 | +++ src/Widgets/calendar/ControlHeader.vala 2016-02-03 23:24:26 +0000 |
1116 | @@ -0,0 +1,55 @@ |
1117 | +/* |
1118 | + * Copyright (c) 2011-2016 elementary Developers (https://launchpad.net/elementary) |
1119 | + * |
1120 | + * This program is free software; you can redistribute it and/or |
1121 | + * modify it under the terms of the GNU General Public |
1122 | + * License as published by the Free Software Foundation; either |
1123 | + * version 2 of the License, or (at your option) any later version. |
1124 | + * |
1125 | + * This program is distributed in the hope that it will be useful, |
1126 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1127 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1128 | + * General Public License for more details. |
1129 | + * |
1130 | + * You should have received a copy of the GNU General Public |
1131 | + * License along with this program; if not, write to the |
1132 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
1133 | + * Boston, MA 02111-1307, USA. |
1134 | + */ |
1135 | + |
1136 | + |
1137 | +namespace DateTime.Widgets { |
1138 | + public class ControlHeader : Gtk.Box { |
1139 | + public signal void left_clicked (); |
1140 | + public signal void right_clicked (); |
1141 | + public signal void center_clicked (); |
1142 | + public ControlHeader () { |
1143 | + Object (orientation : Gtk.Orientation.HORIZONTAL); |
1144 | + var left_button = new Gtk.Button.from_icon_name ("pan-start-symbolic"); |
1145 | + var right_button = new Gtk.Button.from_icon_name ("pan-end-symbolic"); |
1146 | + var center_button = new Gtk.Button.with_label (CalendarModel.get_default ().month_start.format ("%B %Y")); |
1147 | + CalendarModel.get_default ().parameters_changed.connect (() => { |
1148 | + var date = CalendarModel.get_default ().month_start; |
1149 | + center_button.set_label (date.format ("%B %Y")); |
1150 | + }); |
1151 | + left_button.clicked.connect (() => { |
1152 | + left_clicked (); |
1153 | + }); |
1154 | + right_button.clicked.connect (() => { |
1155 | + right_clicked (); |
1156 | + }); |
1157 | + center_button.clicked.connect (() => { |
1158 | + center_clicked (); |
1159 | + }); |
1160 | + left_button.can_focus = false; |
1161 | + right_button.can_focus = false; |
1162 | + center_button.can_focus = false; |
1163 | + add (left_button); |
1164 | + pack_end (right_button, false, false, 0); |
1165 | + pack_end (center_button, true, true, 0); |
1166 | + margin_bottom = 4; |
1167 | + get_style_context ().add_class ("linked"); |
1168 | + set_size_request (-1, 30); |
1169 | + } |
1170 | + } |
1171 | +} |
1172 | \ No newline at end of file |
1173 | |
1174 | === added file 'src/Widgets/calendar/Grid.vala' |
1175 | --- src/Widgets/calendar/Grid.vala 1970-01-01 00:00:00 +0000 |
1176 | +++ src/Widgets/calendar/Grid.vala 2016-02-03 23:24:26 +0000 |
1177 | @@ -0,0 +1,182 @@ |
1178 | +/* |
1179 | + * Copyright (c) 2011-2016 Maya Developers (http://launchpad.net/maya) |
1180 | + * |
1181 | + * This program is free software; you can redistribute it and/or |
1182 | + * modify it under the terms of the GNU General Public |
1183 | + * License as published by the Free Software Foundation; either |
1184 | + * version 2 of the License, or (at your option) any later version. |
1185 | + * |
1186 | + * This program is distributed in the hope that it will be useful, |
1187 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1188 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1189 | + * General Public License for more details. |
1190 | + * |
1191 | + * You should have received a copy of the GNU General Public |
1192 | + * License along with this program; if not, write to the |
1193 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
1194 | + * Boston, MA 02111-1307, USA. |
1195 | + * |
1196 | + * Authored by: Maxwell Barvian |
1197 | + * Corentin Noël <corentin@elementaryos.org> |
1198 | + */ |
1199 | + |
1200 | +namespace DateTime.Widgets { |
1201 | +/** |
1202 | + * Represents the entire date grid as a table. |
1203 | + */ |
1204 | + public class Grid : Gtk.Grid { |
1205 | + Gee.HashMap<uint, GridDay> data; |
1206 | + |
1207 | + public Util.DateRange grid_range { get; private set; } |
1208 | + |
1209 | + /* |
1210 | + * Event emitted when the day is double clicked or the ENTER key is pressed. |
1211 | + */ |
1212 | + public signal void on_event_add (GLib.DateTime date); |
1213 | + |
1214 | + public signal void selection_changed (GLib.DateTime new_date); |
1215 | + |
1216 | + private GridDay selected_gridday; |
1217 | + |
1218 | + public Grid () { |
1219 | + /* Gtk.Grid properties */ |
1220 | + insert_column (7); |
1221 | + set_column_homogeneous (true); |
1222 | + set_row_homogeneous (true); |
1223 | + column_spacing = 0; |
1224 | + row_spacing = 0; |
1225 | + |
1226 | + data = new Gee.HashMap<uint, GridDay> (); |
1227 | + events |= Gdk.EventMask.SCROLL_MASK; |
1228 | + events |= Gdk.EventMask.SMOOTH_SCROLL_MASK; |
1229 | + } |
1230 | + |
1231 | + void on_day_focus_in (GridDay day) { |
1232 | + debug ("on_day_focus_in "+day.date.to_string ()); |
1233 | + if (selected_gridday != null) { |
1234 | + selected_gridday.set_selected (false); |
1235 | + } |
1236 | + |
1237 | + var selected_date = day.date; |
1238 | + selected_gridday = day; |
1239 | + day.set_selected (true); |
1240 | + day.set_state_flags (Gtk.StateFlags.FOCUSED, false); |
1241 | + selection_changed (selected_date); |
1242 | + var calmodel = CalendarModel.get_default (); |
1243 | + var date_month = selected_date.get_month () - calmodel.month_start.get_month (); |
1244 | + var date_year = selected_date.get_year () - calmodel.month_start.get_year (); |
1245 | + |
1246 | + if (date_month != 0 || date_year != 0) { |
1247 | + calmodel.change_month (date_month); |
1248 | + calmodel.change_year (date_year); |
1249 | + } |
1250 | + } |
1251 | + |
1252 | + public void focus_date (GLib.DateTime date) { |
1253 | + debug (@"Setting focus to @ $(date)"); |
1254 | + var date_hash = day_hash (date); |
1255 | + |
1256 | + if (data.has_key (date_hash) == true) { |
1257 | + var day_widget = data.get (date_hash); |
1258 | + day_widget.grab_focus (); |
1259 | + on_day_focus_in (day_widget); |
1260 | + } |
1261 | + } |
1262 | + |
1263 | + /** |
1264 | + * Sets the given range to be displayed in the grid. Note that the number of days |
1265 | + * must remain the same. |
1266 | + */ |
1267 | + public void set_range (Util.DateRange new_range, GLib.DateTime month_start) { |
1268 | + var today = new GLib.DateTime.now_local (); |
1269 | + |
1270 | + Gee.List<GLib.DateTime> old_dates; |
1271 | + |
1272 | + if (grid_range == null) { |
1273 | + old_dates = new Gee.ArrayList<GLib.DateTime> (); |
1274 | + } else { |
1275 | + old_dates = grid_range.to_list (); |
1276 | + } |
1277 | + |
1278 | + var new_dates = new_range.to_list (); |
1279 | + |
1280 | + var data_new = new Gee.HashMap<uint, GridDay> (); |
1281 | + |
1282 | + /* Assert that a valid number of weeks should be displayed */ |
1283 | + assert (new_dates.size % 7 == 0); |
1284 | + |
1285 | + /* Create new widgets for the new range */ |
1286 | + |
1287 | + int i = 0; |
1288 | + int col = 0, row = 0; |
1289 | + |
1290 | + for (i = 0; i < new_dates.size; i++) { |
1291 | + var new_date = new_dates[i]; |
1292 | + GridDay day; |
1293 | + |
1294 | + if (i < old_dates.size) { |
1295 | + /* A widget already exists for this date, just change it */ |
1296 | + |
1297 | + var old_date = old_dates[i]; |
1298 | + day = update_day (data[day_hash (old_date)], new_date, today, month_start); |
1299 | + } else { |
1300 | + /* Still update_day to get the color of etc. right */ |
1301 | + day = update_day (new GridDay (new_date, i), new_date, today, month_start); |
1302 | + day.on_event_add.connect ((date) => on_event_add (date)); |
1303 | + day.scroll_event.connect ((event) => { scroll_event (event); return false; }); |
1304 | + day.focus_in_event.connect ((event) => { |
1305 | + on_day_focus_in (day); |
1306 | + |
1307 | + return false; |
1308 | + }); |
1309 | + |
1310 | + attach (day, col, row, 1, 1); |
1311 | + day.show_all (); |
1312 | + } |
1313 | + |
1314 | + col = (col + 1) % 7; |
1315 | + row = (col == 0) ? row + 1 : row; |
1316 | + data_new.set (day_hash (new_date), day); |
1317 | + } |
1318 | + |
1319 | + /* Destroy the widgets that are no longer used */ |
1320 | + while (i < old_dates.size) { |
1321 | + /* There are widgets remaining that are no longer used, destroy them */ |
1322 | + var old_date = old_dates[i]; |
1323 | + var old_day = data.get (day_hash (old_date)); |
1324 | + |
1325 | + old_day.destroy (); |
1326 | + i++; |
1327 | + } |
1328 | + |
1329 | + data.clear (); |
1330 | + data.set_all (data_new); |
1331 | + |
1332 | + grid_range = new_range; |
1333 | + } |
1334 | + |
1335 | + /** |
1336 | + * Updates the given GridDay so that it shows the given date. Changes to its style etc. |
1337 | + */ |
1338 | + GridDay update_day (GridDay day, GLib.DateTime new_date, GLib.DateTime today, GLib.DateTime month_start) { |
1339 | + if (new_date.get_day_of_year () == today.get_day_of_year () && new_date.get_year () == today.get_year ()) { |
1340 | + day.name = "today"; |
1341 | + day.set_receives_default (true); |
1342 | + } |
1343 | + if (new_date.get_month () == month_start.get_month ()) { |
1344 | + day.sensitive_container (true); |
1345 | + } else { |
1346 | + day.sensitive_container (false); |
1347 | + } |
1348 | + |
1349 | + day.update_date (new_date); |
1350 | + |
1351 | + return day; |
1352 | + } |
1353 | + |
1354 | + uint day_hash (GLib.DateTime date) { |
1355 | + return date.get_year () * 10000 + date.get_month () * 100 + date.get_day_of_month (); |
1356 | + } |
1357 | + |
1358 | + } |
1359 | +} |
1360 | \ No newline at end of file |
1361 | |
1362 | === added file 'src/Widgets/calendar/GridDay.vala' |
1363 | --- src/Widgets/calendar/GridDay.vala 1970-01-01 00:00:00 +0000 |
1364 | +++ src/Widgets/calendar/GridDay.vala 2016-02-03 23:24:26 +0000 |
1365 | @@ -0,0 +1,132 @@ |
1366 | +// -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- |
1367 | +/*- |
1368 | + * Copyright (c) 2011-2015 Maya Developers (http://launchpad.net/maya) |
1369 | + * |
1370 | + * This program is free software: you can redistribute it and/or modify |
1371 | + * it under the terms of the GNU General Public License as published by |
1372 | + * the Free Software Foundation, either version 3 of the License, or |
1373 | + * (at your option) any later version. |
1374 | + * |
1375 | + * This program is distributed in the hope that it will be useful, |
1376 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1377 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1378 | + * GNU General Public License for more details. |
1379 | + * |
1380 | + * You should have received a copy of the GNU General Public License |
1381 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1382 | + * |
1383 | + * Authored by: Maxwell Barvian |
1384 | + * Corentin Noël <corentin@elementaryos.org> |
1385 | + */ |
1386 | + |
1387 | +/** |
1388 | + * Represents a single day on the grid. |
1389 | + */ |
1390 | +public class DateTime.Widgets.GridDay : Gtk.EventBox { |
1391 | + |
1392 | + /* |
1393 | + * Event emitted when the day is double clicked or the ENTER key is pressed. |
1394 | + */ |
1395 | + public signal void on_event_add (GLib.DateTime date); |
1396 | + |
1397 | + public GLib.DateTime date { get; private set; } |
1398 | + Gtk.Label label; |
1399 | + int id; |
1400 | + bool valid_grab = false; |
1401 | + |
1402 | + public GridDay (GLib.DateTime date, int id) { |
1403 | + this.date = date; |
1404 | + this.id = id; |
1405 | + |
1406 | + label = new Gtk.Label (""); |
1407 | + set_size_request (32, 25); |
1408 | + // EventBox Properties |
1409 | + can_focus = true; |
1410 | + events |= Gdk.EventMask.BUTTON_PRESS_MASK; |
1411 | + events |= Gdk.EventMask.KEY_PRESS_MASK; |
1412 | + events |= Gdk.EventMask.SMOOTH_SCROLL_MASK; |
1413 | + var style_provider = Util.Css.get_css_provider (); |
1414 | + get_style_context ().add_provider (style_provider, 600); |
1415 | + get_style_context ().add_class ("cell"); |
1416 | + |
1417 | + label.halign = Gtk.Align.CENTER; |
1418 | + label.valign = Gtk.Align.CENTER; |
1419 | + label.get_style_context ().add_provider (style_provider, 600); |
1420 | + label.name = "date"; |
1421 | + |
1422 | + add (label); |
1423 | + show_all (); |
1424 | + |
1425 | + // Signals and handlers |
1426 | + button_press_event.connect (on_button_press); |
1427 | + key_press_event.connect (on_key_press); |
1428 | + scroll_event.connect ((event) => {return Util.on_scroll_event (event);}); |
1429 | + } |
1430 | + |
1431 | + public override bool draw (Cairo.Context cr) { |
1432 | + base.draw (cr); |
1433 | + Gtk.Allocation size; |
1434 | + get_allocation (out size); |
1435 | + |
1436 | + cr.set_source_rgba (0.0, 0.0, 0.0, 0.25); |
1437 | + cr.set_line_width (1.0); |
1438 | + |
1439 | + // Draw left and top black strokes |
1440 | + if (id % 7 == 0) { |
1441 | + cr.move_to (0.5, 0.5); |
1442 | + } else { |
1443 | + cr.move_to (0.5, size.height); // start in bottom left. 0.5 accounts for cairo's default stroke offset of 1/2 pixels |
1444 | + cr.line_to (0.5, 0.5); // move to upper left corner |
1445 | + } |
1446 | + if (id > 6) { |
1447 | + cr.line_to (size.width + 0.5, 0.5); // move to upper right corner |
1448 | + } |
1449 | + cr.stroke (); |
1450 | + |
1451 | + // Draw inner highlight stroke |
1452 | + cr.rectangle (1, 1, size.width - 1, size.height - 1); |
1453 | + cr.set_source_rgba (1.0, 1.0, 1.0, 0.2); |
1454 | + cr.stroke (); |
1455 | + return false; |
1456 | + } |
1457 | + |
1458 | + public void update_date (GLib.DateTime date) { |
1459 | + this.date = date; |
1460 | + label.label = date.get_day_of_month ().to_string (); |
1461 | + } |
1462 | + |
1463 | + public void set_selected (bool selected) { |
1464 | + if (selected) { |
1465 | + set_state_flags (Gtk.StateFlags.SELECTED, true); |
1466 | + } else { |
1467 | + set_state_flags (Gtk.StateFlags.NORMAL, true); |
1468 | + } |
1469 | + } |
1470 | + public override void grab_focus () { |
1471 | + if (valid_grab) { |
1472 | + base.grab_focus (); |
1473 | + valid_grab = false; |
1474 | + } |
1475 | + } |
1476 | + |
1477 | + public void sensitive_container (bool sens) { |
1478 | + label.sensitive = sens; |
1479 | + } |
1480 | + |
1481 | + private bool on_button_press (Gdk.EventButton event) { |
1482 | + if (event.type == Gdk.EventType.2BUTTON_PRESS && event.button == Gdk.BUTTON_PRIMARY) |
1483 | + on_event_add (date); |
1484 | + valid_grab = true; |
1485 | + grab_focus (); |
1486 | + return false; |
1487 | + } |
1488 | + |
1489 | + private bool on_key_press (Gdk.EventKey event) { |
1490 | + if (event.keyval == Gdk.keyval_from_name("Return") ) { |
1491 | + on_event_add (date); |
1492 | + return true; |
1493 | + } |
1494 | + |
1495 | + return false; |
1496 | + } |
1497 | +} |
1498 | |
1499 | === added file 'src/Widgets/calendar/Header.vala' |
1500 | --- src/Widgets/calendar/Header.vala 1970-01-01 00:00:00 +0000 |
1501 | +++ src/Widgets/calendar/Header.vala 2016-02-03 23:24:26 +0000 |
1502 | @@ -0,0 +1,69 @@ |
1503 | +// -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- |
1504 | +/*- |
1505 | + * Copyright (c) 2011-2015 Maya Developers (http://launchpad.net/maya) |
1506 | + * |
1507 | + * This program is free software: you can redistribute it and/or modify |
1508 | + * it under the terms of the GNU General Public License as published by |
1509 | + * the Free Software Foundation, either version 3 of the License, or |
1510 | + * (at your option) any later version. |
1511 | + * |
1512 | + * This program is distributed in the hope that it will be useful, |
1513 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1514 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1515 | + * GNU General Public License for more details. |
1516 | + * |
1517 | + * You should have received a copy of the GNU General Public License |
1518 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
1519 | + * |
1520 | + * Authored by: Maxwell Barvian |
1521 | + * Corentin Noël <corentin@elementaryos.org> |
1522 | + */ |
1523 | + |
1524 | +namespace DateTime.Widgets { |
1525 | + |
1526 | +/** |
1527 | + * Represents the header at the top of the calendar grid. |
1528 | + */ |
1529 | +public class Header : Gtk.EventBox { |
1530 | + private Gtk.Grid header_grid; |
1531 | + private Gtk.Label[] labels; |
1532 | + |
1533 | + public bool draw_left_border = true; |
1534 | + public Header () { |
1535 | + events |= Gdk.EventMask.BUTTON_PRESS_MASK; |
1536 | + |
1537 | + header_grid = new Gtk.Grid(); |
1538 | + header_grid.insert_column (7); |
1539 | + header_grid.insert_row (1); |
1540 | + header_grid.set_column_homogeneous (true); |
1541 | + header_grid.set_row_homogeneous (true); |
1542 | + header_grid.column_spacing = 0; |
1543 | + header_grid.row_spacing = 0; |
1544 | + header_grid.margin_bottom = 4; |
1545 | + |
1546 | + labels = new Gtk.Label[7]; |
1547 | + for (int c = 0; c < 7; c++) { |
1548 | + labels[c] = new Gtk.Label (""); |
1549 | + labels[c].hexpand = true; |
1550 | + labels[c].margin_top = 4; |
1551 | + labels[c].margin_bottom = 2; |
1552 | + var label_grid = new Gtk.Grid (); |
1553 | + // label_grid.draw.connect (on_draw); |
1554 | + label_grid.add (labels[c]); |
1555 | + header_grid.attach (label_grid, c, 0, 1, 1); |
1556 | + } |
1557 | + |
1558 | + add (header_grid); |
1559 | + } |
1560 | + |
1561 | + public void update_columns (int week_starts_on) { |
1562 | + var date = Util.strip_time(new GLib.DateTime.now_local ()); |
1563 | + date = date.add_days (week_starts_on - date.get_day_of_week ()); |
1564 | + foreach (var label in labels) { |
1565 | + label.label = date.format ("%a"); |
1566 | + date = date.add_days (1); |
1567 | + } |
1568 | + } |
1569 | +} |
1570 | + |
1571 | +} |
1572 | |
1573 | === added file 'src/Widgets/calendar/Util.vala' |
1574 | --- src/Widgets/calendar/Util.vala 1970-01-01 00:00:00 +0000 |
1575 | +++ src/Widgets/calendar/Util.vala 2016-02-03 23:24:26 +0000 |
1576 | @@ -0,0 +1,813 @@ |
1577 | +/* |
1578 | + * Copyright (c) 2011-2016 Maya Developers (http://launchpad.net/maya) |
1579 | + * |
1580 | + * This program is free software; you can redistribute it and/or |
1581 | + * modify it under the terms of the GNU General Public |
1582 | + * License as published by the Free Software Foundation; either |
1583 | + * version 2 of the License, or (at your option) any later version. |
1584 | + * |
1585 | + * This program is distributed in the hope that it will be useful, |
1586 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1587 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
1588 | + * General Public License for more details. |
1589 | + * |
1590 | + * You should have received a copy of the GNU General Public |
1591 | + * License along with this program; if not, write to the |
1592 | + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
1593 | + * Boston, MA 02111-1307, USA. |
1594 | + * |
1595 | + * Authored by: Corentin Noël <corentin@elementaryos.org> |
1596 | + */ |
1597 | + |
1598 | +namespace Util { |
1599 | + /* Represents date range from 'first' to 'last' inclusive */ |
1600 | + public class DateRange : Object, Gee.Traversable<GLib.DateTime>, Gee.Iterable<GLib.DateTime> { |
1601 | + public GLib.DateTime first { get; private set; } |
1602 | + public GLib.DateTime last { get; private set; } |
1603 | + public bool @foreach (Gee.ForallFunc<GLib.DateTime> f) { |
1604 | + foreach (var date in this) { |
1605 | + if (f (date) == false) { |
1606 | + return false; |
1607 | + } |
1608 | + } |
1609 | + |
1610 | + return true; |
1611 | + } |
1612 | + |
1613 | + public int64 days { |
1614 | + get { |
1615 | + return last.difference (first) / GLib.TimeSpan.DAY; |
1616 | + } |
1617 | + } |
1618 | + |
1619 | + public DateRange (GLib.DateTime first, GLib.DateTime last) { |
1620 | + assert (first.compare (last) <= 0); |
1621 | + this.first = first; |
1622 | + this.last = last; |
1623 | + } |
1624 | + |
1625 | + public DateRange.copy (DateRange date_range) { |
1626 | + this(date_range.first, date_range.last); |
1627 | + } |
1628 | + |
1629 | + public bool equals (DateRange other) { |
1630 | + return (first == other.first && last == other.last); |
1631 | + } |
1632 | + |
1633 | + public Type element_type { |
1634 | + get { |
1635 | + return typeof (GLib.DateTime); |
1636 | + } |
1637 | + } |
1638 | + |
1639 | + public Gee.Iterator<GLib.DateTime> iterator () { |
1640 | + return new DateIterator (this); |
1641 | + } |
1642 | + |
1643 | + public bool contains (GLib.DateTime time) { |
1644 | + return (first.compare (time) < 1) && (last.compare (time) > -1); |
1645 | + } |
1646 | + |
1647 | + public Gee.SortedSet<GLib.DateTime> to_set () { |
1648 | + var @set = new Gee.TreeSet<GLib.DateTime> ((GLib.CompareDataFunc<GLib.DateTime>? )GLib.DateTime.compare); |
1649 | + |
1650 | + foreach (var date in this) { |
1651 | + set.add (date); |
1652 | + } |
1653 | + |
1654 | + return @set; |
1655 | + } |
1656 | + |
1657 | + public Gee.List<GLib.DateTime> to_list () { |
1658 | + var list = new Gee.ArrayList<GLib.DateTime> ((Gee.EqualDataFunc<GLib.DateTime>? )datetime_equal_func); |
1659 | + |
1660 | + foreach (var date in this) { |
1661 | + list.add (date); |
1662 | + } |
1663 | + |
1664 | + return list; |
1665 | + } |
1666 | + |
1667 | + /* Returns true if 'a' and 'b' are the same GLib.DateTime */ |
1668 | + public bool datetime_equal_func (GLib.DateTime a, GLib.DateTime b) { |
1669 | + return a.equal (b); |
1670 | + } |
1671 | + } |
1672 | + |
1673 | + public class DateIterator : Object, Gee.Traversable<GLib.DateTime>, Gee.Iterator<GLib.DateTime> { |
1674 | + GLib.DateTime current; |
1675 | + DateRange range; |
1676 | + |
1677 | + public bool valid { get { |
1678 | + return true; |
1679 | + } } |
1680 | + public bool read_only { get { |
1681 | + return false; |
1682 | + } } |
1683 | + |
1684 | + public DateIterator (DateRange range) { |
1685 | + this.range = range; |
1686 | + this.current = range.first.add_days (-1); |
1687 | + } |
1688 | + |
1689 | + public bool @foreach (Gee.ForallFunc<GLib.DateTime> f) { |
1690 | + var element = range.first; |
1691 | + |
1692 | + while (element.compare (range.last) < 0) { |
1693 | + if (f (element) == false) { |
1694 | + return false; |
1695 | + } |
1696 | + |
1697 | + element = element.add_days (1); |
1698 | + } |
1699 | + |
1700 | + return true; |
1701 | + } |
1702 | + |
1703 | + public bool next () { |
1704 | + if (!has_next ()) { |
1705 | + return false; |
1706 | + } |
1707 | + |
1708 | + current = this.current.add_days (1); |
1709 | + |
1710 | + return true; |
1711 | + } |
1712 | + |
1713 | + public bool has_next () { |
1714 | + return current.compare (range.last) < 0; |
1715 | + } |
1716 | + |
1717 | + public bool first () { |
1718 | + current = range.first; |
1719 | + |
1720 | + return true; |
1721 | + } |
1722 | + |
1723 | + public new GLib.DateTime get () { |
1724 | + return current; |
1725 | + } |
1726 | + |
1727 | + public void remove () { |
1728 | + assert_not_reached (); |
1729 | + } |
1730 | + } |
1731 | + |
1732 | + public class Css { |
1733 | + private static Gtk.CssProvider? _css_provider; |
1734 | + /* Retrieve global css provider */ |
1735 | + public static Gtk.CssProvider get_css_provider () { |
1736 | + if (_css_provider == null) { |
1737 | + _css_provider = new Gtk.CssProvider (); |
1738 | + try { |
1739 | + _css_provider.load_from_data (""" |
1740 | +@define-color cell_color mix(@bg_color, rgb(255, 255, 255), 0.8); |
1741 | +@define-color cell_color_weekend mix(@bg_color, rgb(255, 255, 255), 0.2); |
1742 | +@define-color text_color #333; |
1743 | + |
1744 | +/* Cell Styles */ |
1745 | + |
1746 | +.cell { |
1747 | + background-color: @cell_color; |
1748 | + border-radius: 0; |
1749 | +} |
1750 | + |
1751 | +.cell:insensitive { |
1752 | + background-color: shade(@cell_color, 0.97); |
1753 | +} |
1754 | + |
1755 | +.cell:selected { |
1756 | + background-color: shade(@cell_color, 0.9); |
1757 | + color: @text_color; |
1758 | +} |
1759 | + |
1760 | +#weekend { |
1761 | + background-color: @cell_color_weekend; |
1762 | +} |
1763 | +#weekend:selected { |
1764 | + background-color: shade(@cell_color, 0.9); |
1765 | +} |
1766 | + |
1767 | +#today { |
1768 | + background-color: mix(@cell_color, @selected_bg_color, 0.15); /* today date has nice shade of blue */ |
1769 | +} |
1770 | + |
1771 | +#today:selected { |
1772 | + background-color: mix(@cell_color, @selected_bg_color, 0.35); /* today date has nice shade of blue */ |
1773 | +} |
1774 | + |
1775 | + .cell > #date { |
1776 | + font-size: 10px; |
1777 | + }""", -1); |
1778 | + } catch (Error e) { |
1779 | + warning ("Could not add css provider. Some widgets will not look as intended. %s", e.message); |
1780 | + } |
1781 | + } |
1782 | + |
1783 | + return _css_provider; |
1784 | + } |
1785 | + } |
1786 | + |
1787 | + public string TimeFormat () { |
1788 | + /* If AM/PM doesn't exist, use 24h. */ |
1789 | + if (Posix.nl_langinfo (Posix.NLItem.AM_STR) == null || Posix.nl_langinfo (Posix.NLItem.AM_STR) == "") { |
1790 | + return Granite.DateTime.get_default_time_format (false); |
1791 | + } |
1792 | + |
1793 | + /* If AM/PM exists, assume it is the default time format and check for format override. */ |
1794 | + var setting = new GLib.Settings ("org.gnome.desktop.interface"); |
1795 | + var clockformat = setting.get_user_value ("clock-format"); |
1796 | + |
1797 | + if (clockformat == null) { |
1798 | + return Granite.DateTime.get_default_time_format (true); |
1799 | + } |
1800 | + |
1801 | + if (clockformat.get_string ().contains ("12h")) { |
1802 | + return Granite.DateTime.get_default_time_format (true); |
1803 | + } else { |
1804 | + return Granite.DateTime.get_default_time_format (false); |
1805 | + } |
1806 | + } |
1807 | + |
1808 | + static bool has_scrolled = false; |
1809 | + const uint interval = 500; |
1810 | + |
1811 | + public bool on_scroll_event (Gdk.EventScroll event) { |
1812 | + double delta_x; |
1813 | + double delta_y; |
1814 | + event.get_scroll_deltas (out delta_x, out delta_y); |
1815 | + |
1816 | + double choice = delta_x; |
1817 | + |
1818 | + if (((int)delta_x).abs () < ((int)delta_y).abs ()) { |
1819 | + choice = delta_y; |
1820 | + } |
1821 | + |
1822 | + /* It's mouse scroll ! */ |
1823 | + if (choice == 1 || choice == -1) { |
1824 | + DateTime.Widgets.CalendarModel.get_default ().change_month ((int)choice); |
1825 | + |
1826 | + return true; |
1827 | + } |
1828 | + |
1829 | + if (has_scrolled == true) { |
1830 | + return true; |
1831 | + } |
1832 | + |
1833 | + if (choice > 0.3) { |
1834 | + reset_timer.begin (); |
1835 | + DateTime.Widgets.CalendarModel.get_default ().change_month (1); |
1836 | + |
1837 | + return true; |
1838 | + } |
1839 | + |
1840 | + if (choice < -0.3) { |
1841 | + reset_timer.begin (); |
1842 | + DateTime.Widgets.CalendarModel.get_default ().change_month (-1); |
1843 | + |
1844 | + return true; |
1845 | + } |
1846 | + |
1847 | + return false; |
1848 | + } |
1849 | + |
1850 | + public GLib.DateTime get_start_of_month (owned GLib.DateTime? date = null) { |
1851 | + if (date == null) { |
1852 | + date = new GLib.DateTime.now_local (); |
1853 | + } |
1854 | + |
1855 | + return new GLib.DateTime.local (date.get_year (), date.get_month (), 1, 0, 0, 0); |
1856 | + } |
1857 | + |
1858 | + public GLib.DateTime strip_time (GLib.DateTime datetime) { |
1859 | + return datetime.add_full (0, 0, 0, -datetime.get_hour (), -datetime.get_minute (), -datetime.get_second ()); |
1860 | + } |
1861 | + |
1862 | + /** |
1863 | + * Converts the given TimeType to a DateTime. |
1864 | + */ |
1865 | + public TimeZone timezone_from_ical (iCal.TimeType date) { |
1866 | + var interval = date.zone.get_utc_offset (date, date.is_daylight); |
1867 | + var hours = (interval / 3600); |
1868 | + string hour_string = "-"; |
1869 | + |
1870 | + if (hours >= 0) { |
1871 | + hour_string = "+"; |
1872 | + } |
1873 | + |
1874 | + hours = hours.abs (); |
1875 | + |
1876 | + if (hours > 9) { |
1877 | + hour_string = "%s%d".printf (hour_string, hours); |
1878 | + } else { |
1879 | + hour_string = "%s0%d".printf (hour_string, hours); |
1880 | + } |
1881 | + |
1882 | + var minutes = (interval.abs () % 3600) / 60; |
1883 | + |
1884 | + if (minutes > 9) { |
1885 | + hour_string = "%s:%d".printf (hour_string, minutes); |
1886 | + } else { |
1887 | + hour_string = "%s:0%d".printf (hour_string, minutes); |
1888 | + } |
1889 | + |
1890 | + return new TimeZone (hour_string); |
1891 | + } |
1892 | + |
1893 | + /** |
1894 | + * Converts the given TimeType to a DateTime. |
1895 | + * XXX : Track next versions of evolution in order to convert iCal.Timezone to GLib.TimeZone with a dedicated function… |
1896 | + */ |
1897 | + public GLib.DateTime ical_to_date_time (iCal.TimeType date) { |
1898 | + return new GLib.DateTime (timezone_from_ical (date), date.year, date.month, |
1899 | + date.day, date.hour, date.minute, date.second); |
1900 | + } |
1901 | + |
1902 | + public void get_local_datetimes_from_icalcomponent (iCal.Component comp, out GLib.DateTime start_date, out GLib.DateTime end_date) { |
1903 | + iCal.TimeType dt_start = comp.get_dtstart (); |
1904 | + iCal.TimeType dt_end = comp.get_dtend (); |
1905 | + |
1906 | + start_date = Util.ical_to_date_time (dt_start); |
1907 | + end_date = Util.ical_to_date_time (dt_end); |
1908 | + } |
1909 | + |
1910 | + public Gee.Collection<DateRange> event_date_ranges (iCal.Component comp, Util.DateRange view_range) { |
1911 | + var dateranges = new Gee.LinkedList<DateRange> (); |
1912 | + |
1913 | + var start = ical_to_date_time (comp.get_dtstart ()); |
1914 | + var end = ical_to_date_time (comp.get_dtend ()); |
1915 | + |
1916 | + if (end == null) { |
1917 | + end = start; |
1918 | + } |
1919 | + |
1920 | + /* All days events are stored in UTC time and should only being shown at one day. */ |
1921 | + bool allday = is_the_all_day (start, end); |
1922 | + |
1923 | + if (allday) { |
1924 | + end = end.add_days (-1); |
1925 | + var interval = (new GLib.DateTime.now_local ()).get_utc_offset (); |
1926 | + start = start.add (-interval); |
1927 | + end = end.add (-interval); |
1928 | + } |
1929 | + |
1930 | + start = strip_time (start.to_timezone (new TimeZone.local ())); |
1931 | + end = strip_time (end.to_timezone (new TimeZone.local ())); |
1932 | + dateranges.add (new Util.DateRange (start, end)); |
1933 | + |
1934 | + /* Search for recursive events. */ |
1935 | + unowned iCal.Property property = comp.get_first_property (iCal.PropertyKind.RRULE); |
1936 | + |
1937 | + if (property != null) { |
1938 | + var rrule = property.get_rrule (); |
1939 | + |
1940 | + switch (rrule.freq) { |
1941 | + case (iCal.RecurrenceTypeFrequency.WEEKLY) : |
1942 | + generate_week_reccurence (dateranges, view_range, rrule, start, end); |
1943 | + break; |
1944 | + case (iCal.RecurrenceTypeFrequency.MONTHLY) : |
1945 | + generate_month_reccurence (dateranges, view_range, rrule, start, end); |
1946 | + break; |
1947 | + case (iCal.RecurrenceTypeFrequency.YEARLY) : |
1948 | + generate_year_reccurence (dateranges, view_range, rrule, start, end); |
1949 | + break; |
1950 | + default : |
1951 | + generate_day_reccurence (dateranges, view_range, rrule, start, end); |
1952 | + break; |
1953 | + } |
1954 | + } |
1955 | + |
1956 | + /* EXDATEs elements are exceptions dates that should not appear. */ |
1957 | + property = comp.get_first_property (iCal.PropertyKind.EXDATE); |
1958 | + |
1959 | + while (property != null) { |
1960 | + var exdate = property.get_exdate (); |
1961 | + var date = ical_to_date_time (exdate); |
1962 | + dateranges.@foreach ((daterange) => { |
1963 | + var first = daterange.first; |
1964 | + var last = daterange.last; |
1965 | + |
1966 | + if (first.get_year () <= date.get_year () && last.get_year () >= date.get_year ()) { |
1967 | + if (first.get_day_of_year () <= date.get_day_of_year () && last.get_day_of_year () >= date.get_day_of_year ()) { |
1968 | + dateranges.remove (daterange); |
1969 | + |
1970 | + return false; |
1971 | + } |
1972 | + } |
1973 | + |
1974 | + return true; |
1975 | + }); |
1976 | + |
1977 | + property = comp.get_next_property (iCal.PropertyKind.EXDATE); |
1978 | + } |
1979 | + |
1980 | + return dateranges; |
1981 | + } |
1982 | + |
1983 | + private void generate_day_reccurence (Gee.LinkedList<DateRange> dateranges, Util.DateRange view_range, |
1984 | + iCal.RecurrenceType rrule, GLib.DateTime start, GLib.DateTime end) { |
1985 | + if (rrule.until.is_null_time () == 0) { |
1986 | + for (int i = 1; i <= (int)(rrule.until.day / rrule.interval); i++) { |
1987 | + int n = i * rrule.interval; |
1988 | + |
1989 | + if (view_range.contains (start.add_days (n)) || view_range.contains (end.add_days (n))) { |
1990 | + dateranges.add (new Util.DateRange (start.add_days (n), end.add_days (n))); |
1991 | + } |
1992 | + } |
1993 | + } else if (rrule.count > 0) { |
1994 | + for (int i = 1; i <= rrule.count; i++) { |
1995 | + int n = i * rrule.interval; |
1996 | + |
1997 | + if (view_range.contains (start.add_days (n)) || view_range.contains (end.add_days (n))) { |
1998 | + dateranges.add (new Util.DateRange (start.add_days (n), end.add_days (n))); |
1999 | + } |
2000 | + } |
2001 | + } else { |
2002 | + int i = 1; |
2003 | + int n = i * rrule.interval; |
2004 | + |
2005 | + while (view_range.last.compare (start.add_days (n)) > 0) { |
2006 | + dateranges.add (new Util.DateRange (start.add_days (n), end.add_days (n))); |
2007 | + i++; |
2008 | + n = i * rrule.interval; |
2009 | + } |
2010 | + } |
2011 | + } |
2012 | + |
2013 | + private void generate_year_reccurence (Gee.LinkedList<DateRange> dateranges, Util.DateRange view_range, |
2014 | + iCal.RecurrenceType rrule, GLib.DateTime start, GLib.DateTime end) { |
2015 | + if (rrule.until.is_null_time () == 0) { |
2016 | + /*for (int i = 0; i <= rrule.until.year; i++) { |
2017 | + * int n = i*rrule.interval; |
2018 | + * if (view_range.contains (start.add_years (n)) || view_range.contains (end.add_years (n))) |
2019 | + * dateranges.add (new Util.DateRange (start.add_years (n), end.add_years (n))); |
2020 | + * }*/ |
2021 | + } else if (rrule.count > 0) { |
2022 | + for (int i = 1; i <= rrule.count; i++) { |
2023 | + int n = i * rrule.interval; |
2024 | + |
2025 | + if (view_range.contains (start.add_years (n)) || view_range.contains (end.add_years (n))) { |
2026 | + dateranges.add (new Util.DateRange (start.add_years (n), end.add_years (n))); |
2027 | + } |
2028 | + } |
2029 | + } else { |
2030 | + int i = 1; |
2031 | + int n = i * rrule.interval; |
2032 | + bool is_null_time = rrule.until.is_null_time () == 1; |
2033 | + var temp_start = start.add_years (n); |
2034 | + |
2035 | + while (view_range.last.compare (temp_start) > 0) { |
2036 | + if (is_null_time == false) { |
2037 | + if (temp_start.get_year () > rrule.until.year) { |
2038 | + break; |
2039 | + } else if (temp_start.get_year () == rrule.until.year && temp_start.get_month () > rrule.until.month) { |
2040 | + break; |
2041 | + } else if (temp_start.get_year () == rrule.until.year && temp_start.get_month () == rrule.until.month && temp_start.get_day_of_month () > rrule.until.day) { |
2042 | + break; |
2043 | + } |
2044 | + } |
2045 | + |
2046 | + dateranges.add (new Util.DateRange (temp_start, end.add_years (n))); |
2047 | + i++; |
2048 | + n = i * rrule.interval; |
2049 | + temp_start = start.add_years (n); |
2050 | + } |
2051 | + } |
2052 | + } |
2053 | + |
2054 | + private void generate_month_reccurence (Gee.LinkedList<DateRange> dateranges, Util.DateRange view_range, |
2055 | + iCal.RecurrenceType rrule, GLib.DateTime start, GLib.DateTime end) { |
2056 | + /* Computes month recurrences by day (for example: third friday of the month). */ |
2057 | + for (int k = 0; k <= iCal.Size.BY_DAY; k++) { |
2058 | + if (rrule.by_day[k] < iCal.Size.BY_DAY) { |
2059 | + if (rrule.count > 0) { |
2060 | + for (int i = 1; i <= rrule.count; i++) { |
2061 | + int n = i * rrule.interval; |
2062 | + var start_ical_day = get_date_from_ical_day (start.add_months (n), rrule.by_day[k]); |
2063 | + int interval = start_ical_day.get_day_of_month () - start.get_day_of_month (); |
2064 | + dateranges.add (new Util.DateRange (start_ical_day, end.add_months (n).add_days (interval))); |
2065 | + } |
2066 | + } else { |
2067 | + int i = 1; |
2068 | + int n = i * rrule.interval; |
2069 | + bool is_null_time = rrule.until.is_null_time () == 1; |
2070 | + var start_ical_day = get_date_from_ical_day (start.add_months (n), rrule.by_day[k]); |
2071 | + int week_of_month = (int)GLib.Math.ceil ((double)start.get_day_of_month () / 7); |
2072 | + |
2073 | + while (view_range.last.compare (start_ical_day) > 0) { |
2074 | + if (is_null_time == false) { |
2075 | + if (start_ical_day.get_year () > rrule.until.year) { |
2076 | + break; |
2077 | + } else if (start_ical_day.get_year () == rrule.until.year && start_ical_day.get_month () > rrule.until.month) { |
2078 | + break; |
2079 | + } else if (start_ical_day.get_year () == rrule.until.year && start_ical_day.get_month () == rrule.until.month && start_ical_day.get_day_of_month () > rrule.until.day) { |
2080 | + break; |
2081 | + } |
2082 | + } |
2083 | + |
2084 | + /* Set it at the right weekday */ |
2085 | + int interval = start_ical_day.get_day_of_month () - start.get_day_of_month (); |
2086 | + var start_daterange_date = start_ical_day; |
2087 | + var end_daterange_date = end.add_months (n).add_days (interval); |
2088 | + var new_week_of_month = (int)GLib.Math.ceil ((double)start_daterange_date.get_day_of_month () / 7); |
2089 | + |
2090 | + /* Set it at the right week */ |
2091 | + if (week_of_month != new_week_of_month) { |
2092 | + start_daterange_date = start_daterange_date.add_weeks (week_of_month - new_week_of_month); |
2093 | + end_daterange_date = end_daterange_date.add_weeks (week_of_month - new_week_of_month); |
2094 | + } |
2095 | + |
2096 | + dateranges.add (new Util.DateRange (start_daterange_date, end_daterange_date)); |
2097 | + i++; |
2098 | + n = i * rrule.interval; |
2099 | + start_ical_day = get_date_from_ical_day (start.add_months (n), rrule.by_day[k]); |
2100 | + } |
2101 | + } |
2102 | + } else { |
2103 | + break; |
2104 | + } |
2105 | + } |
2106 | + |
2107 | + /* Computes month recurrences by month day (for example: 4th of the month). */ |
2108 | + if (rrule.by_month_day[0] < iCal.Size.BY_MONTHDAY) { |
2109 | + if (rrule.count > 0) { |
2110 | + for (int i = 1; i <= rrule.count; i++) { |
2111 | + int n = i * rrule.interval; |
2112 | + dateranges.add (new Util.DateRange (start.add_months (n), end.add_months (n))); |
2113 | + } |
2114 | + } else { |
2115 | + int i = 1; |
2116 | + int n = i * rrule.interval; |
2117 | + bool is_null_time = rrule.until.is_null_time () == 1; |
2118 | + var temp_start = start.add_months (n); |
2119 | + |
2120 | + while (view_range.last.compare (temp_start) > 0) { |
2121 | + if (is_null_time == false) { |
2122 | + if (temp_start.get_year () > rrule.until.year) { |
2123 | + break; |
2124 | + } else if (temp_start.get_year () == rrule.until.year && temp_start.get_month () > rrule.until.month) { |
2125 | + break; |
2126 | + } else if (temp_start.get_year () == rrule.until.year && temp_start.get_month () == rrule.until.month && temp_start.get_day_of_month () > rrule.until.day) { |
2127 | + break; |
2128 | + } |
2129 | + } |
2130 | + |
2131 | + dateranges.add (new Util.DateRange (temp_start, end.add_months (n))); |
2132 | + i++; |
2133 | + n = i * rrule.interval; |
2134 | + temp_start = start.add_months (n); |
2135 | + } |
2136 | + } |
2137 | + } |
2138 | + } |
2139 | + |
2140 | + private void generate_week_reccurence (Gee.LinkedList<DateRange> dateranges, Util.DateRange view_range, |
2141 | + iCal.RecurrenceType rrule, GLib.DateTime start_, GLib.DateTime end_) { |
2142 | + GLib.DateTime start = start_; |
2143 | + GLib.DateTime end = end_; |
2144 | + |
2145 | + for (int k = 0; k <= iCal.Size.BY_DAY; k++) { |
2146 | + if (rrule.by_day[k] > 7) { |
2147 | + break; |
2148 | + } |
2149 | + |
2150 | + int day_to_add = 0; |
2151 | + |
2152 | + switch (rrule.by_day[k]) { |
2153 | + case 1: |
2154 | + day_to_add = 7 - start.get_day_of_week (); |
2155 | + break; |
2156 | + case 2: |
2157 | + day_to_add = 1 - start.get_day_of_week (); |
2158 | + break; |
2159 | + case 3: |
2160 | + day_to_add = 2 - start.get_day_of_week (); |
2161 | + break; |
2162 | + case 4: |
2163 | + day_to_add = 3 - start.get_day_of_week (); |
2164 | + break; |
2165 | + case 5: |
2166 | + day_to_add = 4 - start.get_day_of_week (); |
2167 | + break; |
2168 | + case 6: |
2169 | + day_to_add = 5 - start.get_day_of_week (); |
2170 | + break; |
2171 | + default: |
2172 | + day_to_add = 6 - start.get_day_of_week (); |
2173 | + break; |
2174 | + } |
2175 | + |
2176 | + if (start.add_days (day_to_add).get_month () < start.get_month ()) { |
2177 | + day_to_add = day_to_add + 7; |
2178 | + } |
2179 | + |
2180 | + start = start.add_days (day_to_add); |
2181 | + end = end.add_days (day_to_add); |
2182 | + |
2183 | + if (rrule.count > 0) { |
2184 | + for (int i = 1; i <= rrule.count; i++) { |
2185 | + int n = i * rrule.interval * 7; |
2186 | + |
2187 | + if (view_range.contains (start.add_days (n)) || view_range.contains (end.add_days (n))) { |
2188 | + dateranges.add (new Util.DateRange (start.add_days (n), end.add_days (n))); |
2189 | + } |
2190 | + } |
2191 | + } else { |
2192 | + int i = 1; |
2193 | + int n = i * rrule.interval * 7; |
2194 | + bool is_null_time = rrule.until.is_null_time () == 1; |
2195 | + var temp_start = start.add_days (n); |
2196 | + |
2197 | + while (view_range.last.compare (temp_start) > 0) { |
2198 | + if (is_null_time == false) { |
2199 | + if (temp_start.get_year () > rrule.until.year) { |
2200 | + break; |
2201 | + } else if (temp_start.get_year () == rrule.until.year) { |
2202 | + if (temp_start.get_month () > rrule.until.month) { |
2203 | + break; |
2204 | + } else if (temp_start.get_month () == rrule.until.month && temp_start.get_day_of_month () > rrule.until.day) { |
2205 | + break; |
2206 | + } |
2207 | + } |
2208 | + } |
2209 | + |
2210 | + dateranges.add (new Util.DateRange (temp_start, end.add_days (n))); |
2211 | + i++; |
2212 | + n = i * rrule.interval * 7; |
2213 | + temp_start = start.add_days (n); |
2214 | + } |
2215 | + } |
2216 | + } |
2217 | + } |
2218 | + |
2219 | + public bool is_multiday_event (iCal.Component comp) { |
2220 | + var start = ical_to_date_time (comp.get_dtstart ()); |
2221 | + var end = ical_to_date_time (comp.get_dtend ()); |
2222 | + start = start.to_timezone (new TimeZone.utc ()); |
2223 | + end = end.to_timezone (new TimeZone.utc ()); |
2224 | + |
2225 | + bool allday = is_the_all_day (start, end); |
2226 | + |
2227 | + if (allday) { |
2228 | + end = end.add_days (-1); |
2229 | + } |
2230 | + |
2231 | + if (start.get_year () != end.get_year () || start.get_day_of_year () != end.get_day_of_year ()) { |
2232 | + return true; |
2233 | + } |
2234 | + |
2235 | + return false; |
2236 | + } |
2237 | + |
2238 | + /** |
2239 | + * Say if an event lasts all day. |
2240 | + */ |
2241 | + public bool is_the_all_day (GLib.DateTime dtstart, GLib.DateTime dtend) { |
2242 | + var UTC_start = dtstart.to_timezone (new TimeZone.utc ()); |
2243 | + var timespan = dtend.difference (dtstart); |
2244 | + |
2245 | + if (timespan % GLib.TimeSpan.DAY == 0 && UTC_start.get_hour () == 0) { |
2246 | + return true; |
2247 | + } else { |
2248 | + return false; |
2249 | + } |
2250 | + } |
2251 | + |
2252 | + public GLib.DateTime get_date_from_ical_day (GLib.DateTime date, short day) { |
2253 | + int day_to_add = 0; |
2254 | + |
2255 | + switch (iCal.RecurrenceType.day_day_of_week (day)) { |
2256 | + case iCal.RecurrenceTypeWeekday.SUNDAY: |
2257 | + day_to_add = 7 - date.get_day_of_week (); |
2258 | + break; |
2259 | + case iCal.RecurrenceTypeWeekday.MONDAY: |
2260 | + day_to_add = 1 - date.get_day_of_week (); |
2261 | + break; |
2262 | + case iCal.RecurrenceTypeWeekday.TUESDAY: |
2263 | + day_to_add = 2 - date.get_day_of_week (); |
2264 | + break; |
2265 | + case iCal.RecurrenceTypeWeekday.WEDNESDAY: |
2266 | + day_to_add = 3 - date.get_day_of_week (); |
2267 | + break; |
2268 | + case iCal.RecurrenceTypeWeekday.THURSDAY: |
2269 | + day_to_add = 4 - date.get_day_of_week (); |
2270 | + break; |
2271 | + case iCal.RecurrenceTypeWeekday.FRIDAY: |
2272 | + day_to_add = 5 - date.get_day_of_week (); |
2273 | + break; |
2274 | + default: |
2275 | + day_to_add = 6 - date.get_day_of_week (); |
2276 | + break; |
2277 | + } |
2278 | + |
2279 | + if (date.add_days (day_to_add).get_month () < date.get_month ()) { |
2280 | + day_to_add = day_to_add + 7; |
2281 | + } |
2282 | + |
2283 | + if (date.add_days (day_to_add).get_month () > date.get_month ()) { |
2284 | + day_to_add = day_to_add - 7; |
2285 | + } |
2286 | + |
2287 | + switch (iCal.RecurrenceType.day_position (day)) { |
2288 | + case 1: |
2289 | + int n = (int)GLib.Math.trunc ((date.get_day_of_month () + day_to_add) / 7); |
2290 | + |
2291 | + return date.add_days (day_to_add - n * 7); |
2292 | + case 2: |
2293 | + int n = (int)GLib.Math.trunc ((date.get_day_of_month () + day_to_add - 7) / 7); |
2294 | + |
2295 | + return date.add_days (day_to_add - n * 7); |
2296 | + case 3: |
2297 | + int n = (int)GLib.Math.trunc ((date.get_day_of_month () + day_to_add - 14) / 7); |
2298 | + |
2299 | + return date.add_days (day_to_add - n * 7); |
2300 | + case 4: |
2301 | + int n = (int)GLib.Math.trunc ((date.get_day_of_month () + day_to_add - 21) / 7); |
2302 | + |
2303 | + return date.add_days (day_to_add - n * 7); |
2304 | + default: |
2305 | + int n = (int)GLib.Math.trunc ((date.get_day_of_month () + day_to_add - 28) / 7); |
2306 | + |
2307 | + return date.add_days (day_to_add - n * 7); |
2308 | + } |
2309 | + } |
2310 | + |
2311 | + /* |
2312 | + * Gee Utility Functions |
2313 | + */ |
2314 | + |
2315 | + /* Interleaves the values of two collections into a Map */ |
2316 | + public void zip<F, G> (Gee.Iterable<F> iterable1, Gee.Iterable<G> iterable2, Gee.Map<F, G> map) { |
2317 | + |
2318 | + var i1 = iterable1.iterator(); |
2319 | + var i2 = iterable2.iterator(); |
2320 | + |
2321 | + while (i1.next() && i2.next()) |
2322 | + map.set (i1, i2); |
2323 | + } |
2324 | + |
2325 | + /* Constructs a new set with keys equal to the values of keymap */ |
2326 | + public void remap<K, V> (Gee.Map<K, K> keymap, Gee.Map<K, V> valmap, ref Gee.Map<K, V> remap) { |
2327 | + |
2328 | + foreach (K key in valmap) { |
2329 | + |
2330 | + var k = keymap [key]; |
2331 | + var v = valmap [key]; |
2332 | + |
2333 | + remap.set (k, v); |
2334 | + } |
2335 | + } |
2336 | + |
2337 | + /* Computes hash value for string */ |
2338 | + public uint string_hash_func (string key) { |
2339 | + return key.hash (); |
2340 | + } |
2341 | + |
2342 | + /* Computes hash value for DateTime */ |
2343 | + public uint datetime_hash_func (GLib.DateTime key) { |
2344 | + return key.hash (); |
2345 | + } |
2346 | + |
2347 | + /* Computes hash value for E.CalComponent */ |
2348 | + public uint calcomponent_hash_func (E.CalComponent key) { |
2349 | + unowned iCal.Component comp = key.get_icalcomponent (); |
2350 | + string uid = comp.get_uid (); |
2351 | + return uid.hash (); |
2352 | + } |
2353 | + |
2354 | + /* Computes hash value for E.Source */ |
2355 | + public uint source_hash_func (E.Source key) { |
2356 | + return key.dup_uid (). hash (); |
2357 | + } |
2358 | + |
2359 | + /* Returns true if 'a' and 'b' are the same string */ |
2360 | + public bool string_equal_func (string a, string b) { |
2361 | + return a == b; |
2362 | + } |
2363 | + |
2364 | + /* Returns true if 'a' and 'b' are the same GLib.DateTime */ |
2365 | + public bool datetime_equal_func (GLib.DateTime a, GLib.DateTime b) { |
2366 | + return a.equal (b); |
2367 | + } |
2368 | + |
2369 | + /* Returns true if 'a' and 'b' are the same E.CalComponent */ |
2370 | + public bool calcomponent_equal_func (E.CalComponent a, E.CalComponent b) { |
2371 | + unowned iCal.Component comp_a = a.get_icalcomponent (); |
2372 | + unowned iCal.Component comp_b = b.get_icalcomponent (); |
2373 | + return comp_a.get_uid () == comp_b.get_uid (); |
2374 | + } |
2375 | + |
2376 | + /* Returns true if 'a' and 'b' are the same E.Source */ |
2377 | + public bool source_equal_func (E.Source a, E.Source b) { |
2378 | + return a.dup_uid () == b.dup_uid (); |
2379 | + } |
2380 | + |
2381 | + public async void reset_timer () { |
2382 | + has_scrolled = true; |
2383 | + Timeout.add (interval, () => { |
2384 | + has_scrolled = false; |
2385 | + |
2386 | + return false; |
2387 | + }); |
2388 | + } |
2389 | +} |
2390 | \ No newline at end of file |
2391 | |
2392 | === added file 'src/Widgets/calendar/WeekLabels.vala' |
2393 | --- src/Widgets/calendar/WeekLabels.vala 1970-01-01 00:00:00 +0000 |
2394 | +++ src/Widgets/calendar/WeekLabels.vala 2016-02-03 23:24:26 +0000 |
2395 | @@ -0,0 +1,123 @@ |
2396 | +// -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*- |
2397 | +/*- |
2398 | + * Copyright (c) 2011-2015 Maya Developers (http://launchpad.net/maya) |
2399 | + * |
2400 | + * This program is free software: you can redistribute it and/or modify |
2401 | + * it under the terms of the GNU General Public License as published by |
2402 | + * the Free Software Foundation, either version 3 of the License, or |
2403 | + * (at your option) any later version. |
2404 | + * |
2405 | + * This program is distributed in the hope that it will be useful, |
2406 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2407 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2408 | + * GNU General Public License for more details. |
2409 | + * |
2410 | + * You should have received a copy of the GNU General Public License |
2411 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2412 | + * |
2413 | + * Authored by: Maxwell Barvian |
2414 | + * Corentin Noël <corentin@elementaryos.org> |
2415 | + */ |
2416 | + namespace DateTime.Widgets { |
2417 | +/** |
2418 | + * Represent the week labels at the left side of the grid. |
2419 | + */ |
2420 | +public class WeekLabels : Gtk.Revealer { |
2421 | + |
2422 | + private Gtk.Grid day_grid; |
2423 | + private Gtk.Label[] labels; |
2424 | + private int nr_of_weeks; |
2425 | + |
2426 | + public WeekLabels () { |
2427 | + vexpand = true; |
2428 | + |
2429 | + day_grid = new Gtk.Grid (); |
2430 | + set_nr_of_weeks (5); |
2431 | + day_grid.insert_row (1); |
2432 | + day_grid.set_column_homogeneous (true); |
2433 | + day_grid.set_row_homogeneous (true); |
2434 | + day_grid.row_spacing = 0; |
2435 | + day_grid.show (); |
2436 | + |
2437 | + var style_provider = Util.Css.get_css_provider (); |
2438 | + |
2439 | + // EventBox properties |
2440 | + day_grid.get_style_context().add_provider (style_provider, 600); |
2441 | + day_grid.get_style_context().add_class ("weeks"); |
2442 | + |
2443 | + add (day_grid); |
2444 | + } |
2445 | + |
2446 | + public void update (GLib.DateTime date, int nr_of_weeks) { |
2447 | + |
2448 | + update_nr_of_labels (nr_of_weeks); |
2449 | + |
2450 | + if (Services.SettingsManager.get_default ().show_weeks) { |
2451 | + no_show_all = false; |
2452 | + transition_type = Gtk.RevealerTransitionType.SLIDE_RIGHT; |
2453 | + set_reveal_child (true); |
2454 | + |
2455 | + var next = date; |
2456 | + // Find the beginning of the week which is apparently always a monday |
2457 | + int days_to_add = (8 - next.get_day_of_week()) % 7; |
2458 | + next = next.add_days(days_to_add); |
2459 | + foreach (var label in labels) { |
2460 | + label.label = next.get_week_of_year ().to_string(); |
2461 | + next = next.add_weeks (1); |
2462 | + } |
2463 | + } else { |
2464 | + transition_type = Gtk.RevealerTransitionType.SLIDE_LEFT; |
2465 | + set_reveal_child (false); |
2466 | + no_show_all = true; |
2467 | + hide (); |
2468 | + } |
2469 | + } |
2470 | + |
2471 | + public void set_nr_of_weeks (int new_number) { |
2472 | + day_grid.insert_row (new_number); |
2473 | + nr_of_weeks = new_number; |
2474 | + } |
2475 | + |
2476 | + public int get_nr_of_weeks () { |
2477 | + return nr_of_weeks; |
2478 | + } |
2479 | + |
2480 | + void update_nr_of_labels (int nr_of_weeks) { |
2481 | + // Destroy all the old ones |
2482 | + |
2483 | + if (labels != null) |
2484 | + foreach (var label in labels) |
2485 | + label.destroy (); |
2486 | + |
2487 | + // Create new labels |
2488 | + labels = new Gtk.Label[nr_of_weeks]; |
2489 | + for (int c = 0; c < nr_of_weeks; c++) { |
2490 | + labels[c] = new Gtk.Label (""); |
2491 | + labels[c].valign = Gtk.Align.START; |
2492 | + labels[c].width_chars = 2; |
2493 | + labels[c].margin = 1; |
2494 | + day_grid.attach (labels[c], 0, c, 1, 1); |
2495 | + labels[c].show (); |
2496 | + } |
2497 | + } |
2498 | + |
2499 | + public override bool draw (Cairo.Context cr) { |
2500 | + base.draw (cr); |
2501 | + if (!child_revealed) |
2502 | + return false; |
2503 | + Gtk.Allocation size; |
2504 | + get_allocation (out size); |
2505 | + cr.set_source_rgba (0.0, 0.0, 0.0, 0.25); |
2506 | + cr.set_line_width (1.0); |
2507 | + cr.set_antialias (Cairo.Antialias.NONE); |
2508 | + cr.move_to (size.width - 0.5, 0.5); |
2509 | + cr.line_to (size.width - 0.5, size.height); |
2510 | + for (int i = 1; i < size.height / 25; i++) { |
2511 | + cr.move_to (0, i * 25 + 0.5); |
2512 | + cr.line_to (size.width + 0.5, i * 25 + 0.5); |
2513 | + } |
2514 | + cr.stroke (); |
2515 | + return false; |
2516 | + } |
2517 | +} |
2518 | +} |
2519 | \ No newline at end of file |
2520 | |
2521 | === added directory 'vapi' |
2522 | === added file 'vapi/libecalendar-1.2.deps' |
2523 | --- vapi/libecalendar-1.2.deps 1970-01-01 00:00:00 +0000 |
2524 | +++ vapi/libecalendar-1.2.deps 2016-02-03 23:24:26 +0000 |
2525 | @@ -0,0 +1,3 @@ |
2526 | +libxml-2.0 |
2527 | +gio-2.0 |
2528 | +posix |
2529 | |
2530 | === added file 'vapi/libecalendar-1.2.metadata' |
2531 | --- vapi/libecalendar-1.2.metadata 1970-01-01 00:00:00 +0000 |
2532 | +++ vapi/libecalendar-1.2.metadata 2016-02-03 23:24:26 +0000 |
2533 | @@ -0,0 +1,237 @@ |
2534 | +# NOTES: |
2535 | +# ECalComponentAlarmTrigger.u is a union |
2536 | +# ECalComponentPeriod.u is a union |
2537 | +# Problematic enums: CalClientSourceTypeEnum CalModeEnum CalSetModeStatusEnum CalSourceTypeEnum DataCalMode |
2538 | + |
2539 | +#TODO: |
2540 | +#- last sweep search for GLib.List and GLib.SList |
2541 | +#- last sweep search for GLib.Cancellable |
2542 | + |
2543 | +#--- general fixes ---# |
2544 | + |
2545 | +E cprefix="E" lower_case_cprefix="e_" gir_version="1.2" gir_namespace="ECalendar" |
2546 | + |
2547 | +#--- sync with official vapi ---# |
2548 | + |
2549 | +ECal hidden="1" # deprecated@3.2 |
2550 | +ECalAuthFunc hidden="1" # depends on ECal |
2551 | + |
2552 | +ECalChange is_value_type="1" cheader_filename="libecal/e-cal-types.h" |
2553 | +ECalChangeType cheader_filename="libecal/e-cal-types.h" |
2554 | + |
2555 | +ECalClient type_id="e_cal_client_get_type ()" cheader_filename="libecal/e-cal-client.h" |
2556 | + |
2557 | +e_cal_client_add_timezone async="1" |
2558 | + |
2559 | +e_cal_client_create_object async="1" |
2560 | +e_cal_client_create_object.cancellable nullable="1" |
2561 | +e_cal_client_create_object_finish.uid is_out="1" value_owned="1" |
2562 | + |
2563 | +e_cal_client_create_object_sync.uid is_out="1" transfer_ownership="1" |
2564 | +e_cal_client_create_object_sync.cancellable nullable="1" |
2565 | + |
2566 | +e_cal_client_discard_alarm async="1" |
2567 | +e_cal_client_discard_alarm.cancellable nullable="1" |
2568 | +e_cal_client_discard_alarm_sync.cancellable nullable="1" |
2569 | + |
2570 | +e_cal_client_error_create transfer_ownership="1" |
2571 | + |
2572 | +e_cal_client_free_ecalcomp_slist.ecalcomps type_arguments="E.CalComponent" |
2573 | +e_cal_client_free_icalcomp_slist.ecalcomps type_arguments="iCal.CalComponent" |
2574 | + |
2575 | +e_cal_client_generate_instances.cancellable nullable="1" |
2576 | +e_cal_client_generate_instances.destroy_cb_data value_owned="1" nullable="1" |
2577 | +e_cal_client_generate_instances_for_object.cancellable nullable="1" |
2578 | +e_cal_client_generate_instances_for_object.destroy_cb_data value_owned="1" nullable="1" |
2579 | + |
2580 | +e_cal_client_get_attachment_uris async="1" |
2581 | +e_cal_client_get_attachment_uris.cancellable nullable="1" |
2582 | +e_cal_client_get_attachment_uris_finish.attachment_uris is_out="1" value_owned="1" |
2583 | +e_cal_client_get_attachment_uris_sync.cancellable nullable="1" |
2584 | + |
2585 | +e_cal_client_get_default_object async="1" |
2586 | +e_cal_client_get_default_object.cancellable nullable="1" |
2587 | +e_cal_client_get_default_object_finish.icalcomp is_out="1" value_owned="1" |
2588 | +e_cal_client_get_default_object_sync.cancellable nullable="1" |
2589 | + |
2590 | +e_cal_client_get_free_busy async="1" |
2591 | +e_cal_client_get_free_busy.cancellable nullable="1" |
2592 | +e_cal_client_get_free_busy_sync.cancellable nullable="1" |
2593 | + |
2594 | +e_cal_client_get_object async="1" |
2595 | +e_cal_client_get_object.cancellable nullable="1" |
2596 | +e_cal_client_get_object_finish.icalcomp is_out="1" value_owned="1" |
2597 | + |
2598 | +e_cal_client_get_object_list async="1" |
2599 | +e_cal_client_get_object_list.cancellable nullable="1" |
2600 | +e_cal_client_get_object_list_finish.icalcomps is_out="1" value_owned="1" type_arguments="iCal.icalcomponent" |
2601 | + |
2602 | +e_cal_client_get_object_list_as_comps async="1" |
2603 | +e_cal_client_get_object_list_as_comps.cancellable nullable="1" |
2604 | +e_cal_client_get_object_list_as_comps_finish.ecalcomps is_out="1" value_owned="1" type_arguments="E.CalComponent" |
2605 | +e_cal_client_get_object_list_as_comps_sync.cancellable nullable="1" |
2606 | +e_cal_client_get_object_list_as_comps_sync.ecalcomps is_out="1" value_owned="1" type_arguments="E.CalComponent" |
2607 | + |
2608 | +e_cal_client_get_object_list_sync.icalcomps is_out="1" value_owned="1" type_arguments="iCal.icalcomponent" |
2609 | +e_cal_client_get_object_list_sync.cancellable nullable="1" |
2610 | + |
2611 | +e_cal_client_get_object_sync.icalcomp value_owned="1" |
2612 | +e_cal_client_get_object_sync.cancellable nullable="1" |
2613 | + |
2614 | +e_cal_client_get_objects_for_uid async="1" |
2615 | +e_cal_client_get_objects_for_uid.cancellable nullable="1" |
2616 | +e_cal_client_get_objects_for_uid_finish.ecalcomps is_out="1" value_owned="1" type_arguments="E.CalComponent" |
2617 | +e_cal_client_get_objects_for_uid_sync.ecalcomps is_out="1" value_owned="1" type_arguments="E.CalComponent" |
2618 | +e_cal_client_get_objects_for_uid_sync.cancellable nullable="1" |
2619 | + |
2620 | +e_cal_client_get_sources.sources value_owned="1" |
2621 | + |
2622 | +e_cal_client_get_timezone async="1" |
2623 | +e_cal_client_get_timezone.cancellable nullable="1" |
2624 | +e_cal_client_get_timezone_finish.zone is_out="1" value_owned="1" |
2625 | +e_cal_client_get_timezone_sync.cancellable nullable="1" |
2626 | +e_cal_client_get_timezone_sync.zone is_out="1" value_owned="1" |
2627 | + |
2628 | +e_cal_client_get_view async="1" |
2629 | +e_cal_client_get_view.cancellable nullable="1" |
2630 | +e_cal_client_get_view_finish.view is_out="1" value_owned="1" |
2631 | +e_cal_client_get_view_sync.cancellable nullable="1" |
2632 | +e_cal_client_get_view_sync.view is_out="1" value_owned="1" |
2633 | + |
2634 | +e_cal_client_modify_object async="1" |
2635 | +e_cal_client_modify_object.cancellable nullable="1" |
2636 | +e_cal_client_modify_object_sync.cancellable nullable="1" |
2637 | + |
2638 | +e_cal_client_receive_objects async="1" |
2639 | +e_cal_client_receive_objects.cancellable nullable="1" |
2640 | +e_cal_client_receive_objects_sync.cancellable nullable="1" |
2641 | + |
2642 | +e_cal_client_remove_object async="1" |
2643 | +e_cal_client_remove_object.cancellable nullable="1" |
2644 | +e_cal_client_remove_object_sync.cancellable nullable="1" |
2645 | + |
2646 | +e_cal_client_send_objects async="1" |
2647 | +e_cal_client_send_objects.cancellable nullable="1" |
2648 | +e_cal_client_send_objects_finish.users is_out="1" value_owned="1" type_arguments="string" |
2649 | +e_cal_client_send_objects_finish.modified_icalcomp is_out="1" value_owned="1" |
2650 | + |
2651 | +e_cal_client_send_objects_sync.cancellable nullable="1" |
2652 | +e_cal_client_send_objects_sync.users is_out="1" value_owned="1" type_arguments="string" |
2653 | +e_cal_client_send_objects_sync.modified_icalcomp is_out="1" value_owned="1" |
2654 | + |
2655 | +ECalClientError cheader_filename="libecal/e-cal-client.h" |
2656 | +ECalClientSourceType cheader_filename="libecal/e-cal-client.h" |
2657 | +ECalClientSourceTypeEnum cheader_filename="libecal/e-cal-client.h" |
2658 | + |
2659 | +ECalClientView cheader_filename="libecal/e-cal-client-view.h" |
2660 | +ECalClientView:client owned_get="1" accessor_method="0" |
2661 | +ECalClientView::objects_added.objects type_name="GLib.SList" type_arguments="unowned iCal.icalcomponent" |
2662 | +ECalClientView::objects_modified.objects type_name="GLib.SList" type_arguments="unowned iCal.icalcomponent" |
2663 | +ECalClientView::objects_removed.uids type_name="GLib.SList" type_arguments="unowned E.CalComponentId?" |
2664 | + |
2665 | +ECalComponent cheader_filename="libecal/e-cal-component.h" |
2666 | +e_cal_component_gen_uid transfer_ownership="1" |
2667 | +e_cal_component_get_alarm_uids transfer_ownership="1" |
2668 | +e_cal_component_get_as_string transfer_ownership="1" |
2669 | +e_cal_component_get_attachment_list.attachment_list is_out="1" value_owned="1" |
2670 | +e_cal_component_get_attendee_list.attendee_list is_out="1" value_owned="1" |
2671 | +e_cal_component_get_categories.categories is_out="1" value_owned="1" |
2672 | +e_cal_component_get_categories_list.categ_list is_out="1" value_owned="1" |
2673 | +e_cal_component_get_classification.classif is_out="1" value_owned="1" |
2674 | +e_cal_component_get_comment_list.text_list is_out="1" value_owned="1" |
2675 | +e_cal_component_get_completed.t is_out="1" type_name="iCal.icaltimetype" value_owned="1" |
2676 | +e_cal_component_get_contact_list.text_list is_out="1" value_owned="1" |
2677 | +e_cal_component_get_created.t is_out="1" type_name="iCal.icaltimetype" value_owned="1" |
2678 | +e_cal_component_get_description_list.text_list is_out="1" value_owned="1" |
2679 | +e_cal_component_get_dtend.dt is_out="1" value_owned="1" |
2680 | +e_cal_component_get_dtstamp.t is_out="1" type_name="iCal.icaltimetype" value_owned="1" |
2681 | +e_cal_component_get_dtstart.dt is_out="1" value_owned="1" |
2682 | +e_cal_component_get_due.dt is_out="1" value_owned="1" |
2683 | +e_cal_component_get_exdate_list.exdate_list is_out="1" value_owned="1" |
2684 | +e_cal_component_get_exrule_list.recur_list is_out="1" value_owned="1" |
2685 | +e_cal_component_get_exrule_property_list.recur_list is_out="1" value_owned="1" |
2686 | +e_cal_component_get_geo.geo is_out="1" type_name="iCal.icalgeotype" value_owned="1" |
2687 | +e_cal_component_get_icalcomponent transfer_ownership="0" |
2688 | +e_cal_component_get_id transfer_ownership="1" |
2689 | +e_cal_component_get_last_modified.t is_out="1" type_name="iCal.icaltimetype" value_owned="1" |
2690 | +e_cal_component_get_location.location is_out="1" value_owned="1" |
2691 | +e_cal_component_get_organizer.organizer is_out="1" value_owned="1" |
2692 | +e_cal_component_get_percent.percent is_out="1" value_owned="1" |
2693 | +e_cal_component_get_priority.priority is_out="1" value_owned="1" |
2694 | +e_cal_component_get_rdate_list.period_list is_out="1" value_owned="1" |
2695 | +e_cal_component_get_recurid.recur_id is_out="1" value_owned="1" |
2696 | +e_cal_component_get_recurid_as_string transfer_ownership="1" |
2697 | +e_cal_component_get_rrule_list.recur_list is_out="1" value_owned="1" |
2698 | +e_cal_component_get_rrule_property_list.recur_list is_out="1" value_owned="1" |
2699 | +e_cal_component_get_sequence.sequence is_out="1" value_owned="1" |
2700 | +e_cal_component_get_status.status is_out="1" value_owned="1" |
2701 | +e_cal_component_get_summary.summary is_out="1" value_owned="1" |
2702 | +e_cal_component_get_transparency.transp is_out="1" value_owned="1" |
2703 | +e_cal_component_get_uid.uid is_out="1" value_owned="1" |
2704 | +e_cal_component_get_url.url is_out="1" value_owned="1" |
2705 | + |
2706 | +e_cal_component_set_completed.t type_name="iCal.icaltimetype" |
2707 | +e_cal_component_set_created.t type_name="iCal.icaltimetype" |
2708 | +e_cal_component_set_dtstamp.t type_name="iCal.icaltimetype" |
2709 | +e_cal_component_set_geo.geo type_name="iCal.icalgeotype" |
2710 | +e_cal_component_set_icalcomponent.icalcomp value_owned="1" |
2711 | +e_cal_component_set_last_modified.t type_name="iCal.icaltimetype" |
2712 | + |
2713 | +ECalComponentAlarm cheader_filename="libecal/e-cal-component.h" |
2714 | +e_cal_component_alarm_clone transfer_ownership="1" |
2715 | +e_cal_component_alarm_get_action.action is_out="1" value_owned="1" |
2716 | +e_cal_component_alarm_get_attach.attach is_out="1" value_owned="1" |
2717 | +e_cal_component_alarm_get_attendee_list.attendee_list is_out="1" value_owned="1" |
2718 | +e_cal_component_alarm_get_description.description is_out="1" value_owned="1" |
2719 | +e_cal_component_alarm_get_icalcomponent transfer_ownership="1" |
2720 | + |
2721 | +ECalComponentAlarmAction cheader_filename="libecal/e-cal-component.h" |
2722 | +ECalComponentAlarmInstance is_value_type="1" cheader_filename="libecal/e-cal-component.h" |
2723 | +ECalComponentAlarmRepeat is_value_type="1" cheader_filename="libecal/e-cal-component.h" |
2724 | +ECalComponentAlarmTrigger is_value_type="1" cheader_filename="libecal/e-cal-component.h" |
2725 | +ECalComponentAlarmTriggerType cheader_filename="libecal/e-cal-component.h" |
2726 | +ECalComponentAlarms is_value_type="1" cheader_filename="libecal/e-cal-component.h" |
2727 | +ECalComponentAlarms.alarms type_arguments="E.CalComponentAlarmInstance" cheader_filename="libecal/e-cal-component.h" |
2728 | +ECalComponentAttendee is_value_type="1" cheader_filename="libecal/e-cal-component.h" |
2729 | +ECalComponentClassification cheader_filename="libecal/e-cal-component.h" |
2730 | + |
2731 | +ECalComponentDateTime cheader_filename="libecal/e-cal-component.h" is_value_type="1" has_destroy_function="0" |
2732 | +ECalComponentDateTime.value type_name="iCal.icaltimetype*" |
2733 | + |
2734 | +ECalComponentField cheader_filename="libecal/e-cal-component.h" |
2735 | +ECalComponentId is_value_type="1" cheader_filename="libecal/e-cal-component.h" |
2736 | +ECalComponentOrganizer is_value_type="1" cheader_filename="libecal/e-cal-component.h" |
2737 | +ECalComponentPeriod is_value_type="1" cheader_filename="libecal/e-cal-component.h" |
2738 | +ECalComponentPeriod.start type_name="iCal.icaltimetype" cheader_filename="libecal/e-cal-component.h" |
2739 | +ECalComponentPeriodType cheader_filename="libecal/e-cal-component.h" |
2740 | +ECalComponentRange is_value_type="1" cheader_filename="libecal/e-cal-component.h" |
2741 | +ECalComponentRangeType cheader_filename="libecal/e-cal-component.h" |
2742 | +ECalComponentText is_value_type="1" cheader_filename="libecal/e-cal-component.h" |
2743 | +ECalComponentTransparency cheader_filename="libecal/e-cal-component.h" |
2744 | +ECalComponentVType cheader_filename="libecal/e-cal-component.h" |
2745 | + |
2746 | +CalObjInstance is_value_type="1" cheader_filename="libecal/e-cal-util.h" |
2747 | +CalObjModType cheader_filename="libecal/e-cal-util.h" |
2748 | + |
2749 | +ECalLoadState cheader_filename="libecal/e-cal.h" |
2750 | +CalMode cheader_filename="libecal/e-cal-util.h" |
2751 | +ECalSetModeStatus cheader_filename="libecal/e-cal.h" |
2752 | +ECalSourceType cheader_filename="libecal/e-cal.h" |
2753 | +ECalendarStatus cheader_filename="libecal/e-cal-types.h" |
2754 | +EDataCalMode cheader_filename="libecal/e-cal.h" |
2755 | +ECalRecurInstanceFn cheader_filename="libecal/e-cal-recur.h" |
2756 | +ECalRecurResolveTimezoneFn transfer_ownership="1" cheader_filename="libecal/e-cal-recur.h" |
2757 | + |
2758 | +CAL_BACKEND_PROPERTY* cheader_filename="libecal/e-cal-client.h" |
2759 | +CAL_STATIC_CAPABILITY* cheader_filename="libecal/e-cal-util.h" |
2760 | + |
2761 | +ECalView hidden="1" # deprecated@3.2 |
2762 | + |
2763 | +cal_obj_uid_list_free cheader_filename="libecal/e-cal-util.h" |
2764 | +e_calendar_error_quark cheader_filename="libecal/e-cal-types.h" |
2765 | + |
2766 | +icaltimetype_to_tm* cheader_filename="libecal/e-cal-time-util.h" |
2767 | +isodate_from_time_t cheader_filename="libecal/e-cal-time-util.h" |
2768 | +tm_to_icaltimetype cheader_filename="libecal/e-cal-time-util.h" |
2769 | + |
2770 | +time_* cheader_filename="libecal/e-cal-time-util.h" |
2771 | |
2772 | === added file 'vapi/libecalendar-1.2.vapi' |
2773 | --- vapi/libecalendar-1.2.vapi 1970-01-01 00:00:00 +0000 |
2774 | +++ vapi/libecalendar-1.2.vapi 2016-02-03 23:24:26 +0000 |
2775 | @@ -0,0 +1,669 @@ |
2776 | +/* libecalendar-1.2.vapi generated by vapigen, do not modify. */ |
2777 | + |
2778 | +[CCode (cprefix = "E", gir_namespace = "ECalendar", gir_version = "1.2", lower_case_cprefix = "e_")] |
2779 | +namespace E { |
2780 | + [CCode (cheader_filename = "libecal/libecal.h", type_id = "e_cal_get_type ()")] |
2781 | + [Deprecated (since = "3.2")] |
2782 | + public class Cal : GLib.Object { |
2783 | + public virtual signal void backend_died (); |
2784 | + public virtual signal void backend_error (string message); |
2785 | + public virtual signal void cal_opened (int status); |
2786 | + public virtual signal void cal_opened_ex (long error); |
2787 | + } |
2788 | + namespace CalBackendProperty { |
2789 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS")] |
2790 | + public const string ALARM_EMAIL_ADDRESS; |
2791 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS")] |
2792 | + public const string CAL_EMAIL_ADDRESS; |
2793 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_BACKEND_PROPERTY_DEFAULT_OBJECT")] |
2794 | + public const string DEFAULT_OBJECT; |
2795 | + } |
2796 | + [CCode (cheader_filename = "libecal/libecal.h", type_id = "e_cal_client_get_type ()")] |
2797 | + public class CalClient : E.Client { |
2798 | + [CCode (has_construct_function = false)] |
2799 | + public CalClient (E.Source source, E.CalClientSourceType source_type) throws GLib.Error; |
2800 | + public virtual async void connect (E.Source source, E.CalClientSourceType source_type, GLib.Cancellable? cancellable) throws GLib.Error; |
2801 | + [CCode (has_construct_function = false, cname = "e_cal_client_connect_sync")] |
2802 | + public CalClient.connect_sync (E.Source source, E.CalClientSourceType source_type, int32 wait_for_connected_seconds, GLib.Cancellable? cancellable = null) throws GLib.Error; |
2803 | + public async bool add_timezone (iCal.TimeZone zone, GLib.Cancellable cancellable) throws GLib.Error; |
2804 | + public bool add_timezone_sync (iCal.TimeZone zone, GLib.Cancellable cancellable) throws GLib.Error; |
2805 | + public bool check_one_alarm_only (); |
2806 | + public bool check_organizer_must_accept (); |
2807 | + public bool check_organizer_must_attend (); |
2808 | + public bool check_recurrences_no_master (); |
2809 | + public bool check_save_schedules (); |
2810 | + public static bool check_timezones (iCal.Component comp, GLib.List comps, GLib.Callback tzlookup, void* ecalclient, GLib.Cancellable cancellable) throws GLib.Error; |
2811 | + public async bool create_object (iCal.Component icalcomp, GLib.Cancellable? cancellable, out string uid) throws GLib.Error; |
2812 | + public bool create_object_sync (iCal.Component icalcomp, out string uid, GLib.Cancellable? cancellable) throws GLib.Error; |
2813 | + [CCode (has_construct_function = false)] |
2814 | + public CalClient.@default (E.CalClientSourceType source_type) throws GLib.Error; |
2815 | + public async bool discard_alarm (string uid, string rid, string auid, GLib.Cancellable? cancellable) throws GLib.Error; |
2816 | + public bool discard_alarm_sync (string uid, string rid, string auid, GLib.Cancellable? cancellable) throws GLib.Error; |
2817 | + public static void free_ecalcomp_slist (GLib.SList<E.CalComponent> ecalcomps); |
2818 | + public static void free_icalcomp_slist (GLib.SList<iCal.Component> icalcomps); |
2819 | + [CCode (has_construct_function = false)] |
2820 | + public CalClient.from_uri (string uri, E.CalClientSourceType source_type) throws GLib.Error; |
2821 | + public void generate_instances (ulong start, ulong end, GLib.Cancellable? cancellable, E.CalRecurInstanceFn cb, void* cb_data, owned GLib.DestroyNotify? destroy_cb_data); |
2822 | + public void generate_instances_for_object (iCal.Component icalcomp, ulong start, ulong end, GLib.Cancellable? cancellable, E.CalRecurInstanceFn cb, void* cb_data, owned GLib.DestroyNotify? destroy_cb_data); |
2823 | + public void generate_instances_for_object_sync (iCal.Component icalcomp, ulong start, ulong end, E.CalRecurInstanceFn cb, void* cb_data); |
2824 | + public void generate_instances_sync (ulong start, ulong end, E.CalRecurInstanceFn cb, void* cb_data); |
2825 | + public async bool get_attachment_uris (string uid, string rid, GLib.Cancellable? cancellable, out GLib.SList attachment_uris) throws GLib.Error; |
2826 | + public bool get_attachment_uris_sync (string uid, string rid, GLib.SList attachment_uris, GLib.Cancellable? cancellable) throws GLib.Error; |
2827 | + public unowned string get_component_as_string (iCal.Component icalcomp); |
2828 | + public async bool get_default_object (GLib.Cancellable? cancellable, out iCal.Component icalcomp) throws GLib.Error; |
2829 | + public bool get_default_object_sync (out unowned iCal.Component icalcomp, GLib.Cancellable? cancellable) throws GLib.Error; |
2830 | + public unowned iCal.TimeZone get_default_timezone (); |
2831 | + public async bool get_free_busy (ulong start, ulong end, GLib.SList users, GLib.Cancellable? cancellable) throws GLib.Error; |
2832 | + public bool get_free_busy_sync (ulong start, ulong end, GLib.SList users, GLib.Cancellable? cancellable) throws GLib.Error; |
2833 | + public unowned string get_local_attachment_store (); |
2834 | + public async bool get_object (string uid, string rid, GLib.Cancellable? cancellable, out iCal.Component icalcomp) throws GLib.Error; |
2835 | + public async bool get_object_list (string sexp, GLib.Cancellable? cancellable, out GLib.SList<iCal.Component> icalcomps) throws GLib.Error; |
2836 | + public async bool get_object_list_as_comps (string sexp, GLib.Cancellable? cancellable, out GLib.SList<E.CalComponent> ecalcomps) throws GLib.Error; |
2837 | + public bool get_object_list_as_comps_sync (string sexp, out GLib.SList<E.CalComponent> ecalcomps, GLib.Cancellable? cancellable) throws GLib.Error; |
2838 | + public bool get_object_list_sync (string sexp, out GLib.SList<iCal.Component> icalcomps, GLib.Cancellable? cancellable) throws GLib.Error; |
2839 | + public bool get_object_sync (string uid, string rid, out iCal.Component icalcomp, GLib.Cancellable? cancellable) throws GLib.Error; |
2840 | + public async bool get_objects_for_uid (string uid, GLib.Cancellable? cancellable, out GLib.SList<E.CalComponent> ecalcomps) throws GLib.Error; |
2841 | + public bool get_objects_for_uid_sync (string uid, out GLib.SList<E.CalComponent> ecalcomps, GLib.Cancellable? cancellable) throws GLib.Error; |
2842 | + public E.CalClientSourceType get_source_type (); |
2843 | + public async bool get_timezone (string tzid, GLib.Cancellable? cancellable, out iCal.TimeZone zone) throws GLib.Error; |
2844 | + public bool get_timezone_sync (string tzid, out iCal.TimeZone zone, GLib.Cancellable? cancellable) throws GLib.Error; |
2845 | + public async bool get_view (string sexp, GLib.Cancellable? cancellable, out E.CalClientView view) throws GLib.Error; |
2846 | + public bool get_view_sync (string sexp, out E.CalClientView view, GLib.Cancellable? cancellable) throws GLib.Error; |
2847 | + public async bool modify_object (iCal.Component icalcomp, E.CalObjModType mod, GLib.Cancellable? cancellable) throws GLib.Error; |
2848 | + public bool modify_object_sync (iCal.Component icalcomp, E.CalObjModType mod, GLib.Cancellable? cancellable) throws GLib.Error; |
2849 | + public async bool receive_objects (iCal.Component icalcomp, GLib.Cancellable? cancellable) throws GLib.Error; |
2850 | + public bool receive_objects_sync (iCal.Component icalcomp, GLib.Cancellable? cancellable) throws GLib.Error; |
2851 | + public async bool remove_object (string uid, string rid, E.CalObjModType mod, GLib.Cancellable? cancellable) throws GLib.Error; |
2852 | + public bool remove_object_sync (string uid, string rid, E.CalObjModType mod, GLib.Cancellable? cancellable) throws GLib.Error; |
2853 | + public static unowned iCal.TimeZone resolve_tzid_cb (string tzid, void* data); |
2854 | + public async bool send_objects (iCal.Component icalcomp, GLib.Cancellable? cancellable, out GLib.SList<string> users, out iCal.Component modified_icalcomp) throws GLib.Error; |
2855 | + public bool send_objects_sync (iCal.Component icalcomp, out GLib.SList<string> users, out iCal.Component modified_icalcomp, GLib.Cancellable? cancellable) throws GLib.Error; |
2856 | + public bool set_default () throws GLib.Error; |
2857 | + public static bool set_default_source (E.Source source, E.CalClientSourceType source_type) throws GLib.Error; |
2858 | + public void set_default_timezone (iCal.TimeZone zone); |
2859 | + [CCode (has_construct_function = false)] |
2860 | + public CalClient.system (E.CalClientSourceType source_type) throws GLib.Error; |
2861 | + public static unowned iCal.TimeZone tzlookup (string tzid, void* ecalclient, GLib.Cancellable cancellable) throws GLib.Error; |
2862 | + public static unowned iCal.TimeZone tzlookup_icomp (string tzid, void* custom, GLib.Cancellable cancellable) throws GLib.Error; |
2863 | + public virtual signal void free_busy_data (void* free_busy_ecalcomps); |
2864 | + } |
2865 | + [CCode (cheader_filename = "libecal/libecal.h", type_id = "e_cal_client_view_get_type ()")] |
2866 | + public class CalClientView : GLib.Object { |
2867 | + [CCode (has_construct_function = false)] |
2868 | + protected CalClientView (); |
2869 | + public bool is_running (); |
2870 | + public void set_fields_of_interest (GLib.SList<string>? fields_of_interest) throws GLib.Error; |
2871 | + public void set_flags (E.CalClientViewFlags flags) throws GLib.Error; |
2872 | + public void start () throws GLib.Error; |
2873 | + public void stop () throws GLib.Error; |
2874 | + public E.CalClient client { get; construct; } |
2875 | + [NoAccessorMethod] |
2876 | + public void* view { get; construct; } |
2877 | + public virtual signal void complete (GLib.Error error); |
2878 | + public virtual signal void objects_added (GLib.SList<weak iCal.Component> objects); |
2879 | + public virtual signal void objects_modified (GLib.SList<weak iCal.Component> objects); |
2880 | + public virtual signal void objects_removed (GLib.SList<weak E.CalComponentId?> uids); |
2881 | + public virtual signal void progress (uint percent, string message); |
2882 | + } |
2883 | + [CCode (cheader_filename = "libecal/libecal.h", type_id = "e_cal_component_get_type ()")] |
2884 | + public class CalComponent : GLib.Object { |
2885 | + [CCode (has_construct_function = false)] |
2886 | + public CalComponent (); |
2887 | + [CCode (has_construct_function = false)] |
2888 | + public CalComponent.from_string (string calobj); |
2889 | + [CCode (has_construct_function = false)] |
2890 | + public CalComponent.from_icalcomponent (iCal.Component icalcomp); |
2891 | + public void abort_sequence (); |
2892 | + public void add_alarm (E.CalComponentAlarm alarm); |
2893 | + public unowned E.CalComponent clone (); |
2894 | + public void commit_sequence (); |
2895 | + public bool event_dates_match (E.CalComponent comp2); |
2896 | + public static void free_attendee_list (GLib.SList<E.CalComponentAttendee> attendee_list); |
2897 | + public static void free_categories_list (GLib.SList<string> categ_list); |
2898 | + public static void free_datetime (E.CalComponentDateTime dt); |
2899 | + public static void free_exdate_list (GLib.SList exdate_list); |
2900 | + public static void free_geo (iCal.GeoType geo); |
2901 | + public static void free_icaltimetype (iCal.TimeType t); |
2902 | + public static void free_id (E.CalComponentId id); |
2903 | + public static void free_percent (int percent); |
2904 | + public static void free_period_list (GLib.SList period_list); |
2905 | + public static void free_priority (int priority); |
2906 | + public static void free_range (E.CalComponentRange range); |
2907 | + public static void free_recur_list (GLib.SList<E.CalComponentRange> recur_list); |
2908 | + public static void free_sequence (int sequence); |
2909 | + public static void free_text_list (GLib.SList<E.CalComponentText> text_list); |
2910 | + public static string gen_uid (); |
2911 | + public E.CalComponentAlarm get_alarm (string auid); |
2912 | + public GLib.List<string> get_alarm_uids (); |
2913 | + public string get_as_string (); |
2914 | + public void get_attachment_list (out GLib.SList<string> attachment_list); |
2915 | + public void get_attendee_list (out GLib.SList<E.CalComponentAttendee?> attendee_list); |
2916 | + public void get_categories (out string categories); |
2917 | + public void get_categories_list (out GLib.SList<string> categ_list); |
2918 | + public void get_classification (out E.CalComponentClassification classif); |
2919 | + public void get_comment_list (out GLib.SList<E.CalComponentText> text_list); |
2920 | + public void get_completed (out iCal.TimeType t); |
2921 | + public void get_contact_list (out GLib.SList<E.CalComponentText> text_list); |
2922 | + public void get_created (out iCal.TimeType t); |
2923 | + public void get_description_list (out GLib.SList<E.CalComponentText> text_list); |
2924 | + public void get_dtend (out E.CalComponentDateTime dt); |
2925 | + public void get_dtstamp (out iCal.TimeType t); |
2926 | + public void get_dtstart (out E.CalComponentDateTime dt); |
2927 | + public void get_due (out E.CalComponentDateTime dt); |
2928 | + public void get_exdate_list (out GLib.SList<E.CalComponentDateTime> exdate_list); |
2929 | + public void get_exrule_list (out GLib.SList<E.CalComponentRange> recur_list); |
2930 | + public void get_exrule_property_list (out GLib.SList<E.CalComponentRange> recur_list); |
2931 | + public void get_geo (out iCal.GeoType geo); |
2932 | + public unowned iCal.Component get_icalcomponent (); |
2933 | + public E.CalComponentId get_id (); |
2934 | + public void get_last_modified (out iCal.TimeType t); |
2935 | + public void get_location (out string location); |
2936 | + public int get_num_attachments (); |
2937 | + public void get_organizer (out E.CalComponentOrganizer organizer); |
2938 | + public void get_percent (out int percent); |
2939 | + public int get_percent_as_int (); |
2940 | + public void get_priority (out int priority); |
2941 | + public void get_rdate_list (out GLib.SList<E.CalComponentPeriod> period_list); |
2942 | + public void get_recurid (out E.CalComponentRange recur_id); |
2943 | + public string get_recurid_as_string (); |
2944 | + public void get_rrule_list (out GLib.SList<E.CalComponentRange> recur_list); |
2945 | + public void get_rrule_property_list (out GLib.SList<E.CalComponentRange> recur_list); |
2946 | + public void get_sequence (out int sequence); |
2947 | + public void get_status (out iCal.PropertyStatus status); |
2948 | + public void get_summary (out E.CalComponentText summary); |
2949 | + public void get_transparency (out E.CalComponentTransparency transp); |
2950 | + public void get_uid (out string uid); |
2951 | + public void get_url (out string url); |
2952 | + public E.CalComponentVType get_vtype (); |
2953 | + public bool has_alarms (); |
2954 | + public bool has_attachments (); |
2955 | + public bool has_attendees (); |
2956 | + public bool has_exceptions (); |
2957 | + public bool has_exdates (); |
2958 | + public bool has_exrules (); |
2959 | + public bool has_organizer (); |
2960 | + public bool has_rdates (); |
2961 | + public bool has_recurrences (); |
2962 | + public bool has_rrules (); |
2963 | + public bool has_simple_recurrence (); |
2964 | + public bool is_instance (); |
2965 | + public void remove_alarm (string auid); |
2966 | + public void remove_all_alarms (); |
2967 | + public void rescan (); |
2968 | + public void set_attachment_list (GLib.SList<string> attachment_list); |
2969 | + public void set_attendee_list (GLib.SList<E.CalComponentAttendee> attendee_list); |
2970 | + public void set_categories (string categories); |
2971 | + public void set_categories_list (GLib.SList<string> categ_list); |
2972 | + public void set_classification (E.CalComponentClassification classif); |
2973 | + public void set_comment_list (GLib.SList<E.CalComponentText> text_list); |
2974 | + public void set_completed (iCal.TimeType t); |
2975 | + public void set_contact_list (GLib.SList<E.CalComponentText> text_list); |
2976 | + public void set_created (iCal.TimeType t); |
2977 | + public void set_description_list (GLib.SList<E.CalComponentText> text_list); |
2978 | + public void set_dtend (E.CalComponentDateTime dt); |
2979 | + public void set_dtstamp (iCal.TimeType t); |
2980 | + public void set_dtstart (E.CalComponentDateTime dt); |
2981 | + public void set_due (E.CalComponentDateTime dt); |
2982 | + public void set_exdate_list (GLib.SList exdate_list); |
2983 | + public void set_exrule_list (GLib.SList<E.CalComponentRange> recur_list); |
2984 | + public void set_geo (iCal.GeoType* geo); |
2985 | + public bool set_icalcomponent (owned iCal.Component icalcomp); |
2986 | + public void set_last_modified (iCal.TimeType t); |
2987 | + public void set_location (string location); |
2988 | + public void set_new_vtype (E.CalComponentVType type); |
2989 | + public void set_organizer (E.CalComponentOrganizer organizer); |
2990 | + public void set_percent (int percent); |
2991 | + public void set_percent_as_int (int percent); |
2992 | + public void set_priority (int priority); |
2993 | + public void set_rdate_list (GLib.SList<E.CalComponentPeriod> period_list); |
2994 | + public void set_recurid (E.CalComponentRange recur_id); |
2995 | + public void set_rrule_list (GLib.SList<E.CalComponentRange> recur_list); |
2996 | + public void set_sequence (int sequence); |
2997 | + public void set_status (iCal.PropertyStatus status); |
2998 | + public void set_summary (E.CalComponentText summary); |
2999 | + public void set_transparency (E.CalComponentTransparency transp); |
3000 | + public void set_uid (string uid); |
3001 | + public void set_url (string url); |
3002 | + public void strip_errors (); |
3003 | + } |
3004 | + [CCode (cheader_filename = "libecal/libecal.h", free_function = "e_cal_component_alarm_free")] |
3005 | + [Compact] |
3006 | + public class CalComponentAlarm { |
3007 | + [CCode (has_construct_function = false)] |
3008 | + public CalComponentAlarm (); |
3009 | + public E.CalComponentAlarm clone (); |
3010 | + public void get_action (out E.CalComponentAlarmAction action); |
3011 | + public void get_attach (out iCal.Attach attach); |
3012 | + public void get_attendee_list (out GLib.SList<E.CalComponentAttendee> attendee_list); |
3013 | + public void get_description (out E.CalComponentText description); |
3014 | + public iCal.Component get_icalcomponent (); |
3015 | + public void get_repeat (out E.CalComponentAlarmRepeat repeat); |
3016 | + public void get_trigger (out E.CalComponentAlarmTrigger trigger); |
3017 | + public unowned string get_uid (); |
3018 | + public bool has_attendees (); |
3019 | + public void set_action (E.CalComponentAlarmAction action); |
3020 | + public void set_attach (iCal.Attach attach); |
3021 | + public void set_attendee_list (GLib.SList<E.CalComponentAttendee> attendee_list); |
3022 | + public void set_description (E.CalComponentText description); |
3023 | + public void set_repeat (E.CalComponentAlarmRepeat repeat); |
3024 | + public void set_trigger (E.CalComponentAlarmTrigger trigger); |
3025 | + } |
3026 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3027 | + public struct CalChange { |
3028 | + public weak E.CalComponent comp; |
3029 | + public E.CalChangeType type; |
3030 | + } |
3031 | + [CCode (cheader_filename = "libecal/libecal.h", type_id = "e_cal_view_get_type ()")] |
3032 | + [Deprecated (since = "3.2")] |
3033 | + public class CalView : GLib.Object { |
3034 | + [CCode (has_construct_function = false)] |
3035 | + protected CalView (); |
3036 | + [Deprecated (since = "3.2")] |
3037 | + public void start (); |
3038 | + [Deprecated (since = "3.2")] |
3039 | + public void stop (); |
3040 | + [NoAccessorMethod] |
3041 | + public E.Cal client { owned get; construct; } |
3042 | + [NoAccessorMethod] |
3043 | + public void* view { get; construct; } |
3044 | + public signal void objects_added (GLib.List<long> objects); |
3045 | + public signal void objects_modified (GLib.List<long> objects); |
3046 | + public signal void objects_removed (GLib.List<E.CalComponentId> objects); |
3047 | + public virtual signal void view_complete (uint status, string error_msg); |
3048 | + public virtual signal void view_done (int status); |
3049 | + public virtual signal void view_progress (string message, uint percent); |
3050 | + } |
3051 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3052 | + public struct CalComponentAlarmInstance { |
3053 | + public weak string auid; |
3054 | + public time_t trigger; |
3055 | + public time_t occur_start; |
3056 | + public time_t occur_end; |
3057 | + } |
3058 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3059 | + public struct CalComponentAlarmRepeat { |
3060 | + public int repetitions; |
3061 | + public iCal.DurationType duration; |
3062 | + } |
3063 | + [SimpleType] |
3064 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3065 | + public struct CalComponentAlarmTrigger { |
3066 | + public E.CalComponentAlarmTriggerType type; |
3067 | + [CCode(cname = "u.rel_duration")] |
3068 | + public iCal.DurationType rel_duration; |
3069 | + [CCode(cname = "u.abs_time")] |
3070 | + public iCal.TimeType abs_time; |
3071 | + } |
3072 | + [CCode (cheader_filename = "libecal/libecal.h", free_function = "e_cal_component_alarms_free")] |
3073 | + public struct CalComponentAlarms { |
3074 | + public weak E.CalComponent comp; |
3075 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3076 | + public weak GLib.SList<E.CalComponentAlarmInstance> alarms; |
3077 | + public void free (); |
3078 | + } |
3079 | + [CCode (cheader_filename = "libecal/libecal.h", has_type_id = false)] |
3080 | + public struct CalComponentAttendee { |
3081 | + public weak string value; |
3082 | + public weak string member; |
3083 | + public iCal.ParameterCutype cutype; |
3084 | + public iCal.ParameterRole role; |
3085 | + public iCal.ParameterPartStat status; |
3086 | + public bool rsvp; |
3087 | + public weak string delto; |
3088 | + public weak string delfrom; |
3089 | + public weak string sentby; |
3090 | + public weak string cn; |
3091 | + public weak string language; |
3092 | + } |
3093 | + [CCode (cheader_filename = "libecal/libecal.h", free_function = "e_cal_component_free_datetime")] |
3094 | + public struct CalComponentDateTime { |
3095 | + public iCal.TimeType* value; |
3096 | + public weak string tzid; |
3097 | + } |
3098 | + [CCode (cheader_filename = "libecal/libecal.h", free_function = "e_cal_component_free_id", copy_function = "e_cal_component_id_copy")] |
3099 | + public struct CalComponentId { |
3100 | + public weak string uid; |
3101 | + public weak string rid; |
3102 | + } |
3103 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3104 | + public struct CalComponentOrganizer { |
3105 | + public weak string value; |
3106 | + public weak string sentby; |
3107 | + public weak string cn; |
3108 | + public weak string language; |
3109 | + } |
3110 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3111 | + public struct CalComponentPeriod { |
3112 | + public E.CalComponentPeriodType type; |
3113 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3114 | + public iCal.TimeType start; |
3115 | + [CCode(cname = "u.duration")] |
3116 | + public iCal.DurationType duration; |
3117 | + [CCode(cname = "u.end")] |
3118 | + public iCal.TimeType end; |
3119 | + } |
3120 | + [CCode (cheader_filename = "libecal/libecal.h", free_function = "e_cal_component_free_range")] |
3121 | + public struct CalComponentRange { |
3122 | + public E.CalComponentRangeType type; |
3123 | + public E.CalComponentDateTime datetime; |
3124 | + } |
3125 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3126 | + public struct CalComponentText { |
3127 | + public weak string value; |
3128 | + public weak string altrep; |
3129 | + } |
3130 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3131 | + public struct CalObjInstance { |
3132 | + public weak string uid; |
3133 | + public ulong start; |
3134 | + public ulong end; |
3135 | + [CCode (cname = "cal_obj_instance_list_free")] |
3136 | + public static void list_free (GLib.List list); |
3137 | + } |
3138 | + [CCode (cheader_filename = "libecal/libecal.h", type_id = "e_timezone_cache_get_type")] |
3139 | + public interface TimezoneCache { |
3140 | + public void add_timezone (iCal.TimeZone zone); |
3141 | + public iCal.TimeZone get_timezone (string tzid); |
3142 | + public GLib.List<iCal.TimeZone> list_timezones (); |
3143 | + public signal void timezone_added (iCal.TimeZone zone); |
3144 | + } |
3145 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_CHANGE_", type_id = "e_cal_change_type_get_type ()")] |
3146 | + public enum CalChangeType { |
3147 | + ADDED, |
3148 | + MODIFIED, |
3149 | + DELETED |
3150 | + } |
3151 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_CLIENT_ERROR_")] |
3152 | + public errordomain CalClientError { |
3153 | + NO_SUCH_CALENDAR, |
3154 | + OBJECT_NOT_FOUND, |
3155 | + INVALID_OBJECT, |
3156 | + UNKNOWN_USER, |
3157 | + OBJECT_ID_ALREADY_EXISTS, |
3158 | + INVALID_RANGE; |
3159 | + public static GLib.Error create (E.CalClientError code, string custom_msg); |
3160 | + public static GLib.Quark quark (); |
3161 | + public static unowned string to_string (E.CalClientError code); |
3162 | + } |
3163 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_CLIENT_SOURCE_TYPE_", type_id = "e_cal_client_source_type_get_type ()")] |
3164 | + public enum CalClientSourceType { |
3165 | + EVENTS, |
3166 | + TASKS, |
3167 | + MEMOS, |
3168 | + LAST |
3169 | + } |
3170 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_COMPONENT_ALARM_", has_type_id = false)] |
3171 | + public enum CalComponentAlarmAction { |
3172 | + NONE, |
3173 | + AUDIO, |
3174 | + DISPLAY, |
3175 | + EMAIL, |
3176 | + PROCEDURE, |
3177 | + UNKNOWN |
3178 | + } |
3179 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_CLIENT_VIEW_FLAGS_")] |
3180 | + [Flags] |
3181 | + public enum CalClientViewFlags { |
3182 | + NONE, |
3183 | + NOTIFY_INITIAL |
3184 | + } |
3185 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_COMPONENT_ALARM_TRIGGER_", has_type_id = false)] |
3186 | + public enum CalComponentAlarmTriggerType { |
3187 | + NONE, |
3188 | + RELATIVE_START, |
3189 | + RELATIVE_END, |
3190 | + ABSOLUTE |
3191 | + } |
3192 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_COMPONENT_CLASS_", has_type_id = false)] |
3193 | + public enum CalComponentClassification { |
3194 | + NONE, |
3195 | + PUBLIC, |
3196 | + PRIVATE, |
3197 | + CONFIDENTIAL, |
3198 | + UNKNOWN |
3199 | + } |
3200 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_COMPONENT_FIELD_", has_type_id = false)] |
3201 | + public enum CalComponentField { |
3202 | + CATEGORIES, |
3203 | + CLASSIFICATION, |
3204 | + COMPLETED, |
3205 | + DTEND, |
3206 | + DTSTART, |
3207 | + DUE, |
3208 | + GEO, |
3209 | + PERCENT, |
3210 | + PRIORITY, |
3211 | + SUMMARY, |
3212 | + TRANSPARENCY, |
3213 | + URL, |
3214 | + HAS_ALARMS, |
3215 | + ICON, |
3216 | + COMPLETE, |
3217 | + RECURRING, |
3218 | + OVERDUE, |
3219 | + COLOR, |
3220 | + STATUS, |
3221 | + COMPONENT, |
3222 | + LOCATION, |
3223 | + NUM_FIELDS |
3224 | + } |
3225 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_COMPONENT_PERIOD_", has_type_id = false)] |
3226 | + public enum CalComponentPeriodType { |
3227 | + DATETIME, |
3228 | + DURATION |
3229 | + } |
3230 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_COMPONENT_RANGE_", has_type_id = false)] |
3231 | + public enum CalComponentRangeType { |
3232 | + SINGLE, |
3233 | + THISPRIOR, |
3234 | + THISFUTURE |
3235 | + } |
3236 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_COMPONENT_TRANSP_", has_type_id = false)] |
3237 | + public enum CalComponentTransparency { |
3238 | + NONE, |
3239 | + TRANSPARENT, |
3240 | + OPAQUE, |
3241 | + UNKNOWN |
3242 | + } |
3243 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_COMPONENT_", has_type_id = false)] |
3244 | + public enum CalComponentVType { |
3245 | + NO_TYPE, |
3246 | + EVENT, |
3247 | + TODO, |
3248 | + JOURNAL, |
3249 | + FREEBUSY, |
3250 | + TIMEZONE |
3251 | + } |
3252 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_LOAD_", has_type_id = false)] |
3253 | + public enum CalLoadState { |
3254 | + NOT_LOADED, |
3255 | + AUTHENTICATING, |
3256 | + LOADING, |
3257 | + LOADED |
3258 | + } |
3259 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "CAL_MODE_", has_type_id = false)] |
3260 | + public enum CalMode { |
3261 | + INVALID, |
3262 | + LOCAL, |
3263 | + REMOTE, |
3264 | + ANY |
3265 | + } |
3266 | + [CCode (cheader_filename = "libecal/libecal.h", cname="CalObjModType", cprefix = "E_CAL_OBJ_MOD_", has_type_id = false)] |
3267 | + [Flags] |
3268 | + public enum CalObjModType { |
3269 | + THIS, |
3270 | + THIS_AND_PRIOR, |
3271 | + THIS_AND_FUTURE, |
3272 | + ONLY_THIS, |
3273 | + ALL |
3274 | + } |
3275 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_SET_MODE_", has_type_id = false)] |
3276 | + public enum CalSetModeStatus { |
3277 | + SUCCESS, |
3278 | + ERROR, |
3279 | + NOT_SUPPORTED |
3280 | + } |
3281 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CAL_SOURCE_TYPE_", has_type_id = false)] |
3282 | + public enum CalSourceType { |
3283 | + EVENT, |
3284 | + TODO, |
3285 | + JOURNAL, |
3286 | + LAST |
3287 | + } |
3288 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "E_CALENDAR_STATUS_", type_id = "e_calendar_status_get_type ()")] |
3289 | + public enum CalendarStatus { |
3290 | + OK, |
3291 | + INVALID_ARG, |
3292 | + BUSY, |
3293 | + REPOSITORY_OFFLINE, |
3294 | + NO_SUCH_CALENDAR, |
3295 | + OBJECT_NOT_FOUND, |
3296 | + INVALID_OBJECT, |
3297 | + URI_NOT_LOADED, |
3298 | + URI_ALREADY_LOADED, |
3299 | + PERMISSION_DENIED, |
3300 | + UNKNOWN_USER, |
3301 | + OBJECT_ID_ALREADY_EXISTS, |
3302 | + PROTOCOL_NOT_SUPPORTED, |
3303 | + CANCELLED, |
3304 | + COULD_NOT_CANCEL, |
3305 | + AUTHENTICATION_FAILED, |
3306 | + AUTHENTICATION_REQUIRED, |
3307 | + DBUS_EXCEPTION, |
3308 | + OTHER_ERROR, |
3309 | + INVALID_SERVER_VERSION, |
3310 | + NOT_SUPPORTED |
3311 | + } |
3312 | + namespace CalStaticCapability { |
3313 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_CREATE_MESSAGES")] |
3314 | + public const string CREATE_MESSAGES; |
3315 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_DELEGATE_SUPPORTED")] |
3316 | + public const string DELEGATE_SUPPORTED; |
3317 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_DELEGATE_TO_MANY")] |
3318 | + public const string DELEGATE_TO_MANY; |
3319 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING")] |
3320 | + public const string HAS_UNACCEPTED_MEETING; |
3321 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_ALARM_REPEAT")] |
3322 | + public const string NO_ALARM_REPEAT; |
3323 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_AUDIO_ALARMS")] |
3324 | + public const string NO_AUDIO_ALARMS; |
3325 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK")] |
3326 | + public const string NO_CONV_TO_ASSIGN_TASK; |
3327 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_CONV_TO_RECUR")] |
3328 | + public const string NO_CONV_TO_RECUR; |
3329 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_DISPLAY_ALARMS")] |
3330 | + public const string NO_DISPLAY_ALARMS; |
3331 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_EMAIL_ALARMS")] |
3332 | + public const string NO_EMAIL_ALARMS; |
3333 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_GEN_OPTIONS")] |
3334 | + public const string NO_GEN_OPTIONS; |
3335 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_ORGANIZER")] |
3336 | + public const string NO_ORGANIZER; |
3337 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_PROCEDURE_ALARMS")] |
3338 | + public const string NO_PROCEDURE_ALARMS; |
3339 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT")] |
3340 | + public const string NO_TASK_ASSIGNMENT; |
3341 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_THISANDFUTURE")] |
3342 | + public const string NO_THISANDFUTURE; |
3343 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_THISANDPRIOR")] |
3344 | + public const string NO_THISANDPRIOR; |
3345 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_NO_TRANSPARENCY")] |
3346 | + public const string NO_TRANSPARENCY; |
3347 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_ONE_ALARM_ONLY")] |
3348 | + public const string ONE_ALARM_ONLY; |
3349 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ACCEPT")] |
3350 | + public const string ORGANIZER_MUST_ACCEPT; |
3351 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ATTEND")] |
3352 | + public const string ORGANIZER_MUST_ATTEND; |
3353 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_ORGANIZER_NOT_EMAIL_ADDRESS")] |
3354 | + public const string ORGANIZER_NOT_EMAIL_ADDRESS; |
3355 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER")] |
3356 | + public const string RECURRENCES_NO_MASTER; |
3357 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_REFRESH_SUPPORTED")] |
3358 | + public const string REFRESH_SUPPORTED; |
3359 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_REMOVE_ALARMS")] |
3360 | + public const string REMOVE_ALARMS; |
3361 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_REMOVE_ONLY_THIS")] |
3362 | + public const string REMOVE_ONLY_THIS; |
3363 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_REQ_SEND_OPTIONS")] |
3364 | + public const string REQ_SEND_OPTIONS; |
3365 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "CAL_STATIC_CAPABILITY_SAVE_SCHEDULES")] |
3366 | + public const string SAVE_SCHEDULES; |
3367 | + } |
3368 | + [CCode (cheader_filename = "libecal/libecal.h", cprefix = "", has_type_id = false)] |
3369 | + public enum DataCalMode { |
3370 | + Local, |
3371 | + Remote, |
3372 | + AnyMode |
3373 | + } |
3374 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3375 | + public delegate bool CalRecurInstanceFn (E.CalComponent comp, ulong instance_start, ulong instance_end); |
3376 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3377 | + public delegate iCal.TimeZone CalRecurResolveTimezoneFn (string tzid); |
3378 | + [CCode (cheader_filename = "libecal/libecal.h")] |
3379 | + public delegate iCal.TimeZone TzLookup (string tzid, E.CalClient ecalclient, GLib.Cancellable? cancellable = null) throws GLib.Error; |
3380 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "cal_obj_uid_list_free")] |
3381 | + public static void cal_obj_uid_list_free (GLib.List list); |
3382 | + public static string cal_system_timezone_get_location (); |
3383 | + namespace Util { |
3384 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "icaltimetype_to_tm")] |
3385 | + public static Posix.tm icaltimetype_to_tm (iCal.TimeType itt); |
3386 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "icaltimetype_to_tm_with_zone")] |
3387 | + public static Posix.tm icaltimetype_to_tm_with_zone (iCal.TimeType itt, iCal.TimeZone from_zone, iCal.TimeZone to_zone); |
3388 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "isodate_from_time_t")] |
3389 | + public static unowned string isodate_from_time_t (time_t t); |
3390 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_add_day")] |
3391 | + public static time_t time_add_day (time_t time, int days); |
3392 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_add_day_with_zone")] |
3393 | + public static time_t time_add_day_with_zone (time_t time, int days, iCal.TimeZone zone); |
3394 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_add_month_with_zone")] |
3395 | + public static time_t time_add_month_with_zone (time_t time, int months, iCal.TimeZone zone); |
3396 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_add_week")] |
3397 | + public static time_t time_add_week (time_t time, int weeks); |
3398 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_add_week_with_zone")] |
3399 | + public static time_t time_add_week_with_zone (time_t time, int weeks, iCal.TimeZone zone); |
3400 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_day_begin")] |
3401 | + public static time_t time_day_begin (time_t t); |
3402 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_day_begin_with_zone")] |
3403 | + public static time_t time_day_begin_with_zone (time_t time, iCal.TimeZone zone); |
3404 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_day_end")] |
3405 | + public static time_t time_day_end (time_t t); |
3406 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_day_end_with_zone")] |
3407 | + public static time_t time_day_end_with_zone (time_t time, iCal.TimeZone zone); |
3408 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_day_of_week")] |
3409 | + public static int time_day_of_week (int day, int month, int year); |
3410 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_day_of_year")] |
3411 | + public static int time_day_of_year (int day, int month, int year); |
3412 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_days_in_month")] |
3413 | + public static int time_days_in_month (int year, int month); |
3414 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_from_isodate")] |
3415 | + public static time_t time_from_isodate (string str); |
3416 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_is_leap_year")] |
3417 | + public static bool time_is_leap_year (int year); |
3418 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_leap_years_up_to")] |
3419 | + public static int time_leap_years_up_to (int year); |
3420 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_month_begin_with_zone")] |
3421 | + public static time_t time_month_begin_with_zone (time_t time, iCal.TimeZone zone); |
3422 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_to_gdate_with_zone")] |
3423 | + public static void time_to_gdate_with_zone (GLib.Date date, time_t time, iCal.TimeZone zone); |
3424 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_week_begin_with_zone")] |
3425 | + public static time_t time_week_begin_with_zone (time_t time, int week_start_day, iCal.TimeZone zone); |
3426 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "time_year_begin_with_zone")] |
3427 | + public static time_t time_year_begin_with_zone (time_t time, iCal.TimeZone zone); |
3428 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "tm_to_icaltimetype")] |
3429 | + public static iCal.TimeType tm_to_icaltimetype (Posix.tm time, bool is_date); |
3430 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "e_cal_util_get_system_timezone_location")] |
3431 | + public static string get_system_timezone_location (); |
3432 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "e_cal_util_priority_from_string")] |
3433 | + public static int priority_from_string (string string); |
3434 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "e_cal_util_priority_to_string")] |
3435 | + public static unowned string priority_to_string (int priority); |
3436 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "e_cal_util_new_component")] |
3437 | + public static iCal.Component new_component (iCal.ComponentKind kind); |
3438 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "e_cal_util_parse_ics_string")] |
3439 | + public static iCal.Component parse_ics_string (string string); |
3440 | + [CCode (cheader_filename = "libecal/libecal.h", cname = "e_cal_util_parse_ics_file")] |
3441 | + public static iCal.Component parse_ics_file (string filename); |
3442 | + public static bool cal_client_check_timezones (iCal.Component comp, GLib.List<iCal.Component> comps, TzLookup tzlookup, E.CalClient ecalclient, GLib.Cancellable? cancellable = null) throws GLib.Error; |
3443 | + } |
3444 | +} |
3445 | |
3446 | === added file 'vapi/libedataserver-1.2.metadata' |
3447 | --- vapi/libedataserver-1.2.metadata 1970-01-01 00:00:00 +0000 |
3448 | +++ vapi/libedataserver-1.2.metadata 2016-02-03 23:24:26 +0000 |
3449 | @@ -0,0 +1,176 @@ |
3450 | +#--- general fixes ---# |
3451 | + |
3452 | +E cprefix="E" lower_case_cprefix="e_" gir_version="1.2" gir_namespace="EDataServer" |
3453 | +e_sexp_error cname="get_error" # see patch_gi() |
3454 | + |
3455 | +EList.iterators hidden="1" # private |
3456 | +EList.list hidden="1" # private |
3457 | +EList.copy hidden="1" # private |
3458 | +EList.free hidden="1" # private |
3459 | +EList.closure hidden="1" # private |
3460 | +EListIterator.iterator hidden="1" # private |
3461 | + |
3462 | +#--- things to match the official vapi ---# |
3463 | + |
3464 | +EAccount cheader_filename="libedataserver/e-account.h" type_id="e_account_get_type ()" |
3465 | + |
3466 | +EAccountList cheader_filename="libedataserver/e-account-list.h" |
3467 | + |
3468 | +EAccountIdentity is_value_type="1" cheader_filename="libedataserver/e-account.h" |
3469 | + |
3470 | +EAccountReceiptPolicy cheader_filename="libedataserver/e-account.h" |
3471 | + |
3472 | +EAccountService is_value_type="1" cheader_filename="libedataserver/e-account.h" |
3473 | + |
3474 | +e_account_access_t cheader_filename="libedataserver/e-account.h" |
3475 | +e_account_find_t cheader_filename="libedataserver/e-account.h" |
3476 | +e_account_item_t cheader_filename="libedataserver/e-account.h" |
3477 | +e_account_list_new hidden="1" |
3478 | +e_account_list_construct hidden="1" |
3479 | + |
3480 | +e_categories* cheader_filename="libedataserver/e-categories.h" |
3481 | + |
3482 | +EClient abstract="1" cheader_filename="libedataserver/e-client.h" type_id="e_client_get_type ()" |
3483 | +e_client_error_create transfer_ownership="1" |
3484 | + |
3485 | +e_client_get_backend_property async="1" |
3486 | +e_client_get_backend_property.cancellable nullable="1" |
3487 | +e_client_get_backend_property_finish |
3488 | +e_client_get_backend_property_finish.prop_value is_out="1" value_owned="1" |
3489 | + |
3490 | +e_client_get_backend_property_sync.prop_value is_out="1" value_owned="1" |
3491 | +e_client_get_backend_property_sync.cancellable nullable="1" |
3492 | +e_client_get_capabilities type_arguments="string" |
3493 | +e_client_open async="1" |
3494 | +e_client_open.cancellable nullable="1" |
3495 | +e_client_open_sync.cancellable nullable="1" |
3496 | +e_client_refresh async="1" |
3497 | +e_client_refresh.cancellable nullable="1" |
3498 | +e_client_refresh_sync.cancellable nullable="1" |
3499 | +e_client_remove async="1" |
3500 | +e_client_remove.cancellable nullable="1" |
3501 | +e_client_remove_sync.cancellable nullable="1" |
3502 | +e_client_retrieve_capabilities async="1" |
3503 | +e_client_retrieve_capabilities.cancellable nullable="1" |
3504 | +e_client_retrieve_capabilities_finish.capabilities is_out="1" value_owned="1" |
3505 | +e_client_retrieve_capabilities_sync.capabilities is_out="1" value_owned="1" |
3506 | +e_client_retrieve_capabilities_sync.cancellable nullable="1" |
3507 | +e_client_set_backend_property async="1" |
3508 | +e_client_set_backend_property.cancellable nullable="1" |
3509 | +e_client_set_backend_property_sync.cancellable nullable="1" |
3510 | +e_client_util_unwrap_dbus_error errordomain="1" |
3511 | + |
3512 | +CLIENT_BACKEND* cheader_filename="libedataserver/e-client.h" |
3513 | + |
3514 | +EClientError cheader_filename="libedataserver/e-client.h" |
3515 | +EClientErrorsList is_value_type="1" cheader_filename="libedataserver/e-client.h" |
3516 | + |
3517 | +ECredentials is_value_type="1" free_function="e_credentials_free" cheader_filename="libedataserver/e-credentials.h" |
3518 | +ECredentials.priv hidden="1" type="bool" |
3519 | +e_credentials_get transfer_ownership="1" |
3520 | +e_credentials_util_prompt_flags_to_string transfer_ownership="1" |
3521 | +ECredentialsPromptFlags cheader_filename="libedataserver/e-credentials.h" |
3522 | + |
3523 | +E_CREDENTIALS_KEY* cheader_filename="libedataserver/e-credentials.h" |
3524 | + |
3525 | +e_data_server_util* cheader_filename="libedataserver/e-data-server-utils.h" |
3526 | + |
3527 | +E_DEBUG_LOG* cheader_filename="libedataserver/e-debug-log.h" |
3528 | + |
3529 | +EDS_* cheader_filename="libedataserver/eds-version.h" |
3530 | + |
3531 | +EFlag cheader_filename="libedataserver/e-flag.h" |
3532 | + |
3533 | +e_debug_log* cheader_filename="libedataserver/e-debug-log.h" |
3534 | + |
3535 | +e_filename_make_safe cheader_filename="libedataserver/e-data-server-util.h" |
3536 | + |
3537 | +e_get_user* cheader_filename="libedataserver/e-data-server-util.h" |
3538 | + |
3539 | +eds_check_version cheader_filename="libedataserver/eds-version.h" |
3540 | + |
3541 | +EIterator type_id="e_iterator_get_type ()" cheader_filename="libedataserver/e-iterator.h" |
3542 | +EIterator::invalidate has_emitter="1" |
3543 | + |
3544 | +EList* cheader_filename="libedataserver/e-list.h" type_id="e_list_get_type ()" |
3545 | +e_list_new hidden="1" |
3546 | +e_list_construct hidden="1" |
3547 | +e_list_duplicate transfer_ownership="1" |
3548 | + |
3549 | +e_localtime_with_offset cheader_filename="libedataserver/e-time-utils.h" |
3550 | +e_mktime_utc cheader_filename="libedataserver/e-time-utils.h" |
3551 | + |
3552 | +EListIterator type_id="e_list_iterator_get_type ()" cheader_filename="libedataserver/e-list-iterator.h" |
3553 | + |
3554 | +EMemChunk cheader_filename="libedataserver/e-memory.h" |
3555 | + |
3556 | +EOperationPool cheader_filename="libedataserver/e-operation-pool.h" |
3557 | + |
3558 | +e_pointer_tracker* cheader_filename="libedataserver/e-data-server-util.h" |
3559 | +e_*strftime cheader_filename="libedataserver/e-data-server-util.h" |
3560 | + |
3561 | +EProxy type_id="e_proxy_get_type ()" cheader_filename="libedataserver/e-proxy.h" |
3562 | + |
3563 | +ESExp* cheader_filename="libedataserver/e-sexp.h" |
3564 | +ESExp.term_chunks type_name="E.MemChunk" |
3565 | +ESExp.result_chunks type_name="E.MemChunk" |
3566 | +E_TYPE_SEXP cheader_filename="libedataserver/e-sexp.h" |
3567 | + |
3568 | +ESource type_id="e_source_get_type ()" cheader_filename="libedataserver/e-source.h" |
3569 | +e_source_build_absolute_uri transfer_ownership="1" |
3570 | +e_source_copy transfer_ownership="1" |
3571 | +e_source_get_duped_property transfer_ownership="1" |
3572 | +e_source_get_uri transfer_ownership="1" |
3573 | +e_source_set_property.property_value nullable="1" |
3574 | +e_source_to_standalone_xml transfer_ownership="1" |
3575 | +e_source_get_property transfer_ownership="1" |
3576 | +e_source_uid_from_xml_node transfer_ownership="1" |
3577 | + |
3578 | +ESourceGroup type_id="e_source_group_get_type ()" cheader_filename="libedataserver/e-source-group.h" |
3579 | +ESourceGroup::source_added.source type_name="E.Source" |
3580 | +ESourceGroup::source_removed.source type_name="E.Source" |
3581 | + |
3582 | +e_source_group_get_property transfer_ownership="1" |
3583 | +e_source_group_peek_sources type_arguments="E.Source" |
3584 | +e_source_group_to_xml transfer_ownership="1" |
3585 | +e_source_group_uid_from_xmldoc transfer_ownership="1" |
3586 | + |
3587 | +ESourceList type_id="e_source_list_get_type ()" cheader_filename="libedataserver/e-source-list.h" |
3588 | +e_source_list_ensure_group transfer_ownership="1" |
3589 | +e_source_list_peek_default_source nullable="1" |
3590 | +e_source_list_peek_groups type_arguments="E.SourceGroup" |
3591 | + |
3592 | +e_time_format* cheader_filename="libedataserver/e-time-utils.h" |
3593 | +e_time_get_d_fmt_with_4digit_year cheader_filename="libedataserver/e-time-utils.h" transfer_ownership="1" |
3594 | +e_time_parse_date* cheader_filename="libedataserver/e-time-utils.h" |
3595 | +e_time_parse_time cheader_filename="libedataserver/e-time-utils.h" |
3596 | + |
3597 | +ETimeParse* cheader_filename="libedataserver/e-time-utils.h" |
3598 | + |
3599 | +EUri is_value_type="1" cheader_filename="libedataserver/e-url.h" |
3600 | +EUri.params type_name="GLib.Datalist" |
3601 | +e_uri_to_string transfer_ownership="1" |
3602 | + |
3603 | +e_uid_new transfer_ownership="1" cheader_filename="libedataserver/e-uid.h" |
3604 | + |
3605 | +e_url_equal cheader_filename="libedataserver/e-url.h" |
3606 | +e_url_shroud transfer_ownership="1" cheader_filename="libedataserver/e-url.h" |
3607 | + |
3608 | +e_util_strstrcase transfer_ownership="1" cheader_filename="libedataserver/e-data-server-util.h" |
3609 | +e_util_unicode_get_utf8 transfer_ownership="1" cheader_filename="libedataserver/e-data-server-util.h" |
3610 | +e_util_utf8_make_valid transfer_ownership="1" cheader_filename="libedataserver/e-data-server-util.h" |
3611 | +e_util_utf8_remove_accents transfer_ownership="1" cheader_filename="libedataserver/e-data-server-util.h" |
3612 | +e_util_ensure_gdbus_string cheader_filename="libedataserver/e-data-server-util.h" |
3613 | +e_util_gthread_id cheader_filename="libedataserver/e-data-server-util.h" |
3614 | +e_util_utf8_strcasecmp cheader_filename="libedataserver/e-data-server-util.h" |
3615 | +e_util_utf8_strstrcase cheader_filename="libedataserver/e-data-server-util.h" |
3616 | +e_util_utf8_strstrcasedecomp cheader_filename="libedataserver/e-data-server-util.h" |
3617 | + |
3618 | +EXmlHash* cheader_filename="libedataserver/e-xml-hash-utils.h" |
3619 | +e_xml_to_hash transfer_ownership="1" cheader_filename="libedataserver/e-xml-hash-utils.h" |
3620 | +e_xml_destroy_hash cheader_filename="libedataserver/e-xml-hash-utils.h" |
3621 | +e_xml_from_hash cheader_filename="libedataserver/e-xml-hash-utils.h" |
3622 | + |
3623 | +e_xml_get_child_by_name cheader_filename="libedataserver/e-xml-utils.h" |
3624 | +e_xml_parse_file cheader_filename="libedataserver/e-xml-utils.h" |
3625 | +e_xml_save_file cheader_filename="libedataserver/e-xml-utils.h" |
3626 | |
3627 | === added file 'vapi/libedataserver-1.2.vapi' |
3628 | --- vapi/libedataserver-1.2.vapi 1970-01-01 00:00:00 +0000 |
3629 | +++ vapi/libedataserver-1.2.vapi 2016-02-03 23:24:26 +0000 |
3630 | @@ -0,0 +1,1010 @@ |
3631 | +/* edataserver-1.2.vapi generated by vapigen, do not modify. */ |
3632 | + |
3633 | +[CCode (cprefix = "E", gir_namespace = "EDataServer", gir_version = "1.2", lower_case_cprefix = "e_")] |
3634 | +namespace E { |
3635 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
3636 | + [Compact] |
3637 | + public class AsyncClosure { |
3638 | + public static void callback (GLib.Object object, GLib.AsyncResult result, void* closure); |
3639 | + public void free (); |
3640 | + public unowned GLib.AsyncResult wait (); |
3641 | + } |
3642 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_client_get_type ()")] |
3643 | + public abstract class Client : GLib.Object { |
3644 | + [CCode (has_construct_function = false)] |
3645 | + protected Client (); |
3646 | + [Deprecated (since = "3.8")] |
3647 | + public void cancel_all (); |
3648 | + public bool check_capability (string capability); |
3649 | + public bool check_refresh_supported (); |
3650 | + [Deprecated (since = "3.8")] |
3651 | + public static GLib.Error error_create (E.ClientError code, string custom_msg); |
3652 | + public static GLib.Quark error_quark (); |
3653 | + public static unowned string error_to_string (E.ClientError code); |
3654 | + public virtual async bool get_backend_property (string prop_name, GLib.Cancellable? cancellable, out string prop_value) throws GLib.Error; |
3655 | + public virtual bool get_backend_property_sync (string prop_name, out string prop_value, GLib.Cancellable? cancellable = null) throws GLib.Error; |
3656 | + public unowned GLib.SList<string> get_capabilities (); |
3657 | + public unowned E.Source get_source (); |
3658 | + public bool is_online (); |
3659 | + [Deprecated (since = "3.8")] |
3660 | + public bool is_opened (); |
3661 | + public bool is_readonly (); |
3662 | + [Deprecated (since = "3.8")] |
3663 | + public virtual async bool open (bool only_if_exists, GLib.Cancellable? cancellable) throws GLib.Error; |
3664 | + [Deprecated (since = "3.8")] |
3665 | + public virtual bool open_sync (bool only_if_exists, GLib.Cancellable? cancellable = null) throws GLib.Error; |
3666 | + public GLib.MainContext ref_main_context (); |
3667 | + public virtual async bool refresh (GLib.Cancellable? cancellable) throws GLib.Error; |
3668 | + public virtual bool refresh_sync (GLib.Cancellable? cancellable = null) throws GLib.Error; |
3669 | + [Deprecated (since = "3.6")] |
3670 | + public virtual async bool remove (GLib.Cancellable? cancellable) throws GLib.Error; |
3671 | + [Deprecated (since = "3.6")] |
3672 | + public virtual bool remove_sync (GLib.Cancellable? cancellable = null) throws GLib.Error; |
3673 | + [Deprecated (since = "3.8")] |
3674 | + public virtual async bool retrieve_capabilities (GLib.Cancellable? cancellable, out string capabilities) throws GLib.Error; |
3675 | + [Deprecated (since = "3.8")] |
3676 | + public virtual bool retrieve_capabilities_sync (out string capabilities, GLib.Cancellable? cancellable = null) throws GLib.Error; |
3677 | + [Deprecated (since = "3.8")] |
3678 | + public virtual async bool set_backend_property (string prop_name, string prop_value, GLib.Cancellable? cancellable) throws GLib.Error; |
3679 | + [Deprecated (since = "3.8")] |
3680 | + public virtual bool set_backend_property_sync (string prop_name, string prop_value, GLib.Cancellable? cancellable = null) throws GLib.Error; |
3681 | + [Deprecated (since = "3.8")] |
3682 | + public virtual void unwrap_dbus_error (GLib.Error dbus_error) throws GLib.Error; |
3683 | + [Deprecated (since = "3.8")] |
3684 | + public static GLib.SList<GLib.Object> util_copy_object_slist (GLib.SList<GLib.Object>? copy_to, GLib.SList<GLib.Object> objects); |
3685 | + [Deprecated (since = "3.8")] |
3686 | + public static GLib.SList<string> util_copy_string_slist (GLib.SList<string>? copy_to, GLib.SList<string> strings); |
3687 | + [Deprecated (since = "3.8")] |
3688 | + public static void util_free_object_slist (GLib.SList<GLib.Object> objects); |
3689 | + [Deprecated (since = "3.8")] |
3690 | + public static void util_free_string_slist (GLib.SList<string> strings); |
3691 | + public static GLib.SList<string> util_parse_comma_strings (string strings); |
3692 | + [CCode (array_length = false, array_null_terminated = true)] |
3693 | + [Deprecated (since = "3.8")] |
3694 | + public static string[] util_slist_to_strv (GLib.SList<string> strings); |
3695 | + [Deprecated (since = "3.8")] |
3696 | + public static GLib.SList<string> util_strv_to_slist (string strv); |
3697 | + [Deprecated (since = "3.8")] |
3698 | + public static bool util_unwrap_dbus_error (GLib.Error dbus_error, out GLib.Error client_error, E.ClientErrorsList known_errors, uint known_errors_count, GLib.Quark known_errors_domain, bool fail_when_none_matched); |
3699 | + public void* capabilities { get; } |
3700 | + [NoAccessorMethod] |
3701 | + public GLib.MainContext main_context { owned get; } |
3702 | + [NoAccessorMethod] |
3703 | + public bool online { get; set; } |
3704 | + [NoAccessorMethod] |
3705 | + public virtual bool opened { get; } |
3706 | + [NoAccessorMethod] |
3707 | + public bool readonly { get; } |
3708 | + public E.Source source { get; construct; } |
3709 | + public virtual signal void backend_died (); |
3710 | + public virtual signal void backend_error (string error_msg); |
3711 | + public virtual signal void backend_property_changed (string prop_name, string prop_value); |
3712 | + } |
3713 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
3714 | + [Compact] |
3715 | + public class Flag { |
3716 | + public void clear (); |
3717 | + public void free (); |
3718 | + public bool is_set (); |
3719 | + public void @set (); |
3720 | + [Deprecated (since = "3.8")] |
3721 | + public bool timed_wait (GLib.TimeVal abs_time); |
3722 | + public void wait (); |
3723 | + public bool wait_until (int64 end_time); |
3724 | + } |
3725 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
3726 | + [Compact] |
3727 | + public class MemChunk { |
3728 | + } |
3729 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "e_named_parameters_get_type ()")] |
3730 | + [Compact] |
3731 | + public class NamedParameters { |
3732 | + [CCode (has_construct_function = false)] |
3733 | + public NamedParameters (); |
3734 | + public void assign (E.NamedParameters? from); |
3735 | + public void clear (); |
3736 | + public void free (); |
3737 | + public unowned string @get (string name); |
3738 | + public void @set (string name, string? value); |
3739 | + [CCode (has_construct_function = false)] |
3740 | + public NamedParameters.strv (string strv); |
3741 | + public bool test (string name, string value, bool case_sensitively); |
3742 | + [CCode (array_length = false, array_null_terminated = true)] |
3743 | + public string[] to_strv (); |
3744 | + } |
3745 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
3746 | + [Compact] |
3747 | + public class OperationPool { |
3748 | + public void free (); |
3749 | + public void push (void* opdata); |
3750 | + public void release_opid (uint32 opid); |
3751 | + public uint32 reserve_opid (); |
3752 | + } |
3753 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_proxy_get_type ()")] |
3754 | + public class Proxy : GLib.Object { |
3755 | + [CCode (has_construct_function = false)] |
3756 | + public Proxy (); |
3757 | + public bool require_proxy_for_uri (string uri); |
3758 | + public void setup_proxy (); |
3759 | + public virtual signal void changed (); |
3760 | + } |
3761 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_get_type ()")] |
3762 | + public class Source : GLib.Object, GLib.Initable { |
3763 | + [CCode (has_construct_function = false)] |
3764 | + public Source (GLib.DBusObject? dbus_object, GLib.MainContext? main_context) throws GLib.Error; |
3765 | + public int compare_by_display_name (E.Source source2); |
3766 | + public string dup_display_name (); |
3767 | + public string dup_parent (); |
3768 | + public string dup_uid (); |
3769 | + public bool equal (E.Source source2); |
3770 | + public unowned string get_display_name (); |
3771 | + public bool get_enabled (); |
3772 | + public unowned E.SourceExtension get_extension (string extension_name); |
3773 | + public virtual async bool get_oauth2_access_token (GLib.Cancellable? cancellable, out string? access_token, out int? expires_in) throws GLib.Error; |
3774 | + public virtual bool get_oauth2_access_token_sync (GLib.Cancellable? cancellable, out string? access_token, out int? expires_in) throws GLib.Error; |
3775 | + public unowned string get_parent (); |
3776 | + public bool get_remote_creatable (); |
3777 | + public bool get_remote_deletable (); |
3778 | + public bool get_removable (); |
3779 | + public unowned string get_uid (); |
3780 | + public bool get_writable (); |
3781 | + public bool has_extension (string extension_name); |
3782 | + public uint hash (); |
3783 | + public async bool mail_signature_load (int io_priority, GLib.Cancellable? cancellable) throws GLib.Error; |
3784 | + public bool mail_signature_load_sync (string contents, size_t? length, GLib.Cancellable? cancellable = null) throws GLib.Error; |
3785 | + public async bool mail_signature_replace (string contents, size_t length, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error; |
3786 | + public bool mail_signature_replace_sync (string contents, size_t length, GLib.Cancellable? cancellable = null) throws GLib.Error; |
3787 | + public async bool mail_signature_symlink (string symlink_target, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error; |
3788 | + public bool mail_signature_symlink_sync (string symlink_target, GLib.Cancellable? cancellable = null) throws GLib.Error; |
3789 | + public static string parameter_to_key (string param_name); |
3790 | + public GLib.DBusObject ref_dbus_object (); |
3791 | + public GLib.MainContext ref_main_context (); |
3792 | + public uint refresh_add_timeout (GLib.MainContext? context, owned E.SourceRefreshFunc callback); |
3793 | + public void refresh_force_timeout (); |
3794 | + public bool refresh_remove_timeout (uint refresh_timeout_id); |
3795 | + public uint refresh_remove_timeouts_by_data (void* user_data); |
3796 | + public virtual async bool remote_create (E.Source scratch_source, GLib.Cancellable? cancellable) throws GLib.Error; |
3797 | + public virtual bool remote_create_sync (E.Source scratch_source, GLib.Cancellable? cancellable = null) throws GLib.Error; |
3798 | + public virtual async bool remote_delete (GLib.Cancellable? cancellable) throws GLib.Error; |
3799 | + public virtual bool remote_delete_sync (GLib.Cancellable? cancellable = null) throws GLib.Error; |
3800 | + public virtual async bool remove (GLib.Cancellable? cancellable) throws GLib.Error; |
3801 | + public virtual bool remove_sync (GLib.Cancellable? cancellable = null) throws GLib.Error; |
3802 | + public void set_display_name (string display_name); |
3803 | + public void set_enabled (bool enabled); |
3804 | + public void set_parent (string? parent); |
3805 | + public string to_string (size_t? length); |
3806 | + [CCode (has_construct_function = false)] |
3807 | + public Source.with_uid (string uid, GLib.MainContext? main_context) throws GLib.Error; |
3808 | + public virtual async bool write (GLib.Cancellable? cancellable) throws GLib.Error; |
3809 | + public virtual bool write_sync (GLib.Cancellable? cancellable = null) throws GLib.Error; |
3810 | + public string display_name { get; set construct; } |
3811 | + public bool enabled { get; set construct; } |
3812 | + [NoAccessorMethod] |
3813 | + public GLib.MainContext main_context { owned get; construct; } |
3814 | + public string parent { get; set; } |
3815 | + public bool remote_creatable { get; } |
3816 | + public bool remote_deletable { get; } |
3817 | + public bool removable { get; } |
3818 | + public string uid { get; construct; } |
3819 | + public bool writable { get; } |
3820 | + [HasEmitter] |
3821 | + public virtual signal void changed (); |
3822 | + } |
3823 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_address_book_get_type ()")] |
3824 | + public class SourceAddressBook : E.SourceBackend { |
3825 | + [CCode (has_construct_function = false)] |
3826 | + protected SourceAddressBook (); |
3827 | + } |
3828 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_alarms_get_type ()")] |
3829 | + public class SourceAlarms : E.SourceExtension { |
3830 | + [CCode (has_construct_function = false)] |
3831 | + protected SourceAlarms (); |
3832 | + public string dup_last_notified (); |
3833 | + public bool get_include_me (); |
3834 | + public unowned string get_last_notified (); |
3835 | + public void set_include_me (bool include_me); |
3836 | + public void set_last_notified (string? last_notified); |
3837 | + public bool include_me { get; set construct; } |
3838 | + public string last_notified { get; set construct; } |
3839 | + } |
3840 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_authentication_get_type ()")] |
3841 | + public class SourceAuthentication : E.SourceExtension { |
3842 | + [CCode (has_construct_function = false)] |
3843 | + protected SourceAuthentication (); |
3844 | + public string dup_host (); |
3845 | + public string dup_method (); |
3846 | + public string dup_user (); |
3847 | + public unowned string get_host (); |
3848 | + public unowned string get_method (); |
3849 | + public uint16 get_port (); |
3850 | + public bool get_remember_password (); |
3851 | + public unowned string get_user (); |
3852 | + public GLib.SocketConnectable ref_connectable (); |
3853 | + public bool required (); |
3854 | + public void set_host (string? host); |
3855 | + public void set_method (string? method); |
3856 | + public void set_port (uint16 port); |
3857 | + public void set_remember_password (bool remember_password); |
3858 | + public void set_user (string? user); |
3859 | + [NoAccessorMethod] |
3860 | + public GLib.SocketConnectable connectable { owned get; } |
3861 | + public string host { get; set construct; } |
3862 | + public string method { get; set construct; } |
3863 | + public uint port { get; set construct; } |
3864 | + public bool remember_password { get; set construct; } |
3865 | + public string user { get; set construct; } |
3866 | + } |
3867 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_autocomplete_get_type ()")] |
3868 | + public class SourceAutocomplete : E.SourceExtension { |
3869 | + [CCode (has_construct_function = false)] |
3870 | + protected SourceAutocomplete (); |
3871 | + public bool get_include_me (); |
3872 | + public void set_include_me (bool include_me); |
3873 | + public bool include_me { get; set construct; } |
3874 | + } |
3875 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_backend_get_type ()")] |
3876 | + public abstract class SourceBackend : E.SourceExtension { |
3877 | + [CCode (has_construct_function = false)] |
3878 | + protected SourceBackend (); |
3879 | + public string dup_backend_name (); |
3880 | + public unowned string get_backend_name (); |
3881 | + public void set_backend_name (string? backend_name); |
3882 | + public string backend_name { get; set construct; } |
3883 | + } |
3884 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_calendar_get_type ()")] |
3885 | + public class SourceCalendar : E.SourceSelectable { |
3886 | + [CCode (has_construct_function = false)] |
3887 | + protected SourceCalendar (); |
3888 | + } |
3889 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_camel_get_type ()")] |
3890 | + public abstract class SourceCamel : E.SourceExtension { |
3891 | + [CCode (has_construct_function = false)] |
3892 | + protected SourceCamel (); |
3893 | + public static GLib.Type generate_subtype (string protocol, GLib.Type settings_type); |
3894 | + public static unowned string get_extension_name (string protocol); |
3895 | + public static unowned string get_type_name (string protocol); |
3896 | + public static void register_types (); |
3897 | + } |
3898 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_collection_get_type ()")] |
3899 | + public class SourceCollection : E.SourceBackend { |
3900 | + [CCode (has_construct_function = false)] |
3901 | + protected SourceCollection (); |
3902 | + public string dup_identity (); |
3903 | + public bool get_calendar_enabled (); |
3904 | + public bool get_contacts_enabled (); |
3905 | + public unowned string get_identity (); |
3906 | + public bool get_mail_enabled (); |
3907 | + public void set_calendar_enabled (bool calendar_enabled); |
3908 | + public void set_contacts_enabled (bool contacts_enabled); |
3909 | + public void set_identity (string? identity); |
3910 | + public void set_mail_enabled (bool mail_enabled); |
3911 | + public bool calendar_enabled { get; set construct; } |
3912 | + public bool contacts_enabled { get; set construct; } |
3913 | + public string identity { get; set construct; } |
3914 | + public bool mail_enabled { get; set construct; } |
3915 | + } |
3916 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_extension_get_type ()")] |
3917 | + public abstract class SourceExtension : GLib.Object { |
3918 | + [CCode (has_construct_function = false)] |
3919 | + protected SourceExtension (); |
3920 | + [Deprecated (since = "3.8")] |
3921 | + public unowned E.Source get_source (); |
3922 | + public E.Source source { get; construct; } |
3923 | + } |
3924 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_goa_get_type ()")] |
3925 | + public class SourceGoa : E.SourceExtension { |
3926 | + [CCode (has_construct_function = false)] |
3927 | + protected SourceGoa (); |
3928 | + public string dup_account_id (); |
3929 | + public string dup_calendar_url (); |
3930 | + public string dup_contacts_url (); |
3931 | + public unowned string get_account_id (); |
3932 | + public unowned string get_calendar_url (); |
3933 | + public unowned string get_contacts_url (); |
3934 | + public void set_account_id (string? account_id); |
3935 | + public void set_calendar_url (string? calendar_url); |
3936 | + public void set_contacts_url (string? contacts_url); |
3937 | + public string account_id { get; set construct; } |
3938 | + public string calendar_url { get; set construct; } |
3939 | + public string contacts_url { get; set construct; } |
3940 | + } |
3941 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_mdn_get_type ()")] |
3942 | + public class SourceMDN : E.SourceExtension { |
3943 | + [CCode (has_construct_function = false)] |
3944 | + protected SourceMDN (); |
3945 | + public E.MdnResponsePolicy get_response_policy (); |
3946 | + public void set_response_policy (E.MdnResponsePolicy response_policy); |
3947 | + public E.MdnResponsePolicy response_policy { get; set construct; } |
3948 | + } |
3949 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_mail_account_get_type ()")] |
3950 | + public class SourceMailAccount : E.SourceBackend { |
3951 | + [CCode (has_construct_function = false)] |
3952 | + protected SourceMailAccount (); |
3953 | + public string dup_identity_uid (); |
3954 | + public unowned string get_identity_uid (); |
3955 | + public void set_identity_uid (string? identity_uid); |
3956 | + public string identity_uid { get; set construct; } |
3957 | + } |
3958 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_mail_composition_get_type ()")] |
3959 | + public class SourceMailComposition : E.SourceExtension { |
3960 | + [CCode (has_construct_function = false)] |
3961 | + protected SourceMailComposition (); |
3962 | + [CCode (array_length = false, array_null_terminated = true)] |
3963 | + public string[] dup_bcc (); |
3964 | + [CCode (array_length = false, array_null_terminated = true)] |
3965 | + public string[] dup_cc (); |
3966 | + public string dup_drafts_folder (); |
3967 | + public string dup_templates_folder (); |
3968 | + [CCode (array_length = false, array_null_terminated = true)] |
3969 | + public unowned string[] get_bcc (); |
3970 | + [CCode (array_length = false, array_null_terminated = true)] |
3971 | + public unowned string[] get_cc (); |
3972 | + public unowned string get_drafts_folder (); |
3973 | + public bool get_sign_imip (); |
3974 | + public unowned string get_templates_folder (); |
3975 | + public void set_bcc (string? bcc); |
3976 | + public void set_cc (string? cc); |
3977 | + public void set_drafts_folder (string? drafts_folder); |
3978 | + public void set_sign_imip (bool sign_imip); |
3979 | + public void set_templates_folder (string? templates_folder); |
3980 | + [CCode (array_length = false, array_null_terminated = true)] |
3981 | + public string[] bcc { get; set construct; } |
3982 | + [CCode (array_length = false, array_null_terminated = true)] |
3983 | + public string[] cc { get; set construct; } |
3984 | + public string drafts_folder { get; set construct; } |
3985 | + public bool sign_imip { get; set construct; } |
3986 | + public string templates_folder { get; set construct; } |
3987 | + } |
3988 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_mail_identity_get_type ()")] |
3989 | + public class SourceMailIdentity : E.SourceExtension { |
3990 | + [CCode (has_construct_function = false)] |
3991 | + protected SourceMailIdentity (); |
3992 | + public string dup_address (); |
3993 | + public string dup_name (); |
3994 | + public string dup_organization (); |
3995 | + public string dup_reply_to (); |
3996 | + public string dup_signature_uid (); |
3997 | + public unowned string get_address (); |
3998 | + public unowned string get_name (); |
3999 | + public unowned string get_organization (); |
4000 | + public unowned string get_reply_to (); |
4001 | + public unowned string get_signature_uid (); |
4002 | + public void set_address (string? address); |
4003 | + public void set_name (string? name); |
4004 | + public void set_organization (string? organization); |
4005 | + public void set_reply_to (string? reply_to); |
4006 | + public void set_signature_uid (string? signature_uid); |
4007 | + public string address { get; set construct; } |
4008 | + public string name { get; set construct; } |
4009 | + public string organization { get; set construct; } |
4010 | + public string reply_to { get; set construct; } |
4011 | + public string signature_uid { get; set construct; } |
4012 | + } |
4013 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_mail_signature_get_type ()")] |
4014 | + public class SourceMailSignature : E.SourceExtension { |
4015 | + [CCode (has_construct_function = false)] |
4016 | + protected SourceMailSignature (); |
4017 | + public string dup_mime_type (); |
4018 | + public unowned GLib.File get_file (); |
4019 | + public unowned string get_mime_type (); |
4020 | + public void set_mime_type (string? mime_type); |
4021 | + public GLib.File file { get; } |
4022 | + public string mime_type { get; set construct; } |
4023 | + } |
4024 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_mail_submission_get_type ()")] |
4025 | + public class SourceMailSubmission : E.SourceExtension { |
4026 | + [CCode (has_construct_function = false)] |
4027 | + protected SourceMailSubmission (); |
4028 | + public string dup_sent_folder (); |
4029 | + public string dup_transport_uid (); |
4030 | + public bool get_replies_to_origin_folder (); |
4031 | + public unowned string get_sent_folder (); |
4032 | + public unowned string get_transport_uid (); |
4033 | + public void set_replies_to_origin_folder (bool replies_to_origin_folder); |
4034 | + public void set_sent_folder (string? sent_folder); |
4035 | + public void set_transport_uid (string? transport_uid); |
4036 | + public bool replies_to_origin_folder { get; set construct; } |
4037 | + public string sent_folder { get; set construct; } |
4038 | + public string transport_uid { get; set construct; } |
4039 | + } |
4040 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_mail_transport_get_type ()")] |
4041 | + public class SourceMailTransport : E.SourceBackend { |
4042 | + [CCode (has_construct_function = false)] |
4043 | + protected SourceMailTransport (); |
4044 | + } |
4045 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_memo_list_get_type ()")] |
4046 | + public class SourceMemoList : E.SourceSelectable { |
4047 | + [CCode (has_construct_function = false)] |
4048 | + protected SourceMemoList (); |
4049 | + } |
4050 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_offline_get_type ()")] |
4051 | + public class SourceOffline : E.SourceExtension { |
4052 | + [CCode (has_construct_function = false)] |
4053 | + protected SourceOffline (); |
4054 | + public bool get_stay_synchronized (); |
4055 | + public void set_stay_synchronized (bool stay_synchronized); |
4056 | + public bool stay_synchronized { get; set construct; } |
4057 | + } |
4058 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", lower_case_csuffix = "source_openpgp", type_id = "e_source_openpgp_get_type ()")] |
4059 | + public class SourceOpenPGP : E.SourceExtension { |
4060 | + [CCode (has_construct_function = false)] |
4061 | + protected SourceOpenPGP (); |
4062 | + public string dup_key_id (); |
4063 | + public string dup_signing_algorithm (); |
4064 | + public bool get_always_trust (); |
4065 | + public bool get_encrypt_to_self (); |
4066 | + public unowned string get_key_id (); |
4067 | + public bool get_sign_by_default (); |
4068 | + public unowned string get_signing_algorithm (); |
4069 | + public void set_always_trust (bool always_trust); |
4070 | + public void set_encrypt_to_self (bool encrypt_to_self); |
4071 | + public void set_key_id (string key_id); |
4072 | + public void set_sign_by_default (bool sign_by_default); |
4073 | + public void set_signing_algorithm (string signing_algorithm); |
4074 | + public bool always_trust { get; set construct; } |
4075 | + public bool encrypt_to_self { get; set construct; } |
4076 | + public string key_id { get; set construct; } |
4077 | + public bool sign_by_default { get; set construct; } |
4078 | + public string signing_algorithm { get; set construct; } |
4079 | + } |
4080 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_refresh_get_type ()")] |
4081 | + public class SourceRefresh : E.SourceExtension { |
4082 | + [CCode (has_construct_function = false)] |
4083 | + protected SourceRefresh (); |
4084 | + public bool get_enabled (); |
4085 | + public uint get_interval_minutes (); |
4086 | + public void set_enabled (bool enabled); |
4087 | + public void set_interval_minutes (uint interval_minutes); |
4088 | + public bool enabled { get; set construct; } |
4089 | + public uint interval_minutes { get; set construct; } |
4090 | + } |
4091 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_registry_get_type ()")] |
4092 | + public class SourceRegistry : GLib.Object, GLib.AsyncInitable, GLib.Initable { |
4093 | + [CCode (cname = "e_source_registry_new", has_construct_function = false)] |
4094 | + public async SourceRegistry (GLib.Cancellable? cancellable) throws GLib.Error; |
4095 | + public async bool authenticate (E.Source source, E.SourceAuthenticator auth, GLib.Cancellable? cancellable) throws GLib.Error; |
4096 | + public bool authenticate_sync (E.Source source, E.SourceAuthenticator auth, GLib.Cancellable? cancellable = null) throws GLib.Error; |
4097 | + public bool check_enabled (E.Source source); |
4098 | + public async bool commit_source (E.Source source, GLib.Cancellable? cancellable) throws GLib.Error; |
4099 | + public bool commit_source_sync (E.Source source, GLib.Cancellable? cancellable = null) throws GLib.Error; |
4100 | + public async bool create_sources (GLib.List<E.Source> list_of_sources, GLib.Cancellable? cancellable) throws GLib.Error; |
4101 | + public bool create_sources_sync (GLib.List<E.Source> list_of_sources, GLib.Cancellable? cancellable = null) throws GLib.Error; |
4102 | + public void debug_dump (string? extension_name); |
4103 | + public string dup_unique_display_name (E.Source source, string? extension_name); |
4104 | + public E.Source find_extension (E.Source source, string extension_name); |
4105 | + public static void free_display_tree (GLib.Node display_tree); |
4106 | + public GLib.List<E.Source> list_sources (string? extension_name); |
4107 | + public E.Source ref_builtin_address_book (); |
4108 | + public E.Source ref_builtin_calendar (); |
4109 | + public E.Source ref_builtin_mail_account (); |
4110 | + public E.Source ref_builtin_memo_list (); |
4111 | + public E.Source ref_builtin_task_list (); |
4112 | + public E.Source ref_default_address_book (); |
4113 | + public E.Source ref_default_calendar (); |
4114 | + public E.Source ref_default_for_extension_name (string extension_name); |
4115 | + public E.Source ref_default_mail_account (); |
4116 | + public E.Source ref_default_mail_identity (); |
4117 | + public E.Source ref_default_memo_list (); |
4118 | + public E.Source ref_default_task_list (); |
4119 | + public E.Source ref_source (string uid); |
4120 | + public void set_default_address_book (E.Source? default_source); |
4121 | + public void set_default_calendar (E.Source? default_source); |
4122 | + public void set_default_for_extension_name (string extension_name, E.Source? default_source); |
4123 | + public void set_default_mail_account (E.Source? default_source); |
4124 | + public void set_default_mail_identity (E.Source? default_source); |
4125 | + public void set_default_memo_list (E.Source? default_source); |
4126 | + public void set_default_task_list (E.Source? default_source); |
4127 | + [CCode (has_construct_function = false)] |
4128 | + public SourceRegistry.sync (GLib.Cancellable? cancellable = null) throws GLib.Error; |
4129 | + [NoAccessorMethod] |
4130 | + public E.Source default_address_book { owned get; set; } |
4131 | + [NoAccessorMethod] |
4132 | + public E.Source default_calendar { owned get; set; } |
4133 | + [NoAccessorMethod] |
4134 | + public E.Source default_mail_account { owned get; set; } |
4135 | + [NoAccessorMethod] |
4136 | + public E.Source default_mail_identity { owned get; set; } |
4137 | + [NoAccessorMethod] |
4138 | + public E.Source default_memo_list { owned get; set; } |
4139 | + [NoAccessorMethod] |
4140 | + public E.Source default_task_list { owned get; set; } |
4141 | + public virtual signal void source_added (E.Source source); |
4142 | + public virtual signal void source_changed (E.Source source); |
4143 | + public virtual signal void source_disabled (E.Source source); |
4144 | + public virtual signal void source_enabled (E.Source source); |
4145 | + public virtual signal void source_removed (E.Source source); |
4146 | + } |
4147 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_resource_get_type ()")] |
4148 | + public class SourceResource : E.SourceExtension { |
4149 | + [CCode (has_construct_function = false)] |
4150 | + protected SourceResource (); |
4151 | + public string dup_identity (); |
4152 | + public unowned string get_identity (); |
4153 | + public void set_identity (string? identity); |
4154 | + public string identity { get; set construct; } |
4155 | + } |
4156 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_revision_guards_get_type ()")] |
4157 | + public class SourceRevisionGuards : E.SourceExtension { |
4158 | + [CCode (has_construct_function = false)] |
4159 | + protected SourceRevisionGuards (); |
4160 | + public bool get_enabled (); |
4161 | + public void set_enabled (bool enabled); |
4162 | + public bool enabled { get; set construct; } |
4163 | + } |
4164 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_smime_get_type ()")] |
4165 | + public class SourceSMIME : E.SourceExtension { |
4166 | + [CCode (has_construct_function = false)] |
4167 | + protected SourceSMIME (); |
4168 | + public string dup_encryption_certificate (); |
4169 | + public string dup_signing_algorithm (); |
4170 | + public string dup_signing_certificate (); |
4171 | + public bool get_encrypt_by_default (); |
4172 | + public bool get_encrypt_to_self (); |
4173 | + public unowned string get_encryption_certificate (); |
4174 | + public bool get_sign_by_default (); |
4175 | + public unowned string get_signing_algorithm (); |
4176 | + public unowned string get_signing_certificate (); |
4177 | + public void set_encrypt_by_default (bool encrypt_by_default); |
4178 | + public void set_encrypt_to_self (bool encrypt_to_self); |
4179 | + public void set_encryption_certificate (string? encryption_certificate); |
4180 | + public void set_sign_by_default (bool sign_by_default); |
4181 | + public void set_signing_algorithm (string? signing_algorithm); |
4182 | + public void set_signing_certificate (string? signing_certificate); |
4183 | + public bool encrypt_by_default { get; set construct; } |
4184 | + public bool encrypt_to_self { get; set construct; } |
4185 | + public string encryption_certificate { get; set construct; } |
4186 | + public bool sign_by_default { get; set construct; } |
4187 | + public string signing_algorithm { get; set construct; } |
4188 | + public string signing_certificate { get; set construct; } |
4189 | + } |
4190 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_security_get_type ()")] |
4191 | + public class SourceSecurity : E.SourceExtension { |
4192 | + [CCode (has_construct_function = false)] |
4193 | + protected SourceSecurity (); |
4194 | + public string dup_method (); |
4195 | + public unowned string get_method (); |
4196 | + public bool get_secure (); |
4197 | + public void set_method (string? method); |
4198 | + public void set_secure (bool secure); |
4199 | + public string method { get; set construct; } |
4200 | + public bool secure { get; set; } |
4201 | + } |
4202 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_selectable_get_type ()")] |
4203 | + public abstract class SourceSelectable : E.SourceBackend { |
4204 | + [CCode (has_construct_function = false)] |
4205 | + protected SourceSelectable (); |
4206 | + public string dup_color (); |
4207 | + public unowned string get_color (); |
4208 | + public bool get_selected (); |
4209 | + public void set_color (string? color); |
4210 | + public void set_selected (bool selected); |
4211 | + public string color { get; set construct; } |
4212 | + public bool selected { get; set construct; } |
4213 | + } |
4214 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_task_list_get_type ()")] |
4215 | + public class SourceTaskList : E.SourceSelectable { |
4216 | + [CCode (has_construct_function = false)] |
4217 | + protected SourceTaskList (); |
4218 | + } |
4219 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_uoa_get_type ()")] |
4220 | + public class SourceUoa : E.SourceExtension { |
4221 | + [CCode (has_construct_function = false)] |
4222 | + protected SourceUoa (); |
4223 | + public uint get_account_id (); |
4224 | + public void set_account_id (uint account_id); |
4225 | + public uint account_id { get; set construct; } |
4226 | + } |
4227 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_id = "e_source_webdav_get_type ()")] |
4228 | + public class SourceWebdav : E.SourceExtension { |
4229 | + [CCode (has_construct_function = false)] |
4230 | + protected SourceWebdav (); |
4231 | + public string dup_display_name (); |
4232 | + public string dup_email_address (); |
4233 | + public string dup_resource_path (); |
4234 | + public string dup_resource_query (); |
4235 | + public string dup_ssl_trust (); |
4236 | + public Soup.URI dup_soup_uri (); |
4237 | + public bool get_avoid_ifmatch (); |
4238 | + public bool get_calendar_auto_schedule (); |
4239 | + public unowned string get_display_name (); |
4240 | + public unowned string get_email_address (); |
4241 | + [Deprecated (since = "3.8")] |
4242 | + public bool get_ignore_invalid_cert (); |
4243 | + public unowned string get_resource_path (); |
4244 | + public unowned string get_resource_query (); |
4245 | + public unowned string get_ssl_trust (); |
4246 | + public void set_avoid_ifmatch (bool avoid_ifmatch); |
4247 | + public void set_calendar_auto_schedule (bool calendar_auto_schedule); |
4248 | + public void set_display_name (string? display_name); |
4249 | + public void set_email_address (string? email_address); |
4250 | + [Deprecated (since = "3.8")] |
4251 | + public void set_ignore_invalid_cert (bool ignore_invalid_cert); |
4252 | + public void set_resource_path (string? resource_path); |
4253 | + public void set_resource_query (string? resource_query); |
4254 | + public void set_ssl_trust (string? ssl_trust); |
4255 | + public void set_soup_uri (Soup.URI? soup_uri); |
4256 | + public void unset_temporary_ssl_trust (); |
4257 | + public bool avoid_ifmatch { get; set construct; } |
4258 | + public bool calendar_auto_schedule { get; set construct; } |
4259 | + public string display_name { get; set construct; } |
4260 | + public string email_address { get; set construct; } |
4261 | + public bool ignore_invalid_cert { get; set construct; } |
4262 | + public string resource_path { get; set construct; } |
4263 | + public string resource_query { get; set construct; } |
4264 | + public string ssl_trust { get; set construct; } |
4265 | + public Soup.URI soup_uri { get; set construct; } |
4266 | + } |
4267 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4268 | + [Compact] |
4269 | + public class XmlHash { |
4270 | + } |
4271 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", type_cname = "ESourceAuthenticatorInterface", type_id = "e_source_authenticator_get_type ()")] |
4272 | + public interface SourceAuthenticator : GLib.Object { |
4273 | + public abstract void get_prompt_strings (E.Source source, out string prompt_title, out string prompt_message, out string prompt_description); |
4274 | + public abstract async E.SourceAuthenticationResult try_password (GLib.StringBuilder password, GLib.Cancellable? cancellable) throws GLib.Error; |
4275 | + public abstract E.SourceAuthenticationResult try_password_sync (GLib.StringBuilder password, GLib.Cancellable? cancellable = null) throws GLib.Error; |
4276 | + } |
4277 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", has_type_id = false)] |
4278 | + public struct CancellableMutex { |
4279 | + public void* @base; |
4280 | + public weak GLib.Mutex mutex; |
4281 | + public void clear (); |
4282 | + public void init (); |
4283 | + public bool @lock (GLib.Cancellable? cancellable = null); |
4284 | + public void unlock (); |
4285 | + } |
4286 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", has_type_id = false)] |
4287 | + public struct CancellableRecMutex { |
4288 | + public void* @base; |
4289 | + public GLib.RecMutex rec_mutex; |
4290 | + public void clear (); |
4291 | + public void init (); |
4292 | + public bool @lock (GLib.Cancellable? cancellable = null); |
4293 | + public void unlock (); |
4294 | + } |
4295 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", has_type_id = false)] |
4296 | + [Deprecated (since = "3.8")] |
4297 | + public struct ClientErrorsList { |
4298 | + public weak string name; |
4299 | + public int err_code; |
4300 | + } |
4301 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "_ECancellableLocksBase", has_type_id = false)] |
4302 | + public struct _CancellableLocksBase { |
4303 | + public weak GLib.Mutex cond_mutex; |
4304 | + public weak GLib.Cond cond; |
4305 | + } |
4306 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cprefix = "E_CLIENT_ERROR_", has_type_id = false)] |
4307 | + public enum ClientError { |
4308 | + INVALID_ARG, |
4309 | + BUSY, |
4310 | + SOURCE_NOT_LOADED, |
4311 | + SOURCE_ALREADY_LOADED, |
4312 | + AUTHENTICATION_FAILED, |
4313 | + AUTHENTICATION_REQUIRED, |
4314 | + REPOSITORY_OFFLINE, |
4315 | + OFFLINE_UNAVAILABLE, |
4316 | + PERMISSION_DENIED, |
4317 | + CANCELLED, |
4318 | + COULD_NOT_CANCEL, |
4319 | + NOT_SUPPORTED, |
4320 | + TLS_NOT_AVAILABLE, |
4321 | + UNSUPPORTED_AUTHENTICATION_METHOD, |
4322 | + SEARCH_SIZE_LIMIT_EXCEEDED, |
4323 | + SEARCH_TIME_LIMIT_EXCEEDED, |
4324 | + INVALID_QUERY, |
4325 | + QUERY_REFUSED, |
4326 | + DBUS_ERROR, |
4327 | + OTHER_ERROR, |
4328 | + NOT_OPENED, |
4329 | + OUT_OF_SYNC |
4330 | + } |
4331 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cprefix = "E_MDN_RESPONSE_POLICY_", type_id = "e_mdn_response_policy_get_type ()")] |
4332 | + public enum MdnResponsePolicy { |
4333 | + NEVER, |
4334 | + ALWAYS, |
4335 | + ASK |
4336 | + } |
4337 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cprefix = "E_SOURCE_AUTHENTICATION_", type_id = "e_source_authentication_result_get_type ()")] |
4338 | + public enum SourceAuthenticationResult { |
4339 | + ERROR, |
4340 | + ACCEPTED, |
4341 | + REJECTED |
4342 | + } |
4343 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cprefix = "E_TIME_PARSE_", has_type_id = false)] |
4344 | + public enum TimeParseStatus { |
4345 | + OK, |
4346 | + NONE, |
4347 | + INVALID |
4348 | + } |
4349 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cprefix = "E_TRUST_PROMPT_RESPONSE_", type_id = "e_trust_prompt_response_get_type ()")] |
4350 | + public enum TrustPromptResponse { |
4351 | + UNKNOWN, |
4352 | + REJECT, |
4353 | + ACCEPT, |
4354 | + ACCEPT_TEMPORARILY, |
4355 | + REJECT_TEMPORARILY |
4356 | + } |
4357 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cprefix = "E_XMLHASH_STATUS_", has_type_id = false)] |
4358 | + public enum XmlHashStatus { |
4359 | + SAME, |
4360 | + DIFFERENT, |
4361 | + NOT_FOUND |
4362 | + } |
4363 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cprefix = "E_XML_HASH_TYPE_", has_type_id = false)] |
4364 | + public enum XmlHashType { |
4365 | + OBJECT_UID, |
4366 | + PROPERTY |
4367 | + } |
4368 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", instance_pos = 1.9)] |
4369 | + public delegate void SourceRefreshFunc (E.Source source); |
4370 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", instance_pos = 2.9)] |
4371 | + public delegate void XmlHashFunc (string key, string value); |
4372 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", instance_pos = 2.9)] |
4373 | + public delegate bool XmlHashRemoveFunc (string key, string value); |
4374 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_CREDENTIALS_KEY_AUTH_METHOD")] |
4375 | + public const string CREDENTIALS_KEY_AUTH_METHOD; |
4376 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_CREDENTIALS_KEY_FOREIGN_REQUEST")] |
4377 | + public const string CREDENTIALS_KEY_FOREIGN_REQUEST; |
4378 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_CREDENTIALS_KEY_PASSWORD")] |
4379 | + public const string CREDENTIALS_KEY_PASSWORD; |
4380 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_CREDENTIALS_KEY_PROMPT_FLAGS")] |
4381 | + public const string CREDENTIALS_KEY_PROMPT_FLAGS; |
4382 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_CREDENTIALS_KEY_PROMPT_KEY")] |
4383 | + public const string CREDENTIALS_KEY_PROMPT_KEY; |
4384 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_CREDENTIALS_KEY_PROMPT_REASON")] |
4385 | + public const string CREDENTIALS_KEY_PROMPT_REASON; |
4386 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_CREDENTIALS_KEY_PROMPT_TEXT")] |
4387 | + public const string CREDENTIALS_KEY_PROMPT_TEXT; |
4388 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_CREDENTIALS_KEY_PROMPT_TITLE")] |
4389 | + public const string CREDENTIALS_KEY_PROMPT_TITLE; |
4390 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_CREDENTIALS_KEY_USERNAME")] |
4391 | + public const string CREDENTIALS_KEY_USERNAME; |
4392 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_DEBUG_LOG_DOMAIN_CAL_QUERIES")] |
4393 | + public const string DEBUG_LOG_DOMAIN_CAL_QUERIES; |
4394 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_DEBUG_LOG_DOMAIN_GLOG")] |
4395 | + public const string DEBUG_LOG_DOMAIN_GLOG; |
4396 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_DEBUG_LOG_DOMAIN_USER")] |
4397 | + public const string DEBUG_LOG_DOMAIN_USER; |
4398 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_ADDRESS_BOOK")] |
4399 | + public const string SOURCE_EXTENSION_ADDRESS_BOOK; |
4400 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_ALARMS")] |
4401 | + public const string SOURCE_EXTENSION_ALARMS; |
4402 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_AUTHENTICATION")] |
4403 | + public const string SOURCE_EXTENSION_AUTHENTICATION; |
4404 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_AUTOCOMPLETE")] |
4405 | + public const string SOURCE_EXTENSION_AUTOCOMPLETE; |
4406 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_CALENDAR")] |
4407 | + public const string SOURCE_EXTENSION_CALENDAR; |
4408 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_COLLECTION")] |
4409 | + public const string SOURCE_EXTENSION_COLLECTION; |
4410 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_GOA")] |
4411 | + public const string SOURCE_EXTENSION_GOA; |
4412 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_MAIL_ACCOUNT")] |
4413 | + public const string SOURCE_EXTENSION_MAIL_ACCOUNT; |
4414 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_MAIL_COMPOSITION")] |
4415 | + public const string SOURCE_EXTENSION_MAIL_COMPOSITION; |
4416 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_MAIL_IDENTITY")] |
4417 | + public const string SOURCE_EXTENSION_MAIL_IDENTITY; |
4418 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_MAIL_SIGNATURE")] |
4419 | + public const string SOURCE_EXTENSION_MAIL_SIGNATURE; |
4420 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_MAIL_SUBMISSION")] |
4421 | + public const string SOURCE_EXTENSION_MAIL_SUBMISSION; |
4422 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_MAIL_TRANSPORT")] |
4423 | + public const string SOURCE_EXTENSION_MAIL_TRANSPORT; |
4424 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_MDN")] |
4425 | + public const string SOURCE_EXTENSION_MDN; |
4426 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_MEMO_LIST")] |
4427 | + public const string SOURCE_EXTENSION_MEMO_LIST; |
4428 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_OFFLINE")] |
4429 | + public const string SOURCE_EXTENSION_OFFLINE; |
4430 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_OPENPGP")] |
4431 | + public const string SOURCE_EXTENSION_OPENPGP; |
4432 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_REFRESH")] |
4433 | + public const string SOURCE_EXTENSION_REFRESH; |
4434 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_RESOURCE")] |
4435 | + public const string SOURCE_EXTENSION_RESOURCE; |
4436 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_REVISION_GUARDS")] |
4437 | + public const string SOURCE_EXTENSION_REVISION_GUARDS; |
4438 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_SECURITY")] |
4439 | + public const string SOURCE_EXTENSION_SECURITY; |
4440 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_SMIME")] |
4441 | + public const string SOURCE_EXTENSION_SMIME; |
4442 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_TASK_LIST")] |
4443 | + public const string SOURCE_EXTENSION_TASK_LIST; |
4444 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_UOA")] |
4445 | + public const string SOURCE_EXTENSION_UOA; |
4446 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_EXTENSION_WEBDAV_BACKEND")] |
4447 | + public const string SOURCE_EXTENSION_WEBDAV_BACKEND; |
4448 | + [CCode (cheader_filename = "libedataserver/libedataserver.h", cname = "E_SOURCE_PARAM_SETTING")] |
4449 | + public const int SOURCE_PARAM_SETTING; |
4450 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4451 | + public static bool binding_transform_enum_nick_to_value (GLib.Binding binding, GLib.Value source_value, GLib.Value target_value, void* not_used); |
4452 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4453 | + public static bool binding_transform_enum_value_to_nick (GLib.Binding binding, GLib.Value source_value, GLib.Value target_value, void* not_used); |
4454 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4455 | + public static void categories_add (string category, string unused, string icon_file, bool searchable); |
4456 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4457 | + public static bool categories_exist (string category); |
4458 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4459 | + public static unowned string categories_get_icon_file_for (string category); |
4460 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4461 | + public static GLib.List<weak string> categories_get_list (); |
4462 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4463 | + public static bool categories_is_searchable (string category); |
4464 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4465 | + public static void categories_register_change_listener (GLib.Callback listener); |
4466 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4467 | + public static void categories_remove (string category); |
4468 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4469 | + public static void categories_set_icon_file_for (string category, string icon_file); |
4470 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4471 | + public static void categories_unregister_change_listener (GLib.Callback listener); |
4472 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4473 | + [Deprecated (since = "3.8")] |
4474 | + public static int data_server_util_get_dbus_call_timeout (); |
4475 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4476 | + [Deprecated (since = "3.8")] |
4477 | + public static void data_server_util_set_dbus_call_timeout (int timeout_msec); |
4478 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4479 | + public static void debug_log_clear (); |
4480 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4481 | + public static void debug_log_disable_domains (string domains, int n_domains); |
4482 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4483 | + public static bool debug_log_dump (string filename) throws GLib.Error; |
4484 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4485 | + public static bool debug_log_dump_to_dated_file () throws GLib.Error; |
4486 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4487 | + public static void debug_log_enable_domains (string domains, int n_domains); |
4488 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4489 | + public static int debug_log_get_max_lines (); |
4490 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4491 | + public static bool debug_log_is_domain_enabled (string domain); |
4492 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4493 | + public static bool debug_log_load_configuration (string filename) throws GLib.Error; |
4494 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4495 | + public static void debug_log_set_max_lines (int num_lines); |
4496 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4497 | + public static bool enum_from_string (GLib.Type enum_type, string string, int enum_value); |
4498 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4499 | + public static unowned string enum_to_string (GLib.Type enum_type, int enum_value); |
4500 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4501 | + public static async bool file_recursive_delete (GLib.File file, int io_priority, GLib.Cancellable? cancellable) throws GLib.Error; |
4502 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4503 | + public static bool file_recursive_delete_sync (GLib.File file, GLib.Cancellable? cancellable = null) throws GLib.Error; |
4504 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4505 | + public static void filename_make_safe (string string); |
4506 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4507 | + public static string filename_mkdir_encoded (string basepath, string fileprefix, string filename, int fileindex); |
4508 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4509 | + public static void gdbus_marshallers_BOOLEAN__OBJECT (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4510 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4511 | + public static void gdbus_marshallers_BOOLEAN__OBJECT_BOOLEAN (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4512 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4513 | + public static void gdbus_marshallers_BOOLEAN__OBJECT_BOXED (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4514 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4515 | + public static void gdbus_marshallers_BOOLEAN__OBJECT_STRING (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4516 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4517 | + public static void gdbus_marshallers_BOOLEAN__OBJECT_UINT (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4518 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4519 | + public static void gdbus_marshallers_BOOLEAN__POINTER (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4520 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4521 | + public static void gdbus_marshallers_VOID__STRING_STRING (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4522 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4523 | + public static void gdbus_marshallers_VOID__UINT_BOXED (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4524 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4525 | + public static void gdbus_marshallers_VOID__UINT_BOXED_BOXED (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4526 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4527 | + public static void gdbus_marshallers_VOID__UINT_BOXED_STRING (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4528 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4529 | + public static void gdbus_marshallers_VOID__UINT_STRING (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4530 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4531 | + public static unowned string get_user_cache_dir (); |
4532 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4533 | + public static unowned string get_user_config_dir (); |
4534 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4535 | + public static unowned string get_user_data_dir (); |
4536 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4537 | + public static void localtime_with_offset (long tt, void* tm, int offset); |
4538 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4539 | + public static void marshal_VOID__INT_STRING_STRING_STRING_STRING_BOOLEAN_POINTER (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4540 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4541 | + public static void marshal_VOID__OBJECT_BOXED (GLib.Closure closure, GLib.Value return_value, uint n_param_values, GLib.Value param_values, void* invocation_hint, void* marshal_data); |
4542 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4543 | + public static void* memchunk_alloc (E.MemChunk memchunk); |
4544 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4545 | + public static void* memchunk_alloc0 (E.MemChunk memchunk); |
4546 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4547 | + public static void memchunk_clean (E.MemChunk memchunk); |
4548 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4549 | + public static void memchunk_destroy (E.MemChunk memchunk); |
4550 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4551 | + public static void memchunk_empty (E.MemChunk memchunk); |
4552 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4553 | + public static void memchunk_free (E.MemChunk memchunk, void* mem); |
4554 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4555 | + public static long mktime_utc (void* tm); |
4556 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4557 | + public static void queue_transfer (GLib.Queue src_queue, GLib.Queue dst_queue); |
4558 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4559 | + public static size_t strftime (string string, size_t max, string fmt, void* tm); |
4560 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4561 | + public static void time_format_date_and_time (void* date_tm, bool use_24_hour_format, bool show_midnight, bool show_zero_seconds, string buffer, int buffer_size); |
4562 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4563 | + public static void time_format_time (void* date_tm, bool use_24_hour_format, bool show_zero_seconds, string buffer, int buffer_size); |
4564 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4565 | + public static string time_get_d_fmt_with_4digit_year (); |
4566 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4567 | + public static E.TimeParseStatus time_parse_date (string value, void* result); |
4568 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4569 | + public static E.TimeParseStatus time_parse_date_and_time (string value, void* result); |
4570 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4571 | + public static E.TimeParseStatus time_parse_date_and_time_ex (string value, void* result, bool two_digit_year); |
4572 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4573 | + public static E.TimeParseStatus time_parse_date_ex (string value, void* result, bool two_digit_year); |
4574 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4575 | + public static E.TimeParseStatus time_parse_time (string value, void* result); |
4576 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4577 | + public static string uid_new (); |
4578 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4579 | + public static size_t utf8_strftime (string string, size_t max, string fmt, void* tm); |
4580 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4581 | + [Deprecated (since = "3.8")] |
4582 | + public static GLib.SList<GLib.Object> util_copy_object_slist (GLib.SList<GLib.Object>? copy_to, GLib.SList<GLib.Object> objects); |
4583 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4584 | + [Deprecated (since = "3.8")] |
4585 | + public static GLib.SList<string> util_copy_string_slist (GLib.SList<string>? copy_to, GLib.SList<string> strings); |
4586 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4587 | + public static unowned string util_ensure_gdbus_string (string str, string gdbus_str); |
4588 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4589 | + public static void util_free_nullable_object_slist (GLib.SList<GLib.Object> objects); |
4590 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4591 | + [Deprecated (since = "3.8")] |
4592 | + public static void util_free_object_slist (GLib.SList<GLib.Object> objects); |
4593 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4594 | + [Deprecated (since = "3.8")] |
4595 | + public static void util_free_string_slist (GLib.SList<string> strings); |
4596 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4597 | + public static uint64 util_gthread_id (GLib.Thread thread); |
4598 | + [CCode (array_length = false, array_null_terminated = true, cheader_filename = "libedataserver/libedataserver.h")] |
4599 | + public static string[] util_slist_to_strv (GLib.SList<string> strings); |
4600 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4601 | + public static string util_strdup_strip (string? string); |
4602 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4603 | + public static string util_strstrcase (string haystack, string needle); |
4604 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4605 | + public static GLib.SList<string> util_strv_to_slist (string strv); |
4606 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4607 | + public static string util_unicode_get_utf8 (string text, unichar @out); |
4608 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4609 | + public static string util_utf8_data_make_valid (string data, size_t data_bytes); |
4610 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4611 | + public static string util_utf8_make_valid (string str); |
4612 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4613 | + public static string util_utf8_normalize (string str); |
4614 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4615 | + public static string util_utf8_remove_accents (string str); |
4616 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4617 | + public static int util_utf8_strcasecmp (string s1, string s2); |
4618 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4619 | + public static unowned string util_utf8_strstrcase (string haystack, string needle); |
4620 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4621 | + public static unowned string util_utf8_strstrcasedecomp (string haystack, string needle); |
4622 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4623 | + public static void xml_destroy_hash (GLib.HashTable<void*,void*> hash); |
4624 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4625 | + public static GLib.HashTable<void*,void*> xml_to_hash (Xml.Doc doc, E.XmlHashType type); |
4626 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4627 | + public static void xmlhash_add (E.XmlHash hash, string key, string data); |
4628 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4629 | + public static E.XmlHashStatus xmlhash_compare (E.XmlHash hash, string key, string compare_data); |
4630 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4631 | + public static void xmlhash_destroy (E.XmlHash hash); |
4632 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4633 | + public static void xmlhash_foreach_key (E.XmlHash hash, E.XmlHashFunc func); |
4634 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4635 | + public static void xmlhash_foreach_key_remove (E.XmlHash hash, E.XmlHashRemoveFunc func); |
4636 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4637 | + public static void xmlhash_remove (E.XmlHash hash, string key); |
4638 | + [CCode (cheader_filename = "libedataserver/libedataserver.h")] |
4639 | + public static void xmlhash_write (E.XmlHash hash); |
4640 | +} |
4641 | \ No newline at end of file |
4642 | |
4643 | === added file 'vapi/libical.metadata' |
4644 | --- vapi/libical.metadata 1970-01-01 00:00:00 +0000 |
4645 | +++ vapi/libical.metadata 2016-02-03 23:24:26 +0000 |
4646 | @@ -0,0 +1,36 @@ |
4647 | +# libical.metadata |
4648 | + |
4649 | +iCal cheader_filename="libical/ical.h" cprefix="" |
4650 | + |
4651 | +# TODO |
4652 | + |
4653 | +#--- classes ---# |
4654 | + |
4655 | +icalattachtype hidden="1" # seems private |
4656 | +icalproperty_add_parameters.prop type_name="icalproperty" |
4657 | +icalproperty_impl hidden="1" # private |
4658 | + |
4659 | +#--- structs ---# |
4660 | + |
4661 | +icaldatetimeperiodtype is_value_type="1" |
4662 | +icalgeotype is_value_type="1" |
4663 | +icalperiodtype is_value_type="1" |
4664 | +icalrecurrencetype is_value_type="1" |
4665 | +icalreqstattype is_value_type="1" |
4666 | +icaltimetype is_value_type="1" simple_type="1" |
4667 | +icaltimezonephase is_value_type="1" |
4668 | +icaltimezonetype is_value_type="1" |
4669 | +icaltriggertype is_value_type="1" |
4670 | +sspm_action_map is_value_type="1" |
4671 | +sspm_header is_value_type="1" |
4672 | +sspm_part is_value_type="1" |
4673 | + |
4674 | +#--- functions ---# |
4675 | + |
4676 | +icalrecur_expand_recurrence.start type_name="time_t" |
4677 | + |
4678 | +icalrecur_expand_recurrence.count hidden="1" |
4679 | +icalrecur_expand_recurrence.array type_name="time_t" is_array="1" array_length_type="int" array_length_pos="2" |
4680 | + |
4681 | +icaltime_from_timet.v type_name="time_t" |
4682 | +icaltime_from_timet_with_zone.tm type_name="time_t" |
4683 | |
4684 | === added file 'vapi/libical.vapi' |
4685 | --- vapi/libical.vapi 1970-01-01 00:00:00 +0000 |
4686 | +++ vapi/libical.vapi 2016-02-03 23:24:26 +0000 |
4687 | @@ -0,0 +1,2964 @@ |
4688 | +/* libical.vapi generated by vapigen, do not modify. */ |
4689 | + |
4690 | +[CCode (cprefix = "")] |
4691 | +namespace iCal { |
4692 | + [CCode (cheader_filename = "libical/ical.h", free_function = "icalarray_free", cname = "icalarray")] |
4693 | + [Compact] |
4694 | + public class Array<G> { |
4695 | + public G data; |
4696 | + public uint element_size; |
4697 | + public uint increment_size; |
4698 | + public uint num_elements; |
4699 | + public uint space_allocated; |
4700 | + [CCode (cname = "icalarray_new", has_construct_function = false)] |
4701 | + public Array (int element_size, int increment_size); |
4702 | + [CCode (cname = "icalarray_append")] |
4703 | + public void append (G element); |
4704 | + [CCode (cname = "icalarray_element_at")] |
4705 | + public G element_at (int position); |
4706 | + [CCode (cname = "icalarray_remove_element_at")] |
4707 | + public void remove_element_at (int position); |
4708 | + [CCode (cname = "icalarray_sort")] |
4709 | + public void sort (GLib.Callback compare); |
4710 | + } |
4711 | + [CCode (cheader_filename = "libical/ical.h", ref_function = "icalattach_ref", ref_function_void = true, unref_function = "icalattach_unref", cname = "icalattach")] |
4712 | + [Compact] |
4713 | + public class Attach { |
4714 | + [CCode (cname = "icalattach_new_from_data", has_construct_function = false)] |
4715 | + public Attach.from_data (uint data, iCal.icalattach_free_fn_t free_fn, void* free_fn_data); |
4716 | + [CCode (cname = "icalattach_new_from_url", has_construct_function = false)] |
4717 | + public Attach.from_url (string url); |
4718 | + [CCode (cname = "icalattach_get_data")] |
4719 | + public uint get_data (); |
4720 | + [CCode (cname = "icalattach_get_is_url")] |
4721 | + public int get_is_url (); |
4722 | + [CCode (cname = "icalattach_get_url")] |
4723 | + public unowned string get_url (); |
4724 | + } |
4725 | + [CCode (cheader_filename = "libical/ical.h", cname = "icalcompiter")] |
4726 | + [Compact] |
4727 | + public class Compiter { |
4728 | + public weak iCal.PvlElement iter; |
4729 | + public iCal.ComponentKind kind; |
4730 | + [CCode (cname = "icalcompiter_deref")] |
4731 | + public unowned iCal.Component deref (); |
4732 | + [CCode (cname = "icalcompiter_next")] |
4733 | + public unowned iCal.Component next (); |
4734 | + [CCode (cname = "icalcompiter_prior")] |
4735 | + public unowned iCal.Component prior (); |
4736 | + } |
4737 | + [CCode (cheader_filename = "libical/ical.h", copy_function = "icalcomponent_new_clone", free_function = "icalcomponent_free", cname = "icalcomponent")] |
4738 | + [Compact] |
4739 | + public class Component { |
4740 | + [CCode (cname = "icalcomponent_new", has_construct_function = false)] |
4741 | + public Component (iCal.ComponentKind kind); |
4742 | + [CCode (cname = "icalcomponent_add_component")] |
4743 | + public void add_component (iCal.Component child); |
4744 | + [CCode (cname = "icalcomponent_add_property")] |
4745 | + public void add_property (iCal.Property property); |
4746 | + [CCode (cname = "icalcomponent_as_ical_string")] |
4747 | + public unowned string as_ical_string (); |
4748 | + [CCode (cname = "icalcomponent_as_ical_string_r")] |
4749 | + public unowned string as_ical_string_r (); |
4750 | + [CCode (cname = "icalcomponent_begin_component")] |
4751 | + public unowned iCal.Compiter begin_component (iCal.ComponentKind kind); |
4752 | + [CCode (cname = "icalcomponent_check_restrictions")] |
4753 | + public int check_restrictions (); |
4754 | + [CCode (cname = "icalcomponent_new_clone", has_construct_function = false)] |
4755 | + public Component.clone (iCal.Component component); |
4756 | + [CCode (cname = "icalcomponent_convert_errors")] |
4757 | + public void convert_errors (); |
4758 | + [CCode (cname = "icalcomponent_count_components")] |
4759 | + public int count_components (iCal.ComponentKind kind); |
4760 | + [CCode (cname = "icalcomponent_count_errors")] |
4761 | + public int count_errors (); |
4762 | + [CCode (cname = "icalcomponent_count_properties")] |
4763 | + public int count_properties (iCal.PropertyKind kind); |
4764 | + [CCode (cname = "icalcomponent_end_component")] |
4765 | + public unowned iCal.Compiter end_component (iCal.ComponentKind kind); |
4766 | + [CCode (cname = "icalcomponent_foreach_recurrence")] |
4767 | + public void foreach_recurrence (iCal.TimeType start, iCal.TimeType end, GLib.Callback callback, void* callback_data); |
4768 | + [CCode (cname = "icalcomponent_foreach_tzid")] |
4769 | + public void foreach_tzid (GLib.Callback callback, void* callback_data); |
4770 | + [CCode (cname = "icalcomponent_new_from_string", has_construct_function = false)] |
4771 | + public Component.from_string (string str); |
4772 | + [CCode (cname = "icalcomponent_get_comment")] |
4773 | + public unowned string get_comment (); |
4774 | + [CCode (cname = "icalcomponent_get_current_component")] |
4775 | + public unowned iCal.Component get_current_component (); |
4776 | + [CCode (cname = "icalcomponent_get_current_property")] |
4777 | + public unowned iCal.Property get_current_property (); |
4778 | + [CCode (cname = "icalcomponent_get_description")] |
4779 | + public unowned string get_description (); |
4780 | + [CCode (cname = "icalcomponent_get_dtend")] |
4781 | + public iCal.TimeType get_dtend (); |
4782 | + [CCode (cname = "icalcomponent_get_dtstamp")] |
4783 | + public iCal.TimeType get_dtstamp (); |
4784 | + [CCode (cname = "icalcomponent_get_dtstart")] |
4785 | + public iCal.TimeType get_dtstart (); |
4786 | + [CCode (cname = "icalcomponent_get_due")] |
4787 | + public iCal.TimeType get_due (); |
4788 | + [CCode (cname = "icalcomponent_get_duration")] |
4789 | + public unowned iCal.DurationType get_duration (); |
4790 | + [CCode (cname = "icalcomponent_get_first_component")] |
4791 | + public unowned iCal.Component get_first_component (iCal.ComponentKind kind); |
4792 | + [CCode (cname = "icalcomponent_get_first_property")] |
4793 | + public unowned iCal.Property get_first_property (iCal.PropertyKind kind); |
4794 | + [CCode (cname = "icalcomponent_get_first_real_component")] |
4795 | + public unowned iCal.Component get_first_real_component (); |
4796 | + [CCode (cname = "icalcomponent_get_inner")] |
4797 | + public unowned iCal.Component get_inner (); |
4798 | + [CCode (cname = "icalcomponent_get_location")] |
4799 | + public unowned string get_location (); |
4800 | + [CCode (cname = "icalcomponent_get_method")] |
4801 | + public iCal.PropertyMethod get_method (); |
4802 | + [CCode (cname = "icalcomponent_get_next_component")] |
4803 | + public unowned iCal.Component get_next_component (iCal.ComponentKind kind); |
4804 | + [CCode (cname = "icalcomponent_get_next_property")] |
4805 | + public unowned iCal.Property get_next_property (iCal.PropertyKind kind); |
4806 | + [CCode (cname = "icalcomponent_get_parent")] |
4807 | + public unowned iCal.Component get_parent (); |
4808 | + [CCode (cname = "icalcomponent_get_recurrenceid")] |
4809 | + public iCal.TimeType get_recurrenceid (); |
4810 | + [CCode (cname = "icalcomponent_get_relcalid")] |
4811 | + public unowned string get_relcalid (); |
4812 | + [CCode (cname = "icalcomponent_get_sequence")] |
4813 | + public int get_sequence (); |
4814 | + [CCode (cname = "icalcomponent_get_span")] |
4815 | + public unowned iCal.TimeSpan get_span (); |
4816 | + [CCode (cname = "icalcomponent_get_status")] |
4817 | + public iCal.PropertyStatus get_status (); |
4818 | + [CCode (cname = "icalcomponent_get_summary")] |
4819 | + public unowned string get_summary (); |
4820 | + [CCode (cname = "icalcomponent_get_timezone")] |
4821 | + public unowned iCal.TimeZone get_timezone (string tzid); |
4822 | + [CCode (cname = "icalcomponent_get_uid")] |
4823 | + public unowned string get_uid (); |
4824 | + [CCode (cname = "icalcomponent_is_valid")] |
4825 | + public int is_valid (); |
4826 | + [CCode (cname = "icalcomponent_isa")] |
4827 | + public iCal.ComponentKind isa (); |
4828 | + [CCode (cname = "icalcomponent_isa_component")] |
4829 | + public static int isa_component (void* component); |
4830 | + [CCode (cname = "icalcomponent_kind_is_valid")] |
4831 | + public static int kind_is_valid (iCal.ComponentKind kind); |
4832 | + [CCode (cname = "icalcomponent_kind_to_string")] |
4833 | + public static unowned string kind_to_string (iCal.ComponentKind kind); |
4834 | + [CCode (cname = "icalcomponent_merge_component")] |
4835 | + public void merge_component (iCal.Component comp_to_merge); |
4836 | + [CCode (cname = "icalcomponent_remove_component")] |
4837 | + public void remove_component (iCal.Component child); |
4838 | + [CCode (cname = "icalcomponent_remove_property")] |
4839 | + public void remove_property (iCal.Property property); |
4840 | + [CCode (cname = "icalcomponent_set_comment")] |
4841 | + public void set_comment (string v); |
4842 | + [CCode (cname = "icalcomponent_set_description")] |
4843 | + public void set_description (string v); |
4844 | + [CCode (cname = "icalcomponent_set_dtend")] |
4845 | + public void set_dtend (iCal.TimeType v); |
4846 | + [CCode (cname = "icalcomponent_set_dtstamp")] |
4847 | + public void set_dtstamp (iCal.TimeType v); |
4848 | + [CCode (cname = "icalcomponent_set_dtstart")] |
4849 | + public void set_dtstart (iCal.TimeType v); |
4850 | + [CCode (cname = "icalcomponent_set_due")] |
4851 | + public void set_due (iCal.TimeType v); |
4852 | + [CCode (cname = "icalcomponent_set_duration")] |
4853 | + public void set_duration (iCal.DurationType v); |
4854 | + [CCode (cname = "icalcomponent_set_location")] |
4855 | + public void set_location (string v); |
4856 | + [CCode (cname = "icalcomponent_set_method")] |
4857 | + public void set_method (iCal.PropertyMethod method); |
4858 | + [CCode (cname = "icalcomponent_set_parent")] |
4859 | + public void set_parent (iCal.Component parent); |
4860 | + [CCode (cname = "icalcomponent_set_recurrenceid")] |
4861 | + public void set_recurrenceid (iCal.TimeType v); |
4862 | + [CCode (cname = "icalcomponent_set_relcalid")] |
4863 | + public void set_relcalid (string v); |
4864 | + [CCode (cname = "icalcomponent_set_sequence")] |
4865 | + public void set_sequence (int v); |
4866 | + [CCode (cname = "icalcomponent_set_status")] |
4867 | + public void set_status (iCal.PropertyStatus v); |
4868 | + [CCode (cname = "icalcomponent_set_summary")] |
4869 | + public void set_summary (string v); |
4870 | + [CCode (cname = "icalcomponent_set_uid")] |
4871 | + public void set_uid (string v); |
4872 | + [CCode (cname = "icalcomponent_string_to_kind")] |
4873 | + public static iCal.ComponentKind string_to_kind (string str); |
4874 | + [CCode (cname = "icalcomponent_strip_errors")] |
4875 | + public void strip_errors (); |
4876 | + [CCode (cname = "icalcomponent_new_vagenda", has_construct_function = false)] |
4877 | + public Component.vagenda (); |
4878 | + [CCode (cname = "icalcomponent_new_valarm", has_construct_function = false)] |
4879 | + public Component.valarm (); |
4880 | + [CCode (cname = "icalcomponent_vanew")] |
4881 | + public static unowned iCal.Component vanew (iCal.ComponentKind kind); |
4882 | + [CCode (cname = "icalcomponent_new_vcalendar", has_construct_function = false)] |
4883 | + public Component.vcalendar (); |
4884 | + [CCode (cname = "icalcomponent_new_vevent", has_construct_function = false)] |
4885 | + public Component.vevent (); |
4886 | + [CCode (cname = "icalcomponent_new_vfreebusy", has_construct_function = false)] |
4887 | + public Component.vfreebusy (); |
4888 | + [CCode (cname = "icalcomponent_new_vjournal", has_construct_function = false)] |
4889 | + public Component.vjournal (); |
4890 | + [CCode (cname = "icalcomponent_new_vquery", has_construct_function = false)] |
4891 | + public Component.vquery (); |
4892 | + [CCode (cname = "icalcomponent_new_vtimezone", has_construct_function = false)] |
4893 | + public Component.vtimezone (); |
4894 | + [CCode (cname = "icalcomponent_new_vtodo", has_construct_function = false)] |
4895 | + public Component.vtodo (); |
4896 | + [CCode (cname = "icalcomponent_new_x", has_construct_function = false)] |
4897 | + public Component.x (string x_name); |
4898 | + [CCode (cname = "icalcomponent_new_xdaylight", has_construct_function = false)] |
4899 | + public Component.xdaylight (); |
4900 | + [CCode (cname = "icalcomponent_new_xstandard", has_construct_function = false)] |
4901 | + public Component.xstandard (); |
4902 | + } |
4903 | + [SimpleType] |
4904 | + [CCode (cheader_filename = "libical/ical.h", cname = "struct icaldurationtype", has_type_id = false)] |
4905 | + public struct DurationType { |
4906 | + public uint days; |
4907 | + public uint hours; |
4908 | + public int is_neg; |
4909 | + public uint minutes; |
4910 | + public uint seconds; |
4911 | + public uint weeks; |
4912 | + [CCode (cname = "icaldurationtype_as_ical_string")] |
4913 | + public unowned string as_ical_string (); |
4914 | + [CCode (cname = "icaldurationtype_as_ical_string_r")] |
4915 | + public unowned string as_ical_string_r (); |
4916 | + [CCode (cname = "icaldurationtype_as_int")] |
4917 | + public int as_int (); |
4918 | + [CCode (cname = "icaldurationtype_bad_duration")] |
4919 | + public static unowned iCal.DurationType bad_duration (); |
4920 | + [CCode (cname = "icaldurationtype_from_int")] |
4921 | + public static unowned iCal.DurationType from_int (int t); |
4922 | + [CCode (cname = "icaldurationtype_from_string")] |
4923 | + public static unowned iCal.DurationType from_string (string p1); |
4924 | + [CCode (cname = "icaldurationtype_is_bad_duration")] |
4925 | + public int is_bad_duration (); |
4926 | + [CCode (cname = "icaldurationtype_is_null_duration")] |
4927 | + public int is_null_duration (); |
4928 | + [CCode (cname = "icaldurationtype_null_duration")] |
4929 | + public static unowned iCal.DurationType null_duration (); |
4930 | + } |
4931 | + [CCode (cheader_filename = "libical/ical.h", copy_function = "icalparameter_new_clone", free_function = "icalparameter_free", cname = "icalparameter")] |
4932 | + [Compact] |
4933 | + public class Parameter { |
4934 | + [CCode (cname = "icalparameter_new", has_construct_function = false)] |
4935 | + public Parameter (iCal.ParameterKind kind); |
4936 | + [CCode (cname = "icalparameter_new_actionparam", has_construct_function = false)] |
4937 | + public Parameter.actionparam (iCal.ParameterAction v); |
4938 | + [CCode (cname = "icalparameter_new_altrep", has_construct_function = false)] |
4939 | + public Parameter.altrep (string v); |
4940 | + [CCode (cname = "icalparameter_as_ical_string")] |
4941 | + public unowned string as_ical_string (); |
4942 | + [CCode (cname = "icalparameter_as_ical_string_r")] |
4943 | + public unowned string as_ical_string_r (); |
4944 | + [CCode (cname = "icalparameter_new_charset", has_construct_function = false)] |
4945 | + public Parameter.charset (string v); |
4946 | + [CCode (cname = "icalparameter_new_clone", has_construct_function = false)] |
4947 | + public Parameter.clone (iCal.Parameter p); |
4948 | + [CCode (cname = "icalparameter_new_cn", has_construct_function = false)] |
4949 | + public Parameter.cn (string v); |
4950 | + [CCode (cname = "icalparameter_new_cutype", has_construct_function = false)] |
4951 | + public Parameter.cutype (iCal.ParameterCutype v); |
4952 | + [CCode (cname = "icalparameter_new_delegatedfrom", has_construct_function = false)] |
4953 | + public Parameter.delegatedfrom (string v); |
4954 | + [CCode (cname = "icalparameter_new_delegatedto", has_construct_function = false)] |
4955 | + public Parameter.delegatedto (string v); |
4956 | + [CCode (cname = "icalparameter_new_dir", has_construct_function = false)] |
4957 | + public Parameter.dir (string v); |
4958 | + [CCode (cname = "icalparameter_new_enable", has_construct_function = false)] |
4959 | + public Parameter.enable (iCal.ParameterEnable v); |
4960 | + [CCode (cname = "icalparameter_new_encoding", has_construct_function = false)] |
4961 | + public Parameter.encoding (iCal.ParameterEncoding v); |
4962 | + [CCode (cname = "icalparameter_enum_to_string")] |
4963 | + public static unowned string enum_to_string (int e); |
4964 | + [CCode (cname = "icalparameter_new_fbtype", has_construct_function = false)] |
4965 | + public Parameter.fbtype (iCal.ParameterFbType v); |
4966 | + [CCode (cname = "icalparameter_new_fmttype", has_construct_function = false)] |
4967 | + public Parameter.fmttype (string v); |
4968 | + [CCode (cname = "icalparameter_new_from_string", has_construct_function = false)] |
4969 | + public Parameter.from_string (string value); |
4970 | + [CCode (cname = "icalparameter_new_from_value_string", has_construct_function = false)] |
4971 | + public Parameter.from_value_string (iCal.ParameterKind kind, string value); |
4972 | + [CCode (cname = "icalparameter_get_actionparam")] |
4973 | + public iCal.ParameterAction get_actionparam (); |
4974 | + [CCode (cname = "icalparameter_get_altrep")] |
4975 | + public unowned string get_altrep (); |
4976 | + [CCode (cname = "icalparameter_get_charset")] |
4977 | + public unowned string get_charset (); |
4978 | + [CCode (cname = "icalparameter_get_cn")] |
4979 | + public unowned string get_cn (); |
4980 | + [CCode (cname = "icalparameter_get_cutype")] |
4981 | + public iCal.ParameterCutype get_cutype (); |
4982 | + [CCode (cname = "icalparameter_get_delegatedfrom")] |
4983 | + public unowned string get_delegatedfrom (); |
4984 | + [CCode (cname = "icalparameter_get_delegatedto")] |
4985 | + public unowned string get_delegatedto (); |
4986 | + [CCode (cname = "icalparameter_get_dir")] |
4987 | + public unowned string get_dir (); |
4988 | + [CCode (cname = "icalparameter_get_enable")] |
4989 | + public iCal.ParameterEnable get_enable (); |
4990 | + [CCode (cname = "icalparameter_get_encoding")] |
4991 | + public iCal.ParameterEncoding get_encoding (); |
4992 | + [CCode (cname = "icalparameter_get_fbtype")] |
4993 | + public iCal.ParameterFbType get_fbtype (); |
4994 | + [CCode (cname = "icalparameter_get_fmttype")] |
4995 | + public unowned string get_fmttype (); |
4996 | + [CCode (cname = "icalparameter_get_id")] |
4997 | + public unowned string get_id (); |
4998 | + [CCode (cname = "icalparameter_get_language")] |
4999 | + public unowned string get_language (); |
5000 | + [CCode (cname = "icalparameter_get_latency")] |
The diff has been truncated for viewing.
* This branch causes wingpanel to delay loading by about 30 seconds
* We should show units (F or C) with temperature