[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b5686da 17/76: (enwc-wicd-get-sec-types): Removed.
From: |
Ian Dunn |
Subject: |
[elpa] master b5686da 17/76: (enwc-wicd-get-sec-types): Removed. |
Date: |
Thu, 23 Feb 2017 19:42:46 -0500 (EST) |
branch: master
commit b5686da56153358e91198f049861aae64428278b
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>
(enwc-wicd-get-sec-types): Removed.
(enwc-wicd-get-profile-info, enwc-wicd-get-profile-sec-info): Updated to
match the new interface.
---
lisp/enwc-wicd.el | 72 +++++++++++++------------------------------------------
1 file changed, 16 insertions(+), 56 deletions(-)
diff --git a/lisp/enwc-wicd.el b/lisp/enwc-wicd.el
index 5dfa555..bcfff67 100644
--- a/lisp/enwc-wicd.el
+++ b/lisp/enwc-wicd.el
@@ -59,7 +59,6 @@
:type 'string)
(defvar enwc-wicd-details-list
- ;;'("essid" "bssid" "quality" "encryption" "mode" "channel")
'("essid" "bssid" "quality" "encryption" "channel")
"The list of the desired details to be obtained from each network.")
@@ -255,12 +254,7 @@ so this jut returns the tracked network id."
(cond
(wired-p 'wired)
((< ap 0) nil)
- (t ap)))
- ;; (if wired
- ;; -1
- ;; (enwc-wicd-dbus-wireless-call-method "GetCurrentNetworkID"))
- )
-;;enwc-wicd-current-nw-id))
+ (t ap))))
;;;;;;;;;;;;;;;;;;;;;;
;; Check Connecting ;;
@@ -292,40 +286,6 @@ so this jut returns the tracked network id."
;; Get Profile Info
;;;;;;;;;;;;;;;;;;;;;
-(defun enwc-wicd-get-sec-types (wired)
- "Gets the list of security types.
-WIRED indicates whether this is a wired connection.
-The returned list will be in the format:
- (name . ((\"Name\" . \"DISPLAY-NAME\")
- (\"reqs\" . ((\"Display\" . \"id\") ...))))"
- (let (sec-types
- ret-list)
- (with-temp-buffer
- (insert-file-contents (concat "/etc/wicd/encryption/templates/active"
- (if wired
- "_wired")))
- (setq sec-types (split-string (buffer-string) "\n")))
- (setq ret-list
- (mapcar (lambda (x)
- (if (not (eq (length x) 0))
- (let (name reqs)
- (with-temp-buffer
- (insert-file-contents (concat
"/etc/wicd/encryption/templates/"
- x))
- (re-search-forward "name[ \t]*=[
\t]*\\([^\n]*\\)[\n]")
- (setq name (match-string 1))
- (re-search-forward "require[ \t]*\\([^\n]*\\)[\n]")
- (let ((str-reqs (split-string (match-string 1) "
")))
- (while str-reqs
- (setq reqs
- (append reqs
- (cons (cons (pop str-reqs)
- (pop str-reqs))
- nil)))))
- (cons x (cons (cons "Name" name) (cons (cons
"reqs" (cons reqs nil)) nil)))
- ))))
- sec-types))))
-
(defun enwc-wicd-get-profile-ent (wired id ent)
"Gets profile entry ENT from the network with id ID.
WIRED is set to indicate whether this is a wired network.
@@ -336,24 +296,24 @@ functions, allowing for a single function that checks for
wired."
(enwc-wicd-dbus-wireless-call-method "GetWirelessProperty" id ent)))
(defun enwc-wicd-get-profile-info (id &optional wired)
- (let ((dns-list (enwc-wicd-get-dns wired id)))
- (list (cons (cons "addr" (enwc-wicd-get-ip-addr wired id)) nil)
- (cons (cons "netmask" (enwc-wicd-get-netmask wired id)) nil)
- (cons (cons "gateway" (enwc-wicd-get-gateway wired id)) nil)
- (cons (cons "dns1" (nth 0 dns-list)) nil)
- (cons (cons "dns2" (nth 1 dns-list)) nil))))
+ "Get the profile for profile ID."
+ (let ((dns-list (enwc-wicd-get-dns wired id))
+ (sec-info (enwc-wicd-get-profile-sec-info)))
+ `((addr . ,(enwc-wicd-get-ip-addr wired id))
+ (netmask . ,(enwc-wicd-get-netmask wired id))
+ (gateway . ,(enwc-wicd-get-gateway wired id))
+ (dns1 . ,(nth 0 dns-list))
+ (dns2 . ,(nth 1 dns-list))
+ ,@sec-info)))
(defun enwc-wicd-get-profile-sec-info (id sec-type &optional wired)
"Get the security info for profile with id ID and security type SEC-TYPE."
- (let ((sec-reqs (cadr (assoc "reqs"
- (cdr (assoc sec-type
- (enwc-wicd-get-sec-types wired))))))
- ret-list)
- (setq ret-list
- (mapcar (lambda (x)
- (if (not (eq (length (cdr x)) 0))
- (cons (cdr x) (enwc-wicd-get-profile-ent wired id (car
x)))))
- sec-reqs))))
+ (mapcar
+ (lambda (ent)
+ (cons
+ (car ent)
+ (enwc-wicd-get-profile-ent wired id (symbol-name (car ent)))))
+ enwc-supplicant-alist))
(defun enwc-wicd-get-ip-addr (wired id)
"Gets the IP Address from the network with id ID.
- [elpa] master eb6b085 11/76: Fixed up copyright information., (continued)
- [elpa] master eb6b085 11/76: Fixed up copyright information., Ian Dunn, 2017/02/23
- [elpa] master 218aa82 25/76: Fixed prefix of customization group., Ian Dunn, 2017/02/23
- [elpa] master c9a94c8 44/76: Added tag 2.0 for changeset 3e2cab525cbc, Ian Dunn, 2017/02/23
- [elpa] master c4ac6fc 60/76: Fixed bug in 'enwc-load-default-backend', Ian Dunn, 2017/02/23
- [elpa] master b8697fd 62/76: Added force parameter to `enwc-load-backend'., Ian Dunn, 2017/02/23
- [elpa] master 2ebc214 01/76: Changed timeout on enwc-wicd-get-wireless-network-property., Ian Dunn, 2017/02/23
- [elpa] master 18e4a3a 06/76: Updated copyright notices., Ian Dunn, 2017/02/23
- [elpa] master 0d92006 09/76: (enwc-update-mode-line): Forces the mode line to update when ENWC updates its current signal., Ian Dunn, 2017/02/23
- [elpa] master 742b67a 19/76: Removed several network manager functions., Ian Dunn, 2017/02/23
- [elpa] master 773cef6 24/76: (enwc-backend-symbol-list): New variable., Ian Dunn, 2017/02/23
- [elpa] master b5686da 17/76: (enwc-wicd-get-sec-types): Removed.,
Ian Dunn <=
- [elpa] master 7914c48 10/76: (enwc-format-mode-line-string, enwc-update-mode-line): Added the option to customize the information displayed in the mode line., Ian Dunn, 2017/02/23
- [elpa] master 59ca546 20/76: (enwc--str-to-sym): Fixed., Ian Dunn, 2017/02/23
- [elpa] master 1722c02 33/76: enwc-cm.el: Fixed up header and footer., Ian Dunn, 2017/02/23
- [elpa] master c8a0397 29/76: Fixed some compilation errors in enwc.el., Ian Dunn, 2017/02/23
- [elpa] master bb68ed5 37/76: Added ignore rules for byte compiled files., Ian Dunn, 2017/02/23
- [elpa] master 6ed7137 43/76: Fix adding to global-mode-string., Ian Dunn, 2017/02/23
- [elpa] master 968e6f0 46/76: Added tag 2.0 for changeset cc2f7aa4ed36, Ian Dunn, 2017/02/23
- [elpa] master 2d5def6 36/76: (*-function): Removed., Ian Dunn, 2017/02/23
- [elpa] master d9cbdb9 39/76: Added some section headers., Ian Dunn, 2017/02/23
- [elpa] master 03a5464 57/76: Changed channel to an integer., Ian Dunn, 2017/02/23