2 * Copyright (C) 2011 Collabora Ltd.
3 * Copyright (C) 2011 Philip Withnall
5 * This library is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 2.1 of the License, or
8 * (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this library. If not, see <http://www.gnu.org/licenses/>.
19 * Raul Gutierrez Segales <raul.gutierrez.segales@collabora.co.uk>
20 * Philip Withnall <philip@tecnocode.co.uk>
26 * Birthday details for a contact.
28 * This allows representation of the birth date and associated calendar event ID
33 public interface Folks.BirthdayDetails : Object
36 * The birthday of the {@link Persona} and {@link Individual}. This
37 * is assumed to be in UTC.
39 * If this is ``null``, the contact's birthday isn't known.
43 public abstract DateTime? birthday { get; set; }
46 * Change the contact's birthday.
48 * It's preferred to call this rather than setting
49 * {@link BirthdayDetails.birthday} directly, as this method gives error
50 * notification and will only return once the birthday has been written to the
51 * relevant backing store (or the operation's failed).
53 * @param birthday the new birthday (or ``null`` to unset the birthday)
54 * @throws PropertyError if setting the birthday failed
57 public virtual async void change_birthday (DateTime? birthday)
60 /* Default implementation. */
61 throw new PropertyError.NOT_WRITEABLE (
62 _("Birthday is not writeable on this contact."));
66 * The event ID of the birthday event from the source calendar.
68 * If this is ``null``, the birthday event is unknown. The semantics of the
69 * event ID are left unspecified by folks.
73 public abstract string? calendar_event_id { get; set; }
76 * Change the contact's birthday event ID.
78 * It's preferred to call this rather than setting
79 * {@link BirthdayDetails.calendar_event_id} directly, as this method gives
80 * error notification and will only return once the event has been written to
81 * the relevant backing store (or the operation's failed).
83 * @param event_id the new birthday event ID (or ``null`` to unset the event
85 * @throws PropertyError if setting the birthday event ID failed
88 public virtual async void change_calendar_event_id (string? event_id)
91 /* Default implementation. */
92 throw new PropertyError.NOT_WRITEABLE (
93 _("Birthday event ID is not writeable on this contact."));