summary refs log tree commit diff stats
path: root/src/common/cfgfiles.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2016-05-14 12:20:44 +0200
committerPatrick Griffis <tingping@tingping.se>2016-06-29 15:42:11 -0400
commita970c1ae2ef89ae691fc2104db0c2c4e512f58f3 (patch)
tree4c85cf66ad52c8ce072347cd89eea4e494df6ed5 /src/common/cfgfiles.h
parent6a0e131b885535798ce6c371af1b676a02f32819 (diff)
cfgfiles: Introduce an after_update callback
This allows individual preferences to take action when their value is
changed.

Signed-off-by: Ben Gamari <ben@smart-cactus.org>
Diffstat (limited to 'src/common/cfgfiles.h')
-rw-r--r--src/common/cfgfiles.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/cfgfiles.h b/src/common/cfgfiles.h
index b421884a..b0d57519 100644
--- a/src/common/cfgfiles.h
+++ b/src/common/cfgfiles.h
@@ -71,6 +71,11 @@ struct prefs
 	unsigned short offset;
 	unsigned short len;
 	unsigned short type;
+	/*
+	 * an optional function which will be called after the preference value has
+	 * been updated.
+	 */
+	void (*after_update)(void);
 };
 
 #define TYPE_STR 0