[devhelp] Settings: document API design



commit 1aa172f3c5ad0d0e7ada00cb9edf2daf3d98d7f6
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon Apr 2 14:45:26 2018 +0200

    Settings: document API design

 devhelp/dh-settings.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/devhelp/dh-settings.c b/devhelp/dh-settings.c
index 46e7b7f..64c159e 100644
--- a/devhelp/dh-settings.c
+++ b/devhelp/dh-settings.c
@@ -32,6 +32,18 @@
  * types, read the `*.gschema.xml` file.
  */
 
+/* API design:
+ *
+ * There is no dh_settings_set_default() function. Because what if the default
+ * instance is changed when the app is already initialized? There is no signal
+ * to be notified. So there is only one default DhSettings possible, and it is
+ * defined by the libdevhelp (not the app).
+ *
+ * TODO implement DhProfile and add "profile" properties to classes that need to
+ * access the DhSettings. DhProfile would contain a DhSettings object, plus a
+ * DhBookSelection.
+ */
+
 /* libdevhelp GSettings schema IDs */
 #define SETTINGS_SCHEMA_ID_CONTENTS             "org.gnome.libdevhelp-3.contents"
 


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