;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\304\305\306\307\310\311\312\302&\210\313\314\315\316\312\305\317\320&\210\313\321\322\323\312\305\317\320&\210\313\324\325\326\312\305\317\320&\210\313\327\330\331\312\305\317\320&\210\313\332\333\334\312\305\317\320&\207" [require enwc-backend enwc dbus custom-declare-group enwc-wicd nil "*Wicd variables for ENWC." :prefix "enwc-wicd-" :group custom-declare-variable enwc-wicd-dbus-service "org.wicd.daemon" "The wicd D-Bus service identifier." :type string enwc-wicd-dbus-wireless-path "/org/wicd/daemon/wireless" "The wicd wireless D-Bus path." enwc-wicd-dbus-wireless-interface "org.wicd.daemon.wireless" "The wicd wireless D-Bus interface." enwc-wicd-dbus-wired-path "/org/wicd/daemon/wired" "The wicd wired D-Bus path." enwc-wicd-dbus-wired-interface "org.wicd.daemon.wired" "The wicd wired D-Bus interface."] 8) #@67 The list of the desired details to be obtained from each network. (defvar enwc-wicd-details-list '("essid" "bssid" "quality" "encryption" "channel") (#$ . 1287)) #@30 Current access point. UNUSED (defvar enwc-wicd-current-ap "" (#$ . 1455)) #@35 Id of the current network. UNUSED (defvar enwc-wicd-current-nw-id -1 (#$ . 1535)) #@57 D-Bus signal object for the "SendEndScanSignal" signal. (defvar enwc-wicd-end-scan-signal nil (#$ . 1623)) #@54 D-Bus signal objects for the "StatusChanged" signal. (defvar enwc-wicd-status-changed-signal nil (#$ . 1736)) #@83 Calls D-Bus method METHOD with arguments ARGS within the wicd wireless interface. (defalias 'enwc-wicd-dbus-wireless-call-method #[(method &rest args) "\305\306\307 \n \310\311\f& \207" [enwc-wicd-dbus-service enwc-wicd-dbus-wireless-path enwc-wicd-dbus-wireless-interface method args apply dbus-call-method :system :timeout 25000] 10 (#$ . 1852)]) #@80 Calls D-Bus method METHOD with arguments ARGS within the wicd wired interface. (defalias 'enwc-wicd-dbus-wired-call-method #[(method &rest args) "\305\306\307 \n \310\311\f& \207" [enwc-wicd-dbus-service enwc-wicd-dbus-wired-path enwc-wicd-dbus-wired-interface method args apply dbus-call-method :system :timeout 25000] 10 (#$ . 2208)]) #@21 Wicd scan function. (defalias 'enwc-wicd-scan #[nil "\300\301!\207" [enwc-wicd-dbus-wireless-call-method "Scan"] 2 (#$ . 2552)]) (defalias 'enwc-wicd-get-networks #[(&optional wired) "\203\301 \207\302 \207" [wired enwc-wicd-get-wired-profiles enwc-wicd-get-wireless-networks] 1]) #@61 Wicd get networks function. Just returns a number sequence. (defalias 'enwc-wicd-get-wireless-networks #[nil "\300\301\302\303!S\"\207" [number-sequence 0 enwc-wicd-dbus-wireless-call-method "GetNumberOfNetworks"] 4 (#$ . 2842)]) #@41 Get the list of wired network profiles. (defalias 'enwc-wicd-get-wired-profiles #[nil "\300\301!\207" [enwc-wicd-dbus-wired-call-method "GetWiredProfileList"] 2 (#$ . 3078)]) (defvar enwc-wicd-prop-values nil) (defvar enwc-wicd-prop-num 0) (defvar enwc-wicd-prop-timeout 3) #@160 The handler for `enwc-wicd-get-wireless-network-property'. This receives the value of network property PROP, and appends the value to `enwc-wicd-prop-values'. (defalias 'enwc-wicd-nw-prop-handler #[(prop &rest args) " @B\nB T\211\207" [prop args enwc-wicd-prop-values enwc-wicd-prop-num] 2 (#$ . 3359)]) #@62 Convert a Wicd network property to an ENWC network property. (defalias 'enwc-wicd-prop-to-prop #[(prop) "\301\232\203\302\207\303\232\203\304\207\305\232\203\306\207\307\232\203 \310\207\311\232\203(\312\207\313\232\205/\314\207" [prop "essid" essid "bssid" bssid "quality" strength "encryption" encrypt "mode" mode "channel" channel] 2 (#$ . 3672)]) #@141 Wicd get wireless network property function. This calls the D-Bus method on Wicd to get the property PROP from wireless network with id ID. (defalias 'enwc-wicd-get-wireless-network-property #[(id prop) "\305\306 \n\307\310\311\312 \313BBE\314\315\316\f\317 &\f\207" [enwc-wicd-dbus-service enwc-wicd-dbus-wireless-path enwc-wicd-dbus-wireless-interface prop id dbus-call-method-asynchronously :system "GetWirelessProperty" lambda (x) enwc-wicd-nw-prop-handler (x) :timeout 1000 :int32 :string] 13 (#$ . 4045)]) (defalias 'enwc-wicd-build-prop-list #[(prop-list det-list) "\301\302\"\207" [det-list mapcar #[(det) "\305 \"\306!\n\205\nA\307\230\204\310\230\203 \311\n! \f+B\207" [det prop-list cur-prop act-det act-prop assoc enwc-wicd-prop-to-prop "essid" "channel" string-to-number] 3]] 3]) #@182 Get the network properties of a network. This function returns an associative list of properties for the network with id ID. For a list of properties, see `enwc-wicd-details-list'. (defalias 'enwc-wicd-get-wireless-nw-props #[(id) "\306\307\n\306\211\203\f@\310 \"\210\fA\211\204\f*\3112B\312\306\313#\211B\314\216 \nGW\205@\315\306\211\316#\210\2020+0\211\311=\204M\210)\317\320\"\203j\321 !\317\320\"\206d\322\241\210)\202p\320\322BB\323\n\"\207" [enwc-wicd-prop-values enwc-wicd-prop-num enwc-wicd-details-list x --dolist-tail-- id nil 0 enwc-wicd-get-wireless-network-property #1=#:timeout run-with-timer #[nil "\300\301\211\"\207" [throw #1#] 3] #[nil "\301!\207" [-with-timeout-timer- cancel-timer] 2] read-event 0.001 assoc "encryption" enwc-wicd-get-encryption-type "Unsecured" enwc-wicd-build-prop-list enwc-wicd-prop-timeout -with-timeout-timer- with-timeout-timers -with-timeout-value- enc-type] 5 (#$ . 4860)]) (defalias 'enwc-wicd-get-wireless-network-props 'enwc-wicd-get-wireless-nw-props) #@144 Wicd get encryption type function. This calls the D-Bus method on Wicd to get the encryption_method property from wireless network with id ID. (defalias 'enwc-wicd-get-encryption-type #[(id) "\301\302\303#\207" [id enwc-wicd-dbus-wireless-call-method "GetWirelessProperty" "encryption_method"] 4 (#$ . 5911)]) #@53 Get property DET from the wired network with id ID. (defalias 'enwc-wicd-get-wired-nw-prop #[(id det) "\302\303 #\207" [id det enwc-wicd-dbus-wired-call-method "GetWiredProperty"] 4 (#$ . 6228)]) (defalias 'enwc-wicd-get-wired-nw-props #[(id) "\210\301\207" [id ((name . "Wired Profile"))] 1]) (defalias 'enwc-wicd-get-network-props #[(id &optional wired) "\203\302 !\207\303 !\207" [wired id enwc-wicd-get-wired-nw-props enwc-wicd-get-wireless-network-props] 2]) #@114 Wicd connect function. This calls the D-Bus method on Wicd to connect to a wired or wireless network with id ID. (defalias 'enwc-wicd-connect #[(id &optional wired) "\203\302 !\207\303\304 \"\207" [wired id enwc-wicd-wired-connect enwc-wicd-dbus-wireless-call-method "ConnectWireless"] 3 (#$ . 6704)]) #@105 Wicd connect function. This calls the D-Bus method on Wicd to connect to a wireless network with id ID. (defalias 'enwc-wicd-wireless-connect #[(id) "\301\302\"\207" [id enwc-wicd-dbus-wireless-call-method "ConnectWireless"] 3 (#$ . 7016)]) #@50 Connect to the wired network with profile id ID. (defalias 'enwc-wicd-wired-connect #[(id) "\303  8\304\305\n\"\210\304\306!*\207" [profs id prf enwc-wicd-get-wired-profiles enwc-wicd-dbus-wired-call-method "ReadWiredNetworkProfile" "ConnectWired"] 3 (#$ . 7264)]) (defalias 'enwc-wicd-disconnect #[(&optional wired) "\203\301 \207\302 \207" [wired enwc-wicd-wired-disconnect enwc-wicd-wireless-disconnect] 1]) #@27 Wicd disconnect function. (defalias 'enwc-wicd-wireless-disconnect #[nil "\300\301!\207" [enwc-wicd-dbus-wireless-call-method "DisconnectWireless"] 2 (#$ . 7687)]) #@39 Disconnect from the wired connection. (defalias 'enwc-wicd-wired-disconnect #[nil "\300\301!\207" [enwc-wicd-dbus-wired-call-method "DisconnectWired"] 2 (#$ . 7857)]) #@131 Wicd get current network id function. The current network id is updated upon connect, so this jut returns the tracked network id. (defalias 'enwc-wicd-get-current-nw-id #[(wired-p) "\302\303! \203\f\304\202\305W\203\306\202)\207" [ap wired-p enwc-wicd-dbus-wireless-call-method "GetCurrentNetworkID" wired 0 nil] 2 (#$ . 8031)]) #@54 Return non-nil if currently connecting to a network. (defalias 'enwc-wicd-check-connecting #[nil "\300\301!\207" [enwc-wicd-dbus-wireless-call-method "CheckIfWirelessConnecting"] 2 (#$ . 8376)]) #@49 Return non-nil if connected to a wired network. (defalias 'enwc-wicd-is-wired #[nil "\300\301!??\207" [enwc-wicd-dbus-wired-call-method "GetWiredIP"] 2 (#$ . 8577)]) #@114 Set the network property PROP of the network with id ID to VAL. WIRED indicates whether this is a wired network. (defalias 'enwc-wicd-set-nw-prop #[(wired id prop val) "\203 \304\305 \n $\207\306\307 \n $\207" [wired id prop val enwc-wicd-dbus-wired-call-method "SetWiredProperty" enwc-wicd-dbus-wireless-call-method "SetWirelessProperty"] 5 (#$ . 8750)]) #@108 Save the network profile with for the network with id ID. WIRED indicates whether this is a wired network. (defalias 'enwc-wicd-save-nw-profile #[(wired id) "\203 \302\303 \"\207\304\305 \"\207" [wired id enwc-wicd-dbus-wired-call-method "SaveWiredNetworkProfile" enwc-wicd-dbus-wireless-call-method "SaveWirelessNetworkProfile"] 3 (#$ . 9115)]) #@147 Convert a list of phase settings PHASE into a string. The format of this string is "ENT0=VAL0 ENT1=VAL1 ... ENTN=VALN", for each entry in PHASE. (defalias 'enwc-wicd--phase-to-string #[(phase) "\301\302\303#\207" [phase mapconcat #[(ent) "\301\302@A#\207" [ent format "%s=%s"] 4] " "] 4 (#$ . 9470)]) #@193 Set the settings for network ID to SETTINGS and save the profile. The association list SETTINGS contains the settings for the network. WIRED indicates whether or not ID is a wired connection. (defalias 'enwc-wicd-save-nw-settings #[(id settings &optional wired) "\306\211\203w\n@\306\211 @\211\307=\203 \310 A\202e \311=\2039\312 A\2034\313 A!\2025\314\202e \315=\203I\316\317 A!\202e \320=\203Y\321\317 A!\202e\313 @! A\206d\322)\323\f $\210*\nA\211\204*\324\"\207" [settings setting --dolist-tail-- ent key #1=#:val nil addr "ip" sec-type "enctype" symbol-name "None" phase1 "phase1" enwc-wicd--phase-to-string phase2 "phase2" "" enwc-wicd-set-nw-prop enwc-wicd-save-nw-profile wired id] 6 (#$ . 9782)]) #@47 Callback for when the network status changes. (defalias 'enwc-wicd-wireless-prop-changed #[(state info) "\2050\304=\203\305\306\211\207 A@@ \205.\307 \233\205.\307 \233@@\205.\310\307 \233@@!\211\207" [state enwc-wicd-current-ap enwc-wicd-current-nw-id info 0 "" nil 3 string-to-number] 3 (#$ . 10534)]) #@24 Load the Wicd backend. (defalias 'enwc-wicd-load #[nil "\305\306 \n\307\310&\305\306\311\312\313&\211\207" [enwc-wicd-dbus-service enwc-wicd-dbus-wireless-path enwc-wicd-dbus-wireless-interface enwc-wicd-end-scan-signal enwc-wicd-status-changed-signal dbus-register-signal :system "SendEndScanSignal" enwc-process-scan "/org/wicd/daemon" "StatusChanged" enwc-wicd-wireless-prop-changed] 7 (#$ . 10856)]) #@84 Unload the Wicd back-end. Unregister all of the D-Bus signals set up during load. (defalias 'enwc-wicd-unload #[nil "\302!\210\302 !\207" [enwc-wicd-end-scan-signal enwc-wicd-status-changed-signal dbus-unregister-object] 2 (#$ . 11273)]) (defalias 'enwc-wicd-can-load-p #[nil "\301\302\"\207" [enwc-wicd-dbus-service dbus-ping :system] 3]) (byte-code "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316& !\210\317\320!\207" [enwc-register-backend record enwc-backend enwc enwc-wicd-can-load-p enwc-wicd-load enwc-wicd-unload enwc-wicd-get-networks enwc-wicd-scan enwc-wicd-get-network-props enwc-wicd-connect enwc-wicd-disconnect enwc-wicd-get-current-nw-id enwc-wicd-check-connecting enwc-wicd-is-wired provide enwc-wicd] 15)