From: Magnus H. <ma...@fr...> - 2007-04-16 00:30:38
|
Detlev Zundel <dz...@de...> writes: > here goes another round of multi-accountification, this time for the > keepalive functionality. Committed. Thanks! > This patch implements the keepalive functionality on a global level > for all accounts. Although this works, in the long run we probably > want to have that customizable per account, which now raises the > question on how to move all the global parameters to per-account > settings. > > Any good ideas? One big jabber-accounts variable? Do we stuff all > the per-account settings into the fsm object? We could define our own defcustom macro, which provides a UI for the following data structure: if the value is not a list whose car is :multiaccount, it is valid for all accounts; otherwise the cdr of that list is an alist mapping bare JIDs (or possibly regexps) to values. It could look like: (defcustom-jabber jabber-keepalive-timeout 20 "Seconds to wait for response from server." :type 'integer :group 'jabber-keepalive) (Yes, nothing special in the variable declaration except for the new macro name) And then in the code: ... (run-with-timer (jabber-get jc 'keepalive-timeout) ... skipping the "jabber-" prefix in the symbol to slightly make up for the increased verbosity. What do you think about that? -- Magnus JID: leg...@ja... |