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 * This interface contains the birth date of a {@link Persona} and
31 public interface Folks.BirthdayDetails : Object
34 * The birthday of the {@link Persona} and {@link Individual}. This
35 * is assumed to be in UTC.
37 * If this is `null`, the contact's birthday isn't known.
41 public abstract DateTime? birthday { get; set; }
44 * Change the contact's birthday.
46 * It's preferred to call this rather than setting
47 * {@link BirthdayDetails.birthday} directly, as this method gives error
48 * notification and will only return once the birthday has been written to the
49 * relevant backing store (or the operation's failed).
51 * @param birthday the new birthday (or `null` to unset the birthday)
52 * @throws PropertyError if setting the birthday failed
55 public virtual async void change_birthday (DateTime? birthday)
58 /* Default implementation. */
59 throw new PropertyError.NOT_WRITEABLE (
60 _("Birthday is not writeable on this contact."));
64 * The event ID of the birthday event from the source calendar.
66 * If this is `null`, the birthday event is unknown.
70 public abstract string? calendar_event_id { get; set; }
73 * Change the contact's birthday event ID.
75 * It's preferred to call this rather than setting
76 * {@link BirthdayDetails.calendar_event_id} directly, as this method gives
77 * error notification and will only return once the event has been written to
78 * the relevant backing store (or the operation's failed).
80 * @param event_id the new birthday event ID (or `null` to unset the event ID)
81 * @throws PropertyError if setting the birthday event ID failed
84 public virtual async void change_calendar_event_id (string? event_id)
87 /* Default implementation. */
88 throw new PropertyError.NOT_WRITEABLE (
89 _("Birthday event ID is not writeable on this contact."));