;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301\302\303\304\305%\210\306\307\310\311\312DD\313\314\315%\210\306\316\310\311\317DD\320\314\321%\210\306\322\310\311\323DD\324\314\325%\210\306\326\310\311\327DD\324\314\330%\210\306\331\310\311\332DD\333\314\334%\207" [custom-declare-group gntp nil "GNTP, send/register growl notifications via GNTP from within emacs." :group external custom-declare-variable gntp-application-name funcall function #[0 "\300\207" [#1="Emacs/gntp.el"] 1 #1#] "Name of the application gntp registers itself." :type (string) gntp-application-icon #[0 "\300\207" [nil] 1] "Icon to display as the application icon.\nEither a URL or a path to a file." (string) gntp-server #[0 "\300\207" [#2="localhost"] 1 #2#] "Default port of the server.\nStandard says can't be changed, but port-forwarding etc." (string) gntp-server-port #[0 "\300\207" [23053] 1] (integer) gntp-register-alist #[0 "\300\207" [nil] 1] "Registration item list." (choice string (const nil))] 6) #@44 (fn &optional NOTIFICATIONS SERVER PORT) (defalias 'gntp-register #[768 "\302\203 \202\n!\303\203\202 #\207" [gntp-register-alist gntp-server gntp-build-message-register gntp-send] 8 (#$ . 1048) nil]) #@170 Send notification NAME with TITLE, TEXT, PRIORITY and ICON to SERVER:PORT. PORT defaults to `gntp-server-port' (fn NAME TITLE TEXT SERVER &optional PORT PRIORITY ICON) (defalias 'gntp-notify #[1796 "\300%\301#\207" [gntp-build-message-notify gntp-send] 13 (#$ . 1271)]) #@72 Build the message to register NOTIFICATIONS types. (fn NOTIFICATIONS) (defalias 'gntp-build-message-register #[257 "\301\302\303\"\302\304G\"E\305 \306 \307\203%\302\310\"C\244\210\203%B\262\211\203I\211@\311\312!B\244\210\313!\211\203A\311D\244\210\210A\266\202\202&\210\211\203T\311B\244\210\314\315\316\307\"\317#\207" [gntp-application-name "GNTP/1.0 REGISTER NONE" format "Application-Name: %s" "Notifications-Count: %d" gntp-app-icon-uri gntp-app-icon-data nil "Application-Icon: %s" "" gntp-notification-lines gntp-notice-icon-data mapconcat identity remove " \n"] 11 (#$ . 1561)]) #@55 Transform NOTICE into a list of strings. (fn NOTICE) (defalias 'gntp-notification-lines #[257 "\300\301\"\300\302\"\303!\304\305!P\205\306P\205\307\205#\310PF\207" [gntp-notice-get :display :enabled gntp-notice-icon-uri "Notification-Name: " gntp-notice-name "Notification-Display-Name: " "Notification-Enabled: True" "Notification-Icon: "] 9 (#$ . 2183)]) #@97 Build a message of type NAME with TITLE and TEXT. (fn NAME TITLE TEXT &optional PRIORITY ICON) (defalias 'gntp-build-message-notify #[1283 "\301\3029\203\303!\202\304\305\306\n#\203$\202%\307\2031\310!\2022\311&\207" [gntp-application-name format "GNTP/1.0 NOTIFY NONE \nApplication-Name: %s \nNotification-Name: %s \nNotification-Title: %s \nNotification-Text: %s \nNotification-Priority: %s \nNotification-Icon: %s \n \n" symbol-name replace-regexp-in-string " \n" "\n" "0" gntp-icon-uri ""] 14 (#$ . 2561)]) #@44 Get the icon URI from NOTICE. (fn NOTICE) (defalias 'gntp-notice-icon-uri #[257 "\300\301\302\"!\207" [gntp-icon-uri gntp-notice-get :icon] 5 (#$ . 3106)]) #@41 Get icon data from NOTICE. (fn NOTICE) (defalias 'gntp-notice-icon-data #[257 "\300\301\302\"!\207" [gntp-icon-data gntp-notice-get :icon] 5 (#$ . 3270)]) #@61 Return the value to be used in the Application-Icon header. (defalias 'gntp-app-icon-uri #[0 "\301!\207" [gntp-application-icon gntp-icon-uri] 2 (#$ . 3433)]) #@61 Return the value to be used in the Application-Icon header. (defalias 'gntp-app-icon-data #[0 "\301!\207" [gntp-application-icon gntp-icon-data] 2 (#$ . 3599)]) #@33 Get the URI of ICON. (fn ICON) (defalias 'gntp-icon-uri #[257 "\211\205\211\300\301O\302\230\203\207\303!\205\304!\205\305\306!P\207" [0 7 "http://" file-exists-p file-readable-p "x-growl-resource://" md5] 4 (#$ . 3767)]) #@33 Get the URI of ICON. (fn ICON) (defalias 'gntp-icon-data #[257 "\211\205)\211\300\301O\302\230?\205)\303!\205)\304!\205)\305!\306!\307\310G$\266\202\207" [0 7 "http://" file-exists-p file-readable-p md5 gntp-file-string format "Identifier: %s \nLength: %d \n \n%s"] 8 (#$ . 4007)]) #@83 Get the name of NOTICE. The name must be either a symbol or string. (fn NOTICE) (defalias 'gntp-notice-name #[257 "\211@\2119\203 \300!\207\207" [symbol-name] 4 (#$ . 4307)]) #@49 Get PROPERTY from NOTICE. (fn NOTICE PROPERTY) (defalias 'gntp-notice-get #[514 "\300A\"\207" [plist-get] 5 (#$ . 4492)]) #@104 Send MESSAGE to SERVER:PORT. PORT defaults to `gntp-server-port'. (fn MESSAGE SERVER &optional PORT) (defalias 'gntp-send #[770 "\301\302\303\304\305\306\307\203\202\310\311&\n\312\313P\"\207" [gntp-server-port make-network-process :name "gntp" :host :server nil :service :filter gntp-filter process-send-string " \n \n \n"] 14 (#$ . 4624)]) #@98 Filter for PROC started by `gntp-send'. Argument STRING reply from the server. (fn PROC STRING) (defalias 'gntp-filter #[514 "\211\300\301O\302\230\205 \303\304\"\207" [0 15 "GNTP/1.0 -ERROR" error "GNTP: Something went wrong take a look at the reply:\n %s"] 5 (#$ . 4986)]) #@64 Read the contents of a FILE and return as a string. (fn FILE) (defalias 'gntp-file-string #[257 "\300\301\302\"r\211q\210\303\304\"\216\305!\210\306 *\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents-literally buffer-string] 5 (#$ . 5270)]) (provide 'gntp)