emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master b673e3a 63/76: Added default setup and removed experimenta


From: Ian Dunn
Subject: [elpa] master b673e3a 63/76: Added default setup and removed experimental WPA supplicant backend.
Date: Thu, 23 Feb 2017 19:42:54 -0500 (EST)

branch: master
commit b673e3a1991257483e0d0185537e0da19e93a1dc
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>

    Added default setup and removed experimental WPA supplicant backend.
---
 lisp/enwc-setup.el | 59 ++++++++++++++++++++++++++++++++++++++++++
 lisp/enwc-wpa.el   | 76 ------------------------------------------------------
 2 files changed, 59 insertions(+), 76 deletions(-)

diff --git a/lisp/enwc-setup.el b/lisp/enwc-setup.el
new file mode 100644
index 0000000..5c463c7
--- /dev/null
+++ b/lisp/enwc-setup.el
@@ -0,0 +1,59 @@
+;; enwc-setup.el - Setup routines for ENWC
+
+;; Copyright (C) 2012-2014 Free Software Foundation, Inc.
+
+;; Author: Ian Dunn <address@hidden>
+;; Keywords: network, wicd, manager, nm
+;; Version: 2.0
+;; Homepage: https://savannah.nongnu.org/p/enwc
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful, but WITHOUT
+;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+;; License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+;; 02110-1301, USA.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'enwc)
+(require 'enwc-backend)
+(require 'enwc-wicd)
+(require 'enwc-nm)
+
+;;;###autoload
+(defun enwc-setup ()
+  "Set up ENWC.
+This sets up ENWC and confirms that one of the backends can be found on D-Bus."
+  (when enwc-display-mode-line
+    (enwc-enable-display-mode-line))
+
+  (when (and enwc-auto-scan
+             (> enwc-auto-scan-interval 0)
+             (not enwc-scan-timer))
+    (setq enwc-scan-timer
+          (run-at-time t enwc-auto-scan-interval 'enwc-scan t)))
+
+  (let ((back-list enwc-backends)
+        cur-back pass)
+    (while (and back-list (not pass))
+      (setq cur-back (pop back-list))
+      (setq pass (ignore-errors (enwc-load-backend cur-back))))
+    (unless pass
+      (error "No usable backend was found."))))
+
+(provide 'enwc-setup)
+
+;;; enwc-setup.el ends here
diff --git a/lisp/enwc-wpa.el b/lisp/enwc-wpa.el
deleted file mode 100644
index 191ae71..0000000
--- a/lisp/enwc-wpa.el
+++ /dev/null
@@ -1,76 +0,0 @@
-;;; enwc-wpa.el --- Emacs Network Client WPA_CLI backend
-
-;; Copyright (C) 2012-2014 Free Software Foundation, Inc.
-
-;; Author: Ian Dunn <address@hidden>
-;; Keywords: external, network, wicd, manager, nm
-;; Version: 2.0
-;; Homepage: https://savannah.nongnu.org/p/enwc
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful, but WITHOUT
-;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
-;; License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the Free
-;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-;; 02110-1301, USA.
-
-;;; Commentary:
-;;
-;; Back-end driven by wpa_cli
-;;
-;; Requires root to use wpa_cli
-
-;;; Code:
-
-(require 'enwc)
-
-(defgroup enwc-wpa nil
-  "Settings for wpa_cli back-end."
-  :prefix "enwc-wpa-"
-  :group 'enwc)
-
-(defcustom enwc-wpa-wpa-cli-program "/usr/bin/wpa_cli"
-  "Name of the wpa_cli executable."
-  :group 'enwc-wpa
-  :type 'file)
-
-(defvar enwc-wpa--wpa-cli-buffer " *ENWC wpa_cli*")
-
-;; (defun enwc-wpa--run-wpa-cli (&rest args)
-;;   ;; Allow us to go into root.
-;;   (cd "/sudo::/")
-;;   (setq args (append
-;;               (list "-i" (if enwc-using-wired enwc-wired-device 
enwc-wireless-device))
-;;               args))
-;;   (apply #'call-process "wpa_cli" nil enwc-wpa--wpa-cli-buffer nil args))
-
-
-;; Load/Unload
-
-(defun enwc-wpa-load ()
-  ;; Start the wpa_cli process
-  ;; Start the wpa_supplicant process if necessary
-)
-
-
-; ;;;;;;;;;; ;
-; ;; Scan ;; ;
-; ;;;;;;;;;; ;
-
-(defun enwc-wpa-scan ()
-  "Run wpa_cli to get a scan"
-  (enwc-wpa--run-wpa-cli "scan")
-  ()
-  )
-
-;;; enwc-wpa.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]