%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/net/
Upload File :
Create Path :
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\202B\262#\266\305!\211\2056\211@!\210A\266\202\202%\207	\303\304	\"\235\203J\211\202MB\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>\211\320@!\240\210\211A\262\202,\321#\266\2020\202V\205T\322@A\"\262\207" [zeroconf-resolved-services-hash zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server zeroconf-avahi-interface-unspec zeroconf-avahi-protocol-unspec zeroconf-service-name zeroconf-service-type "/" gethash nil (dbus-error) dbus-call-method :system "ResolveService" 9 dbus-byte-array-to-string puthash signal zeroconf-avahi-current-domain zeroconf-avahi-flags-unspec dbus-debug] 17 (#$ . 10629)])
#@64 Return the internal interface number of SERVICE.

(fn SERVICE)
(defalias 'zeroconf-service-interface #[257 "\211@\207" [] 2 (#$ . 11515)])
#@54 Return the protocol number of SERVICE.

(fn SERVICE)
(defalias 'zeroconf-service-protocol #[257 "\211A@\207" [] 2 (#$ . 11660)])
#@51 Return the service name of SERVICE.

(fn SERVICE)
(defalias 'zeroconf-service-name #[257 "\3008\207" [2] 3 (#$ . 11795)])
#@48 Return the type name of SERVICE.

(fn SERVICE)
(defalias 'zeroconf-service-type #[257 "\3008\207" [3] 3 (#$ . 11924)])
#@50 Return the domain name of SERVICE.

(fn SERVICE)
(defalias 'zeroconf-service-domain #[257 "\3008\207" [4] 3 (#$ . 12050)])
#@44 Return the flags of SERVICE.

(fn SERVICE)
(defalias 'zeroconf-service-flags #[257 "\3008\207" [5] 3 (#$ . 12180)])
#@48 Return the host name of SERVICE.

(fn SERVICE)
(defalias 'zeroconf-service-host #[257 "\300\301!8\207" [5 zeroconf-resolve-service] 4 (#$ . 12303)])
#@55 Return the aprotocol number of SERVICE.

(fn SERVICE)
(defalias 'zeroconf-service-aprotocol #[257 "\300\301!8\207" [6 zeroconf-resolve-service] 4 (#$ . 12459)])
#@49 Return the IP address of SERVICE.

(fn SERVICE)
(defalias 'zeroconf-service-address #[257 "\300\301!8\207" [7 zeroconf-resolve-service] 4 (#$ . 12627)])
#@50 Return the port number of SERVICE.

(fn SERVICE)
(defalias 'zeroconf-service-port #[257 "\300\301!8\207" [8 zeroconf-resolve-service] 4 (#$ . 12787)])
#@51 Return the text strings of SERVICE.

(fn SERVICE)
(defalias 'zeroconf-service-txt #[257 "\300\301!8\207" [9 zeroconf-resolve-service] 4 (#$ . 12945)])
#@182 Instantiate an Avahi service type browser for domain DOMAIN.
DOMAIN is a string, like "dns-sd.org" or "local".  When
DOMAIN is nil, the local domain is used.

(fn &optional DOMAIN)
(defalias 'zeroconf-init #[256 "\211\203	\211;\205g\306\307\"\205g\310\307	\n\311%\205g\312\211\206!\f\313!\210\313!\210\313!\210\313!\210\313!\210\313!\210\314 \315\211\203[\211@\316\307\317&\210A\266\202\202C\266\316\307	\320\317&\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server zeroconf-path-avahi-service-type-browser zeroconf-avahi-domain-unspec zeroconf-avahi-current-domain dbus-ping :system dbus-call-method "GetVersionString" nil clrhash zeroconf-register-service-type-browser ("ItemNew" "ItemRemove" "Failure") dbus-register-signal zeroconf-service-type-browser-handler "StateChanged" zeroconf-path-avahi-service-browser-hash zeroconf-path-avahi-service-resolver-hash zeroconf-services-hash zeroconf-resolved-services-hash zeroconf-service-added-hooks-hash zeroconf-service-removed-hooks-hash zeroconf-interface-avahi-service-type-browser] 11 (#$ . 13104)])
#@54 Register a service type browser at the Avahi daemon.
(defalias 'zeroconf-register-service-type-browser #[0 "\206\306\307	\n\310\f
	\n&	\211\207" [zeroconf-path-avahi-service-type-browser zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server zeroconf-avahi-interface-unspec zeroconf-avahi-protocol-unspec dbus-call-method :system "ServiceTypeBrowserNew" zeroconf-avahi-current-domain zeroconf-avahi-flags-unspec] 10 (#$ . 14227)])
#@72 Prevent infinite recursion in `zeroconf-service-type-browser-handler'.
(defvar zeroconf-service-type-browser-handler-running nil (#$ . 14691))
#@78 Registered service type browser handler at the Avahi daemon.

(fn &rest VAL)
(defalias 'zeroconf-service-type-browser-handler #[128 "?\205=\305	\203\306\307\310\n!#\210\310\n!\311\230\205<\312\3138!\314\211\2058\211@\315\316\f\317&\210A\266\202\202!\262\262)\207" [zeroconf-service-type-browser-handler-running zeroconf-debug last-input-event zeroconf-service-avahi zeroconf-interface-avahi-service-browser t message "zeroconf-service-type-browser-handler: %s %S" dbus-event-member-name "ItemNew" zeroconf-register-service-browser 2 ("ItemNew" "ItemRemove" "Failure") dbus-register-signal :system zeroconf-service-browser-handler] 11 (#$ . 14840)])
#@60 Register a service browser at the Avahi daemon.

(fn TYPE)
(defalias 'zeroconf-register-service-browser #[257 "\306\307#\206\310\311\312	\n\313\f
\n\f
&\n#\207" [zeroconf-path-avahi-service-browser-hash zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server zeroconf-avahi-interface-unspec zeroconf-avahi-protocol-unspec gethash nil puthash dbus-call-method :system "ServiceBrowserNew" zeroconf-avahi-current-domain zeroconf-avahi-flags-unspec] 14 (#$ . 15512)])
#@73 Registered service browser handler at the Avahi daemon.

(fn &rest VAL)
(defalias 'zeroconf-service-browser-handler #[128 "\203\f\306\307\310	!#\210\311!\312!\313Q\314\n\315#\314\315#\310	!\316\230\203G\317\f#\210\211\205B\211@\211!\210A\266\202\2020\262\202n\310	!\320\230\205n\321\f\"\210\321
\"\210\211\211\205l\211@\211!\210A\266\202\202Z\262\207" [zeroconf-debug last-input-event zeroconf-service-added-hooks-hash zeroconf-service-removed-hooks-hash zeroconf-services-hash zeroconf-resolved-services-hash message "zeroconf-service-browser-handler: %s %S" dbus-event-member-name zeroconf-service-name zeroconf-service-type "/" gethash nil "ItemNew" puthash "ItemRemove" remhash] 10 (#$ . 16011)])
#@66 Register a service resolver at the Avahi daemon.

(fn NAME TYPE)
(defalias 'zeroconf-register-service-resolver #[514 "\306Q\307\310#\206$\311\312\313	\n\314\f
\f\f

&\f#\207" [zeroconf-path-avahi-service-resolver-hash zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server zeroconf-avahi-interface-unspec zeroconf-avahi-protocol-unspec "/" gethash nil puthash dbus-call-method :system "ServiceResolverNew" zeroconf-avahi-current-domain zeroconf-avahi-flags-unspec zeroconf-resolved-services-hash] 18 (#$ . 16749)])
#@74 Registered service resolver handler at the Avahi daemon.

(fn &rest VAL)
(defalias 'zeroconf-service-resolver-handler #[128 "\3038\211\203\211\304@!\240\210\211A\262\202\210\203\"\305\306\307	!#\210\307	!\310\230\2056\311\312!\313\314!Q\n#\207" [zeroconf-debug last-input-event zeroconf-resolved-services-hash 9 dbus-byte-array-to-string message "zeroconf-service-resolver-handler: %s %S" dbus-event-member-name "Found" puthash zeroconf-service-name "/" zeroconf-service-type] 6 (#$ . 17304)])
#@158 Publish a service at the Avahi daemon.
For the description of arguments, see `zeroconf-resolved-services-hash'.

(fn NAME TYPE DOMAIN HOST PORT ADDRESS TXT)
(defalias 'zeroconf-publish-service #[1799 "G\306U\203\307\310\"\210G\306U\203\307\311\"\210G\306U\203&\312 \262G\306U\2031\313 \262\2048\306\262\314\315	\n\316%\317\211\203b\211@\320!\211\235\203T\202W\211B\262\262A\266\202\202A\210\314\315\321\f
\322\323\324\"&\210G\306U\204\230\314\315\325\f

&\n\210\314\315\326%\207" [zeroconf-service-avahi zeroconf-path-avahi zeroconf-interface-avahi-server zeroconf-interface-avahi-entry-group zeroconf-avahi-interface-unspec zeroconf-avahi-protocol-unspec 0 error "Invalid argument NAME: %s" "Invalid argument TYPE: %s" zeroconf-get-domain zeroconf-get-host-domain dbus-call-method :system "EntryGroupNew" nil dbus-string-to-byte-array "AddService" :uint16 append (:array) "AddAddress" "Commit" zeroconf-avahi-flags-unspec] 27 (#$ . 17819)])
(provide 'zeroconf)

Zerion Mini Shell 1.0