[folks] core: Document that PersonaStore.trust_level must not be set by clients



commit c505430080462d9febb303aaf49193291de91d52
Author: Philip Withnall <philip tecnocode co uk>
Date:   Fri Jan 17 22:45:13 2014 +0000

    core: Document that PersonaStore.trust_level must not be set by clients
    
    It’s effectively internal API, and is only exposed publicly due to me
    foolishly not making it abstract when first implementing it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722421

 folks/persona-store.vala |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/folks/persona-store.vala b/folks/persona-store.vala
index 05dd710..400e3d7 100644
--- a/folks/persona-store.vala
+++ b/folks/persona-store.vala
@@ -25,6 +25,9 @@ using Gee;
  * Trust level for a { link PersonaStore}'s { link Persona}s for linking
  * purposes.
  *
+ * Trust levels are set internally by the backends, and must not be modified by
+ * clients.
+ *
  * @since 0.1.13
  */
 public enum Folks.PersonaStoreTrust
@@ -615,6 +618,9 @@ public abstract class Folks.PersonaStore : Object
    *
    * This value may change throughout the life of the { link PersonaStore}.
    *
+   * The trust level may be queried by clients, but must not be set by them. The
+   * setter for this property is for libfolks internal use only.
+   *
    * @see PersonaStoreTrust
    * @since 0.1.13
    */
@@ -625,6 +631,12 @@ public abstract class Folks.PersonaStore : Object
           return this._trust_level;
         }
 
+      /* FIXME: At the next API break, make this an abstract property and have
+       * implemented by the backends, to avoid exposing the setter in the C
+       * API. The IndividualAggregator can always disregard the backend’s
+       * suggested trust level.
+       *
+       * https://bugzilla.gnome.org/show_bug.cgi?id=722421 */
       set
         {
           if (value > trust_level)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]