%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/net/ |
Current File : //usr/local/share/emacs/27.2/lisp/net/zeroconf.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'dbus) #@41 Write messages during service discovery (defvar zeroconf-debug nil (#$ . 424)) #@39 The D-Bus name used to talk to Avahi. (defconst zeroconf-service-avahi "org.freedesktop.Avahi" (#$ . 509)) #@51 The D-Bus root object path used to talk to Avahi. (defconst zeroconf-path-avahi "/" (#$ . 622)) #@71 The D-Bus object path used to talk to the Avahi service type browser. (defvar zeroconf-path-avahi-service-type-browser nil (#$ . 724)) #@67 The D-Bus object paths used to talk to the Avahi service browser. (defvar zeroconf-path-avahi-service-browser-hash (make-hash-table :test 'equal) (#$ . 865)) #@68 The D-Bus object paths used to talk to the Avahi service resolver. (defvar zeroconf-path-avahi-service-resolver-hash (make-hash-table :test 'equal) (#$ . 1029)) #@52 The D-Bus entry group interface exported by Avahi. (defconst zeroconf-interface-avahi-entry-group (concat zeroconf-service-avahi ".EntryGroup") (#$ . 1196)) #@47 The D-Bus server interface exported by Avahi. (defconst zeroconf-interface-avahi-server (concat zeroconf-service-avahi ".Server") (#$ . 1359)) #@61 The D-Bus service type browser interface exported by Avahi. (defconst zeroconf-interface-avahi-service-type-browser (concat zeroconf-service-avahi ".ServiceTypeBrowser") (#$ . 1508)) #@56 The D-Bus service browser interface exported by Avahi. (defconst zeroconf-interface-avahi-service-browser (concat zeroconf-service-avahi ".ServiceBrowser") (#$ . 1697)) #@57 The D-Bus service resolver interface exported by Avahi. (defconst zeroconf-interface-avahi-service-resolver (concat zeroconf-service-avahi ".ServiceResolver") (#$ . 1872)) #@32 Wildcard Avahi interface spec. (defconst zeroconf-avahi-interface-unspec -1 (#$ . 2050)) #@31 Wildcard Avahi protocol spec. (defconst zeroconf-avahi-protocol-unspec -1 (#$ . 2145)) #@38 Avahi INET4 address protocol family. (defconst zeroconf-avahi-protocol-inet4 0 (#$ . 2238)) #@38 Avahi INET6 address protocol family. (defconst zeroconf-avahi-protocol-inet6 1 (#$ . 2336)) #@21 Empty Avahi domain. (defconst zeroconf-avahi-domain-unspec "" (#$ . 2434)) #@40 Domain name services are resolved for. (defvar zeroconf-avahi-current-domain zeroconf-avahi-domain-unspec (#$ . 2515)) #@17 No Avahi flags. (defconst zeroconf-avahi-flags-unspec 0 (#$ . 2640)) #@1430 Hash table of discovered Avahi services. The key of an entry is the concatenation of the service name and service type of a discovered service. The value is the service itself. The format of a service is (INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS) The INTERFACE is a number, which represents the network interface the service is located at. The corresponding network interface name, like "eth0", can be retrieved with the function `zeroconf-get-interface-name'. PROTOCOL describes the used network protocol family the service can be accessed. `zeroconf-avahi-protocol-inet4' means INET4, `zeroconf-avahi-protocol-inet6' means INET6. An unspecified protocol family is coded with `zeroconf-avahi-protocol-unspec'. NAME is the string the service is known at Avahi. A service can be known under the same name for different service types. Each TYPE stands for a discovered service type of Avahi. The format is described in RFC 2782. It is of the form "_APPLICATION-PROTOCOL._TRANSPORT-PROTOCOL". TRANSPORT-PROTOCOL must be either "tcp" or "udp". APPLICATION-PROTOCOL must be a protocol name as specified in URL `http://www.dns-sd.org/ServiceTypes.html'. Typical service types are "_workstation._tcp" or "_printer._tcp". DOMAIN is the domain name the service is registered in, like "local". FLAGS, an integer, is used inside Avahi. When publishing a service (see `zeroconf-publish-service', the flag 0 is used. (defvar zeroconf-services-hash (make-hash-table :test 'equal) (#$ . 2717)) #@1120 Hash table of resolved Avahi services. The key of an entry is the concatenation of the service name and service type of a resolved service. The value is the service itself. The format of a service is (INTERFACE PROTOCOL NAME TYPE DOMAIN HOST APROTOCOL ADDRESS PORT TXT FLAGS) INTERFACE, PROTOCOL, NAME, TYPE, DOMAIN and FLAGS have the same meaning as in `zeroconf-services-hash'. HOST is the host name the service is registered. It is a fully qualified name, i.e., it contains DOMAIN. APROTOCOL stands for the network protocol family ADDRESS is encoded (`zeroconf-avahi-protocol-inet4' means INET4, `zeroconf-avahi-protocol-inet6' means INET6). It can be different from PROTOCOL, when an address resolution has been requested for another protocol family but the default one. ADDRESS is the service address, encoded according to the APROTOCOL network protocol family. PORT is the corresponding port the service can be reached on ADDRESS. TXT is an array of strings, describing additional attributes of the service. Usually, every string is a key=value pair. The supported keys depend on the service type. (defvar zeroconf-resolved-services-hash (make-hash-table :test 'equal) (#$ . 4229)) #@52 Return all discovered Avahi service names as list. (defalias 'zeroconf-list-service-names #[0 "\301C\302\303\304\305\306\307!\310\"\311\312%\"\210\313\242!\207" [zeroconf-services-hash nil maphash make-byte-code 514 "\300\301!\300\242B\240\207" vconcat vector [zeroconf-service-name] 5 "\n\n(fn KEY VALUE)" delete-dups] 8 (#$ . 5438)]) #@52 Return all discovered Avahi service types as list. (defalias 'zeroconf-list-service-types #[0 "\301C\302\303\304\305\306\307!\310\"\311\312%\"\210\313\242!\207" [zeroconf-services-hash nil maphash make-byte-code 514 "\300\301!\300\242B\240\207" vconcat vector [zeroconf-service-type] 5 "\n\n(fn KEY VALUE)" delete-dups] 8 (#$ . 5785)]) #@271 Return all discovered Avahi services for a given service type TYPE. The service type is one of the returned values of `zeroconf-list-service-types'. The return value is a list (SERVICE1 SERVICE2 ...). See `zeroconf-services-hash' for the format of SERVICE. (fn TYPE) (defalias 'zeroconf-list-services #[257 "\301C\302\303\304\305\306\307\"\310\"\311\312%\"\210\313\242!\207" [zeroconf-services-hash nil maphash make-byte-code 514 "\300\302!\232\205 \301\301\242B\240\207" vconcat vector [zeroconf-service-type] 5 "\n\n(fn KEY VALUE)" delete-dups] 10 (#$ . 6133)]) #@86 Hash table of hooks for newly added services. The key of an entry is a service type. (defvar zeroconf-service-added-hooks-hash (make-hash-table :test 'equal) (#$ . 6715)) #@82 Hash table of hooks for removed services. The key of an entry is a service type. (defvar zeroconf-service-removed-hooks-hash (make-hash-table :test 'equal) (#$ . 6892)) #@771 Add FUNCTION to the hook of service type TYPE. EVENT must be either `:new' or `:removed', indicating whether FUNCTION shall be called when a new service has been newly detected, or removed. FUNCTION must accept one argument SERVICE, which identifies the new service. Initially, when EVENT is :new, FUNCTION is called for all already detected services of service type TYPE. The attributes of SERVICE can be retrieved via the functions `zeroconf-service-interface' `zeroconf-service-protocol' `zeroconf-service-name' `zeroconf-service-type' `zeroconf-service-domain' `zeroconf-service-flags' `zeroconf-service-host' `zeroconf-service-aprotocol' `zeroconf-service-address' `zeroconf-service-port' `zeroconf-service-txt' (fn TYPE EVENT FUNCTION) (defalias 'zeroconf-service-add-hook #[771 "\302\267\202R \303\304\"\235\203 \211\202 B\262#\266\305!\211\2056 \211@!\210A\266\202\202% \207 \303\304 \"\235\203J \211\202M B\262#\207\306\307!\207" [zeroconf-service-added-hooks-hash zeroconf-service-removed-hooks-hash #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:new 6 :removed 55)) puthash gethash zeroconf-list-services error "EVENT must be either `:new' or `:removed'"] 10 (#$ . 7068)]) #@182 Remove FUNCTION from the hook of service type TYPE. EVENT must be either :new or :removed and has to match the event type used when registering FUNCTION. (fn TYPE EVENT FUNCTION) (defalias 'zeroconf-service-remove-hook #[771 "\302\267\202 \202 \202 \303\304!\305\306\"\"\211\203% \307#\202) \310\"\207" [zeroconf-service-added-hooks-hash zeroconf-service-removed-hooks-hash #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:new 6 :removed 10)) error "EVENT must be either `:new' or `:removed'" remove gethash puthash remhash] 9 (#$ . 8357)]) #@39 Return the local host name as string. (defalias 'zeroconf-get-host #[0 "\303\304 \n\305%\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server dbus-call-method :system "GetHostName"] 6 (#$ . 8959)]) #@35 Return the domain name as string. (defalias 'zeroconf-get-domain #[0 "\303\304 \n\305%\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server dbus-call-method :system "GetDomainName"] 6 (#$ . 9192)]) #@44 Return the local host name FQDN as string. (defalias 'zeroconf-get-host-domain #[0 "\303\304 \n\305%\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server dbus-call-method :system "GetHostNameFqdn"] 6 (#$ . 9425)]) #@70 Return the interface name of internal interface NUMBER. (fn NUMBER) (defalias 'zeroconf-get-interface-name #[257 "\303\304 \n\305\306&\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server dbus-call-method :system "GetNetworkInterfaceNameByIndex" :int32] 9 (#$ . 9674)]) #@68 Return the internal interface number of interface NAME. (fn NAME) (defalias 'zeroconf-get-interface-number #[257 "\303\304 \n\305&\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server dbus-call-method :system "GetNetworkInterfaceIndexByName"] 8 (#$ . 9983)]) #@221 Return the service description of service NAME as list. NAME must be a string. The service must be of service type TYPE. The resulting list has the format (INTERFACE PROTOCOL NAME TYPE DOMAIN FLAGS). (fn NAME TYPE) (defalias 'zeroconf-get-service #[514 "\301\302Q\303#\207" [zeroconf-services-hash gethash "/" nil] 6 (#$ . 10282)]) #@242 Return all service attributes SERVICE as list. NAME must be a string. The service must be of service type TYPE. The resulting list has the format (INTERFACE PROTOCOL NAME TYPE DOMAIN HOST APROTOCOL ADDRESS PORT TXT FLAGS). (fn SERVICE) (defalias 'zeroconf-resolve-service #[257 "\306!\307!\310Q\311\312#\206V \3131I \314\315 \n\316\f \n\n &\f\3178\211\203>