Bugs fixed:
* Bug 645056 — TpLowlevel library should have only static public functions
+API changes:
+* Add PersonaStore:always-writeable-properties property
+
Overview of changes from libfolks 0.6.0 to libfolks 0.6.1
=========================================================
private string _query_str;
private bool _groups_supported = false;
+ private const string[] _always_writeable_properties =
+ {
+ "web-service-addresses",
+ "local-ids",
+ "postal-addresses",
+ "phone-numbers",
+ "email-addresses",
+ "notes",
+ "avatar",
+ "structured-name",
+ "full-name",
+ "nickname",
+ "im-addresses",
+ "groups"
+ };
+
/**
* The type of persona store this is.
*
}
/**
+ * {@inheritDoc}
+ *
+ * @since UNRELEASED
+ */
+ public override string[] always_writeable_properties
+ {
+ get { return this._always_writeable_properties; }
+ }
+
+ /**
* The {@link Persona}s exposed by this PersonaStore.
*
* See {@link Folks.PersonaStore.personas}.
private unowned Cancellable _save_key_file_cancellable = null;
private bool _is_prepared = false;
+ private const string[] _always_writeable_properties =
+ {
+ "alias",
+ "im-addresses",
+ "web-service-addresses"
+ };
+
/**
* {@inheritDoc}
*/
/**
* {@inheritDoc}
+ *
+ * @since UNRELEASED
+ */
+ public override string[] always_writeable_properties
+ {
+ get { return this._always_writeable_properties; }
+ }
+
+ /**
+ * {@inheritDoc}
*/
public override Map<string, Persona> personas
{
private ClientService _service;
private ClientContactView _contact_view;
+ /* No writeable properties
+ *
+ * FIXME: we can't mark this as const because Vala gets confused
+ * and generates the wrong C output (char *arr[0] = {}
+ * instead of char **arr = NULL)
+ */
+ private static string[] _always_writeable_properties = {};
+
/**
* The type of persona store this is.
*
}
/**
+ * {@inheritDoc}
+ *
+ * @since UNRELEASED
+ */
+ public override string[] always_writeable_properties
+ {
+ get { return this._always_writeable_properties; }
+ }
+ /**
* The {@link Persona}s exposed by this PersonaStore.
*
* See {@link Folks.PersonaStore.personas}.
ContactFeature.PRESENCE
};
+ private const string[] _always_writeable_properties =
+ {
+ "is-favourite"
+ };
+
private HashMap<string, Persona> _personas;
private Map<string, Persona> _personas_ro;
private HashSet<Persona> _persona_set;
}
/**
+ * {@inheritDoc}
+ *
+ * @since UNRELEASED
+ */
+ public override string[] always_writeable_properties
+ {
+ get { return this._always_writeable_properties; }
+ }
+
+ /**
* The {@link Persona}s exposed by this PersonaStore.
*
* See {@link Folks.PersonaStore.personas}.
"{ ?_contact a nco:PersonContact . %s } " +
"ORDER BY tracker:id(?_contact) ";
+ private const string[] _always_writeable_properties =
+ {
+ "alias",
+ "phone-numbers",
+ "email-addresses",
+ "avatar",
+ "structured-name",
+ "full-name",
+ "gender",
+ "birthday",
+ "roles",
+ "notes",
+ "urls",
+ "im-addresses",
+ "is-favourite",
+ "local-ids",
+ "web-service-addresses"
+ };
/**
* The type of persona store this is.
}
/**
+ * {@inheritDoc}
+ *
+ * @since UNRELEASED
+ */
+ public override string[] always_writeable_properties
+ {
+ get { return this._always_writeable_properties; }
+ }
+
+ /**
* The {@link Persona}s exposed by this PersonaStore.
*
* See {@link Folks.PersonaStore.personas}.
}
/**
+ * The names of the properties of the {@link Persona}s in this store which are
+ * always writeable.
+ *
+ * If a property name is in this list, setting the property on a persona
+ * should result in the updated value being stored in the backend's permanent
+ * storage (unless it gets rejected due to being invalid, or a different error
+ * occurs).
+ *
+ * This property value is guaranteed to be constant for a given persona store,
+ * but may vary between persona stores in the same backend. It's guaranteed
+ * that this will always be a subset of the value of
+ * {@link Persona.writeable_properties} for the personas in this persona
+ * store.
+ *
+ * @since UNRELEASED
+ */
+ public abstract string[] always_writeable_properties { get; }
+
+ /**
* Prepare the PersonaStore for use.
*
* This connects the PersonaStore to whichever backend-specific services it