+2006-12-05 OHASHI Akira <bg66@koka-in.org>
+
+ * sb-mixi.el (shimbun-mixi-logout-p): New user option.
+ (shimbun-mixi-initialize-comment-cache): New macro.
+ (initialize-instance): Use it.
+ (shimbun-close): New method.
+
2006-12-04 OHASHI Akira <bg66@koka-in.org>
* mixi.el (mixi-url-encode-and-quote-percent-string): New function.
:group 'shimbun
:type 'boolean)
+(defcustom shimbun-mixi-logout-p nil
+ "*If non-ni, Logout from mixi when shimbun server was closed."
+ :group 'shimbun
+ :type 'boolean)
+
(defvar shimbun-mixi-x-face-alist
'(("default" . "X-Face: CY;j#FoBnpK^37`-IoJvN!J^u;GciiPmMQ@T)~RP1]t8iv?v)/bVI:I\"F!JfWJvhM5{zY!=
h.d+'g\\I{D>Ocy?Rc4uYUyOZj2%2Kl>,x-!MCSsyi3!L}psrrC1jlF,O?Ui>qf)X;sBz`/}\\066X%$
siG'|4K!2?==|oB&#E'5GGH\\#z[muyQ")))
+(defmacro shimbun-mixi-initialize-comment-cache (shimbun)
+ `(shimbun-mixi-set-comment-cache-internal ,shimbun
+ (make-hash-table :test 'equal)))
+
(luna-define-method initialize-instance :after ((shimbun shimbun-mixi)
&rest init-args)
- (shimbun-mixi-set-comment-cache-internal shimbun
- (make-hash-table :test 'equal))
+ (shimbun-mixi-initialize-comment-cache shimbun)
shimbun)
+(luna-define-method shimbun-close :after ((shimbun shimbun-mixi))
+ (shimbun-mixi-initialize-comment-cache shimbun)
+ (when shimbun-mixi-logout-p
+ (mixi-logout)))
+
(luna-define-method shimbun-groups ((shimbun shimbun-mixi))
(mapcar 'car shimbun-mixi-group-alist))