]>
Commit | Line | Data |
---|---|---|
53e6db90 DC |
1 | ;ELC\1c\0\0\0 |
2 | ;;; Compiled | |
3 | ;;; in Emacs version 28.2 | |
4 | ;;; with all optimizations. | |
5 | ||
6 | ||
7 | ||
8 | (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require jabber-private jabber-widget cl-lib] 2) | |
9 | #@204 Mapping from full JIDs to bookmarks. | |
10 | Bookmarks are what has been retrieved from the server, as list of | |
11 | XML elements. This is nil if bookmarks have not been retrieved, | |
12 | and t if no bookmarks where found.\1f | |
13 | (defvar jabber-bookmarks (make-hash-table :test 'equal) (#$ . 187)) | |
14 | #@388 Get bookmark data for CONFERENCE-JID. | |
15 | KEY may be nil or one of :name, :autojoin, :nick and :password. | |
16 | If KEY is nil, a plist containing the above keys is returned. | |
17 | CONT is called when the result is available, with JC and the | |
18 | result as arguments. If CONT is nil, return the requested data | |
19 | immediately, and return nil if it is not in the cache. | |
20 | ||
21 | (fn JC CONFERENCE-JID CONT &optional KEY)\1f | |
22 | (defalias 'jabber-get-conference-data #[1027 "\ 1\204\16\0\300\ 4!\211\205\15\0\211<\205\15\0\301\ 1\ 5\ 4#\207\302\ 4\ 4\ 3\ 5\303\304\ 4\ 4\ 4$\266\203\"\207" [jabber-get-bookmarks-from-cache jabber-get-conference-data-internal jabber-get-bookmarks make-closure #[514 "\303\ 1\300\301#\302\ 3\ 2\"\207" [V0 V1 V2 jabber-get-conference-data-internal] 6 "\n\n(fn JC RESULT)"]] 14 (#$ . 465)]) | |
23 | #@34 | |
24 | ||
25 | (fn RESULT CONFERENCE-JID KEY)\1f | |
26 | (defalias 'jabber-get-conference-data-internal #[771 "\3002=\0\ 2\211\205:\0\211@\211\211<\205\13\0\211@\262\ 1\301=\2033\0\211\302\ 1:\205%\0\303\ 2\ 2\"\266\202\ 4\230\2033\0\304\300\305\ 3!\"\210\ 1A\266\202\202\ 5\0\262\ 10\ 1\203F\0\306\ 1\ 3\"\207\207" [--cl-block-nil-- conference jid xml-get-attribute-or-nil throw jabber-parse-conference-bookmark plist-get] 10 (#$ . 1212)]) | |
27 | #@130 Convert a <conference/> tag into a plist. | |
28 | The plist may contain the keys :jid, :name, :autojoin, | |
29 | :nick and :password. | |
30 | ||
31 | (fn NODE)\1f | |
32 | (defalias 'jabber-parse-conference-bookmark #[257 "\211\211<\205\b\0\211@\262\ 1\300=\205g\0\301\ 1\302\ 1:\205\e\0\303\ 2\ 2\"\266\202\304\ 3\305\ 1:\205)\0\303\ 2\ 2\"\266\202\306\ 5\307\ 1:\2057\0\303\ 2\ 2\"\266\202\310\235\311\312\ 6\b\313\"@\211AA\211\314\232?\205M\0\211\266\202@\315\312\ 6\n\316\"@\211AA\211\314\232?\205b\0\211\266\202@\257\n\207" [conference :jid jid xml-get-attribute-or-nil :name name :autojoin autojoin ("true" "1") :nick jabber-xml-get-children nick (("")) :password password] 14 (#$ . 1600)]) | |
33 | #@242 Retrieve bookmarks (if needed) and call CONT. | |
34 | Arguments to CONT are JC and the bookmark list. CONT will be | |
35 | called as the result of a filter function or a timer. | |
36 | If REFRESH is non-nil, always fetch bookmarks. | |
37 | ||
38 | (fn JC CONT &optional REFRESH)\1f | |
39 | (defalias 'jabber-get-bookmarks #[770 "\301\302\ 4!\b\"\ 1\204\1c\0\211\203\1c\0\303\304\305\ 5\ 6\a\ 5<\205\1a\0\ 5%\207\ 2\306\307\ 2\"\310\ 6\ 6\311\312\ 4\211%\207" [jabber-bookmarks gethash jabber-connection-bare-jid run-with-timer 0 nil make-closure #[514 "\301\ 2\ 2\300#\207" [V0 jabber-get-bookmarks-1] 6 "\n\n(fn JC RESULT)"] jabber-private-get storage "storage:bookmarks"] 12 (#$ . 2221)]) | |
40 | #@23 | |
41 | ||
42 | (fn JC RESULT CONT)\1f | |
43 | (defalias 'jabber-get-bookmarks-1 #[771 "\301\ 3!\ 2\211<\205\v\0\211@\262\ 1\302=\203'\0\ 2\211AA\211\303\232?\205\1e\0\211\266\202\206(\0\304\202(\0\304\305\ 2\ 2\b#\210\ 2\ 5\ 2<\2056\0\ 2\"\207" [jabber-bookmarks jabber-connection-bare-jid storage (("")) t puthash] 9 (#$ . 2832)]) | |
44 | #@120 Return cached bookmarks for JC. | |
45 | If bookmarks have not yet been fetched by `jabber-get-bookmarks', | |
46 | return nil. | |
47 | ||
48 | (fn JC)\1f | |
49 | (defalias 'jabber-get-bookmarks-from-cache #[257 "\301\302\ 2!\b\"\207" [jabber-bookmarks gethash jabber-connection-bare-jid] 4 (#$ . 3117)]) | |
50 | #@203 Set bookmarks to BOOKMARKS, which is a list of XML elements. | |
51 | If CALLBACK is non-nil, call it with JC and t or nil as arguments | |
52 | on success or failure, respectively. | |
53 | ||
54 | (fn JC BOOKMARKS &optional CALLBACK)\1f | |
55 | (defalias 'jabber-set-bookmarks #[770 "\211\204\a\0\300\262\ 1\301\ 3\302\303\ 5BB\ 3\304\ 5\305&\ 6\207" [ignore jabber-private-set storage ((xmlns . "storage:bookmarks")) t nil] 10 (#$ . 3382)]) | |
56 | #@93 Create a buffer for editing bookmarks interactively. | |
57 | ||
58 | JC is the Jabber connection. | |
59 | ||
60 | (fn JC)\1f | |
61 | (defalias 'jabber-edit-bookmarks #[257 "\300\ 1\301\302#\207" [jabber-get-bookmarks jabber-edit-bookmarks-1 t] 5 (#$ . 3773) (byte-code "\300 C\207" [jabber-read-account] 1)]) | |
62 | #@21 | |
63 | ||
64 | (fn JC BOOKMARKS)\1f | |
65 | (defalias 'jabber-edit-bookmarks-1 #[514 "\304\305\ 2\"\262\ 1\306\307\ 2\"\262\ 1r\310\311!q\210\312\307!\210\ 1\10\313\314\315\316\ 5!P\317\320#\321\"\210\322\301!\203/\0 \2049\0\322\302!\203K\0\n\203K\0\313\323\324\325\326$\210\327\330\331\332\333$\210\313\321!\210\334\327\335\336\ 4#B\vB\13\313\337!\210\327\330\331\340\341$\210\342 \210\343\344!\210\345p!\210eb)\207" [jabber-buffer-connection jabber-muc-autojoin jabber-muc-default-nicknames jabber-widget-alist mapcar #[257 "\211\211<\205\b\0\211@\262\ 1\211\300\267\202~\0\301\ 2\301\ 1:\205\1c\0\302\ 2\ 2\"\266\202\206\"\0\303\ 3\304\ 1:\205-\0\302\ 2\ 2\"\266\202\2063\0\303E\207\305\ 2\306\ 1:\205A\0\302\ 2\ 2\"\266\202\206G\0\303\ 3\304\ 1:\205R\0\302\ 2\ 2\"\266\202\206X\0\303\ 4\307\ 1:\205c\0\302\ 2\ 2\"\266\202\310\235??\311\ 6\ 6\312\"\206r\0\303\311\ 6\a\313\"\206{\0\303\257\ 6\207\314\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (url 16 conference 53)) url xml-get-attribute-or-nil #1="" name conference jid autojoin ("true" "1") jabber-xml-path (nick #1#) (password #1#) nil] 10 "\n\n(fn E)"] delq nil get-buffer-create "Edit bookmarks" jabber-init-widget-buffer widget-insert jabber-propertize "Edit bookmarks for " jabber-connection-bare-jid face jabber-title-large "\n\n" boundp "The variables `jabber-muc-autojoin' and/or `jabber-muc-default-nicknames'\n" "contain values. They are only available to jabber.el on this machine.\n" "You may want to import them into your bookmarks, to make them available\n" "to any client on any machine.\n" widget-create push-button :notify jabber-bookmarks-import "Import values from variables" bookmarks (repeat :tag "Bookmarks" (choice (list :tag "Conference" (const :format #1# conference) (string :tag "JID") (string :tag "Name") (checkbox :tag "Autojoin" :format "%[%v%] Autojoin?\n") (string :tag "Nick") (string :tag "Password")) (list :tag "URL" (const :format #1# url) (string :tag "URL") (string :tag "Name")))) :value "\n" jabber-bookmarks-submit "Submit" widget-setup widget-minor-mode 1 switch-to-buffer] 7 (#$ . 4045)]) | |
66 | #@21 | |
67 | ||
68 | (fn &rest IGNORE)\1f | |
69 | (defalias 'jabber-bookmarks-submit #[128 "\303\304\b\236A!\305\306\ 2\"\262\ 1\307\310 !\n\"\210\311 \312\313\ 4BB\314\315\314\315&\ 6\207" [jabber-widget-alist jabber-buffer-connection jabber-bookmarks widget-value bookmarks mapcar #[257 "\211@\211\300\267\202\235\0\ 1\211G\301U\203\18\0\ 2\211A\266\202\202 \0\302\303\304\ 3GD\"\210\305\ 1\211A\262\ 3\242\ 2\242\306\211\ 3B\307\ 3BDD\207\ 1\211G\310U\203C\0\ 2\211A\266\202\202K\0\302\303\311\ 3GD\"\210\305\ 1\211A\262\ 3\242\ 2\211A\262\ 4\242\ 3\211A\262\ 5\242\ 4\211A\262\ 6\242\ 5\242\312\313\ 6\ 6B\307\ 6\ 6B\314\ 6\ 6\203y\0\315\202z\0\316BE\317\ 4G\320U?\205\213\0\321\305\ 6\ 6EC\ 4G\320U?\205\231\0\322\305\ 6\ 6EC\"BB\207\305\207" [#s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (url 8 conference 51)) 3 signal wrong-number-of-arguments (symbol url name) nil url name 6 (symbol jid name autojoin nick password) conference jid autojoin "1" "0" append 0 nick password] 16 "\n\n(fn ENTRY)"] remhash jabber-connection-bare-jid jabber-private-set storage ((xmlns . "storage:bookmarks")) jabber-report-success "Storing bookmarks"] 9 (#$ . 6077)]) | |
70 | #@21 | |
71 | ||
72 | (fn &rest IGNORE)\1f | |
73 | (defalias 'jabber-bookmarks-import #[128 "\303\304\b\236A!\305\306\307\310\ 4\"\" \211\203^\0\211@\211\ 1\203\"\0\ 1\211A\262\ 2\242\202)\0\311\312\313\ 3GD\"\314\ 1\ 6\ 6\"\211\203>\0\211AAA\211\ 4\240\266\ 5\202W\0\ 1\315\316\ 5\315\257\ 5\262\ 1\211\ 6\ 6B\262\ 6\317\ 1B\ 6\aB\262\a\266\ 3\ 1A\266\202\202\ e\0\210\n\211\203\221\0\211@\314\ 1\ 4\"\211\203y\0\211AA\211\320\240\266\ 3\202\212\0\ 1\315\320\315\211\257\ 5\262\ 1\317\ 1B\ 5B\262\ 5\210\ 1A\266\202\202`\0\210\321\304\b\236A\ 3\"\210\322 \207" [jabber-widget-alist jabber-muc-default-nicknames jabber-muc-autojoin widget-value bookmarks mapcar cdr cl-remove-if-not #[257 "\211@\300=\207" [conference] 3 "\n\n(fn ENTRY)"] signal wrong-number-of-arguments (muc-jid . nick) assoc "" nil conference t widget-value-set widget-setup] 13 (#$ . 7165)]) | |
74 | (provide 'jabber-bookmarks) |