;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\207" [require cl-lib eieio rudel rudel-backend rudel-transport rudel-protocol rudel-util rudel-icons rudel-interactive] 2) #@40 Version of the obby backend for Rudel. (defconst rudel-obby-version '(0 3) (#$ . 657)) #@56 Version of the obby protocol this library understands. (defconst rudel-obby-protocol-version 8 (#$ . 750)) #@41 Default port used by the obby protocol. (defconst rudel-obby-default-port 6522 (#$ . 863)) #@79 Threshold for message size, above which messages are sent in multiple chunks. (defvar rudel-obby-long-message-threshold 32768 (#$ . 960)) #@47 Chunk size used, when chunking long messages. (defvar rudel-obby-long-message-chunk-size 16384 (#$ . 1104)) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias rudel-obby-backend-p eieio-make-class-predicate rudel-obby-backend rudel-obby-backend--eieio-childp eieio-make-child-predicate rudel-obby-backend-child-p make-obsolete "use (cl-typep ... \\='rudel-obby-backend) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (rudel-protocol-backend) ((capabilities :initform '(join host change-color track-subscriptions encrypt))) (:documentation "Main class of the Rudel obby backend. Creates obby client\nconnections and creates obby servers.")] 6) #@75 Create a new object of class type `rudel-obby-backend'. (fn &rest SLOTS) (defalias 'rudel-obby-backend #[128 "\300\301\302#\207" [apply make-instance rudel-obby-backend] 5 (#$ . 1886)]) (byte-code "\300\301\302\303#\300\207" [function-put rudel-obby-backend compiler-macro rudel-obby-backend--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'rudel-obby-backend--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 2203)]) (byte-code "\300\301\302\303\304\305%\210\300\306\302\307\302\310%\210\300\311\302\312\302\313%\210\300\314\302\315\302\316%\210\300\317\302\320\302\321%\210\300\322\302\323\302\324%\210\300\325\302\326\302\327%\210\330\331\332\333!\"\210\330\334\335\333!\"\210\330\336\334\"\210\337\336\340\341#\210\342\333\343\334#\344\333\345\346\347$\210\300\350\302\351\302\352%\210\300\353\302\354\302\355%\210\300\356\302\357\302\360%\210\300\361\302\362\302\363%\210\300\364\302\365\302\366%\210\300\367\302\370\302\371%\207" [cl-generic-define-method initialize-instance nil ((this rudel-obby-backend) _slots) t #[771 " \210\301\302#\207" [rudel-obby-version eieio-oset :version] 7 "Initialize slots of THIS with SLOTS.\n\n(fn CL--CNM THIS SLOTS)"] rudel-ask-connect-info ((_this rudel-obby-backend) &optional info) #[513 "\300\235\203 \301\300\"\202\302\303!\301\304\"\206\305 \301\306\"\206\"\307 \310\235\203/\301\310\"\2024\311\312\313#\314\235\203A\301\314\"\202G\311\315\316#\317\300\304\306\310 \320\230?\205\\ \314\n\320\230?\205g\n\257\n\"\207" [:encryption plist-get y-or-n-p "Use encryption (Required by Gobby server, not supported by Rudel server)? " :username rudel-read-user-name :color rudel-read-user-color :global-password rudel-obtain-password global "Global password: " :user-password user "User password: " append #1=""] 19 "Ask user for the information required to connect to an obby server.\n\n(fn THIS &optional INFO)"] rudel-connect ((this rudel-obby-backend) transport info info-callback &optional progress-callback) #[1284 "\300\301!\210\302\303\"\302\304\"\305\303\306\n\307 &\310!\210\311\312\313$\210\3142\315D\302\316\"\203=\302\317\"\204K \"\262\315D\262\211\203U\320\321#\210\3221i\311\323\324$\210\325\314\326\"0\202\211A\211@A\211\327\330\"=\203\n\211\330=\203\362\331\332\333\334\"\333\335\"#\210\336\337!\210\333\334\"\340=\203\255\341\316\342#\262\315D\211\262 \202\355\333\334\"\343=\203\310\341\316\342#\262\315D\211\262 \202\355\333\334\"\344=\204\332\333\334\"\345=\203\354\341\317\342#\262\315D\211\262 \202\355\342\262\202\211\346>\203\347\350\333\351\"C\"\262\202\342\202\347\350\342\"\266\202\266\203\262\210\202-\210\207" [require rudel-obby-client plist-get :session :host rudel-obby-connection :transport :info rudel-start rudel-state-wait (waiting-for-join-info) (we-finalized they-finalize disconnected) connect joining :username :color apply rudel-switch (rudel-entered-error-state) (idle) (join-failed we-finalized they-finalized disconnected) throw t rudel-find-state join-failed message "Login error: %s %s." slot-value error-symbol error-data sleep-for 2 rudel-obby-invalid-username plist-put nil rudel-obby-username-in-use rudel-obby-invalid-color rudel-obby-color-in-use (they-finalized we-finalized) signal rudel-join-error reason] 22 "Connect to an obby server using the information INFO.\nReturn the connection object.\n\n(fn THIS TRANSPORT INFO INFO-CALLBACK &optional PROGRESS-CALLBACK)"] rudel-ask-host-info ((_this rudel-obby-backend) &optional info) #[513 "\301\302\"\206\303\301\304\"\206\305\306\"\307\302\304F\"\207" [rudel-obby-default-port plist-get :address "0.0.0.0" :port read-number "Port: " append] 9 "Ask user for information required to host an obby session.\n\n(fn THIS &optional INFO)"] rudel-host ((_this rudel-obby-backend) listener _info) #[771 "\300\301!\210\301\302\303#\207" [require rudel-obby-server "obby-server" :listener] 7 "Host an obby session using the information INFO.\nReturn the created server.\n\n(fn THIS LISTENER INFO)"] rudel-make-document ((this rudel-obby-backend) name session) #[771 "\300\"\301\302\"\303\304\305\306\307\310\"\311\312& \262\207" [rudel-available-document-id eieio-oref :self rudel-obby-document :session :id :owner-id slot-value user-id :suffix 1] 15 "Make a new document in SESSION named NAME.\nReturn the new document.\n\n(fn THIS NAME SESSION)"] rudel-available-document-id ((_this rudel-obby-backend) session) #[514 "\211\300\301\302\303\"\"\262\304\305G\"\306\307\"\310\"@\207" [mapcar rudel-id slot-value documents number-sequence 0 sort cl-set-difference <] 8 "Return a document id, which is not in use in SESSION.\n\n(fn THIS SESSION)"] defalias rudel-obby-user-p eieio-make-class-predicate rudel-obby-user rudel-obby-user--eieio-childp eieio-make-child-predicate rudel-obby-user-child-p make-obsolete "use (cl-typep ... \\='rudel-obby-user) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (rudel-user) ((client-id :initarg :client-id :type (or null integer) :accessor rudel-client-id :initform nil :documentation "Id of the client connection, which the user used to log in.\nThe value is an integer, if the user is connected, and nil\notherwise.") (user-id :initarg :user-id :type integer :accessor rudel-id :documentation #1#) (connected :initarg :connected :type boolean :accessor rudel-connected :documentation #1#) (encryption :initarg :encryption :type boolean :documentation #1#)) (:documentation "Class rudel-obby-user ") rudel-connected ((this rudel-obby-user)) #[257 "\300\301\"\205 \302\301\"\207" [slot-boundp connected eieio-oref] 4 "Retrieve the slot `connected' from an object of class `rudel-obby-user'.\n\n(fn THIS)"] \(setf\ rudel-connected\) (value (this rudel-obby-user)) #[514 "\300\301#\207" [eieio-oset connected] 6 "\n\n(fn VALUE THIS)"] rudel-id ((this rudel-obby-user)) #[257 "\300\301\"\205 \302\301\"\207" [slot-boundp user-id eieio-oref] 4 "Retrieve the slot `user-id' from an object of class `rudel-obby-user'.\n\n(fn THIS)"] \(setf\ rudel-id\) (value (this rudel-obby-user)) #[514 "\300\301#\207" [eieio-oset user-id] 6 "\n\n(fn VALUE THIS)"] rudel-client-id ((this rudel-obby-user)) #[257 "\300\301\"\205 \302\301\"\207" [slot-boundp client-id eieio-oref] 4 "Retrieve the slot `client-id' from an object of class `rudel-obby-user'.\n\n(fn THIS)"] \(setf\ rudel-client-id\) (value (this rudel-obby-user)) #[514 "\300\301#\207" [eieio-oset client-id] 6 "\n\n(fn VALUE THIS)"]] 7) #@72 Create a new object of class type `rudel-obby-user'. (fn &rest SLOTS) (defalias 'rudel-obby-user #[128 "\300\301\302#\207" [apply make-instance rudel-obby-user] 5 (#$ . 8573)]) (byte-code "\300\301\302\303#\300\207" [function-put rudel-obby-user compiler-macro rudel-obby-user--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'rudel-obby-user--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 8875)]) (byte-code "\300\301\302\303\302\304%\210\300\305\302\306\302\307%\210\310\311\312\313!\"\210\310\314\315\313!\"\210\310\316\314\"\210\317\316\320\321#\210\322\313\323\314#\324\313\325\326\327$\210\300\330\302\331\302\332%\210\300\333\302\334\302\335%\207" [cl-generic-define-method eieio-speedbar-description nil ((this rudel-obby-user)) #[257 "\300\301\"\302\303\"\205\300\303\"\304\305\306!\203\307\202\310\203%\311\202&\312$\207" [eieio-oref :connected slot-boundp :encryption format "User %s (%s, %s)" object-name-string "Online" "Offline" "Encryption" "Plain"] 8 "Provide a speedbar description for THIS.\n\n(fn THIS)"] eieio-speedbar-object-buttonname ((this rudel-obby-user)) #[257 "\300!\207" [rudel-display-string] 3 "Return a string to use as a speedbar button for THIS.\n\n(fn THIS)"] defalias rudel-obby-document-p eieio-make-class-predicate rudel-obby-document rudel-obby-document--eieio-childp eieio-make-child-predicate rudel-obby-document-child-p make-obsolete "use (cl-typep ... \\='rudel-obby-document) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (rudel-document) ((id :initarg :id :type integer :accessor rudel-id :documentation "The id of this document.\nThe id has to be unique only with respect to the other documents\nowned by the owner.") (owner-id :initarg :owner-id :type integer :documentation "") (suffix :initarg :suffix :type integer :documentation "A counter used to distinguish identically named\ndocuments.")) (:documentation "Objects of the class rudel-obby-document represent shared\ndocuments in obby sessions.") rudel-id ((this rudel-obby-document)) #[257 "\300\301\"\205 \302\301\"\207" [slot-boundp id eieio-oref] 4 "Retrieve the slot `id' from an object of class `rudel-obby-document'.\n\n(fn THIS)"] \(setf\ rudel-id\) (value (this rudel-obby-document)) #[514 "\300\301#\207" [eieio-oset id] 6 "\n\n(fn VALUE THIS)"]] 7) #@76 Create a new object of class type `rudel-obby-document'. (fn &rest SLOTS) (defalias 'rudel-obby-document #[128 "\300\301\302#\207" [apply make-instance rudel-obby-document] 5 (#$ . 11028)]) (byte-code "\300\301\302\303#\300\207" [function-put rudel-obby-document compiler-macro rudel-obby-document--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'rudel-obby-document--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 11351)]) (byte-code "\300\301\302\303\302\304%\210\300\305\302\306\307\310%\210\300\311\302\312\302\313%\210\300\314\302\315\302\316%\207" [cl-generic-define-method rudel-both-ids nil ((this rudel-obby-document)) #[257 "\211\300\301\"\300\302\"D\207" [slot-value owner-id :id] 6 "Return a list consisting of document and owner id of THIS document.\n\n(fn THIS)"] rudel-unique-name ((this rudel-obby-document)) t #[514 "\211 \300\301\"\302V\205\303\304\300\301\"\"P\207" [slot-value suffix 1 format "<%d>"] 9 "Generate a unique name for THIS based on the name and the suffix.\n\n(fn CL--CNM THIS)"] eieio-speedbar-description ((this rudel-obby-document)) #[257 "\300\301\302!\"\207" [format "Document %s" object-name-string] 5 "Construct a description for from the name of document object THIS.\n\n(fn THIS)"] eieio-speedbar-object-buttonname ((this rudel-obby-document)) #[257 "\211\300\301\302!\303\304\"\203\305\202\306#\207" [format "%-12s %s" object-name-string slot-value subscribed "s" "-"] 8 "Return a string to use as a speedbar button for OBJECT.\n\n(fn THIS)"]] 6) #@179 Replace elements of REPLACEMENTS in STRING. REPLACEMENTS is a list of conses whose car is the pattern and whose cdr is the replacement for the pattern. (fn STRING REPLACEMENTS) (defalias 'rudel-obby-replace-in-string #[514 "\211\203\211@\211@A\300\301\302%\262\266A\266\202\202\210\211\207" [replace-regexp-in-string nil t] 13 (#$ . 12671)]) #@77 Replace meta characters in STRING with their escape sequences. (fn STRING) (defalias 'rudel-obby-escape-string #[257 "\300\301\"\207" [rudel-obby-replace-in-string (("\\\\" . "\\b") ("\n" . "\\n") (":" . "\\d"))] 4 (#$ . 13034)]) #@106 Replace escaped versions of obby meta characters in STRING with the actual meta characters. (fn STRING) (defalias 'rudel-obby-unescape-string #[257 "\300\301\"\207" [rudel-obby-replace-in-string (("\\\\n" . "\n") ("\\\\d" . ":") ("\\\\b" . "\\"))] 4 (#$ . 13273)]) #@68 Parse the obby color string COLOR into an Emacs color. (fn COLOR) (defalias 'rudel-obby-parse-color #[257 "\300\301\"\302\303\304\305\306\"\307\"\304\305\310\"\311\"\304\305\312\"\313\"$\207" [string-to-number 16 format "#%04X%04X%04X" lsh logand 16711680 -8 65280 0 255 8] 10 (#$ . 13546)]) #@64 Format the Emacs color COLOR as obby color string. (fn COLOR) (defalias 'rudel-obby-format-color #[257 "\300!\211@A\211@A\211@A\301\302\303\304\"\303\304\"\303\304\"$\266\203\207" [color-values format "%02x%02x%02x" lsh -8] 18 (#$ . 13850)]) #@29 (fn NAME &rest ARGUMENTS) (defalias 'rudel-obby-assemble-message #[385 "\300\301B\302#\303P\207" [mapconcat #[257 "\211\203 \211;\203 \300!\207\207" [rudel-obby-escape-string] 3 "\n\n(fn PART)"] ":" "\n"] 6 (#$ . 14111)]) #@148 Split MESSAGE at `:' and unescape resulting parts. The terminating ` ' should be removed from MESSAGE before calling this function. (fn MESSAGE) (defalias 'rudel-obby-parse-message #[257 "\300\301\302\303\"\"\207" [mapcar rudel-obby-unescape-string split-string ":"] 6 (#$ . 14347)]) #@166 Transform NAME and arguments into an obby protocol message. The resulting message is a string that looks like this: "NAME:ARG1:ARG2:...:ARGN\n" (fn NAME-AND-ARGS) (defalias 'rudel-obby-generate-message #[257 "\300\301\302#\303P\207" [mapconcat #[257 "\211\203 \211;\203 \300!\207\207" [rudel-obby-escape-string] 3 "\n\n(fn PART)"] ":" "\n"] 5 (#$ . 14641)]) (byte-code "\300\301\302!\303\304#\210\305\306\307\"\210\310\311!\210\312\313!\207" [rudel-add-backend rudel-backend-get-factory protocol obby rudel-obby-backend eval-after-load rudel-zeroconf #[0 "\300\301\302\303#\207" [rudel-zeroconf-register-service "_lobby._tcp" start-tls obby] 4] provide rudel-obby require rudel-obby-display] 4)