2 * Copyright (C) 2010 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 * Travis Reitter <travis.reitter@collabora.co.uk>
20 * Philip Withnall <philip@tecnocode.co.uk>
26 * Interface for classes which represent aliasable contacts, such as
27 * {@link Persona} and {@link Individual}.
29 public interface Folks.AliasDetails : Object
32 * An alias for the contact.
34 * An alias is a user-given name, to be used in UIs as the sole way to
35 * represent the contact to the user.
37 * This may not be `null`: an empty string represents an unset alias.
39 public abstract string alias { get; set; }
42 * Change the contact's alias.
44 * It's preferred to call this rather than setting {@link AliasDetails.alias}
45 * directly, as this method gives error notification and will only return
46 * once the alias has been written to the relevant backing store (or the
47 * operation's failed).
49 * @param alias the new alias
50 * @throws PropertyError if setting the alias failed
53 public virtual async void change_alias (string alias) throws PropertyError
55 /* Default implementation. */
56 throw new PropertyError.NOT_WRITEABLE (
57 _("Alias is not writeable on this contact."));