[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d6bee52 32/76: (enwc-wicd.el): Fixed opening header.
From: |
Ian Dunn |
Subject: |
[elpa] master d6bee52 32/76: (enwc-wicd.el): Fixed opening header. |
Date: |
Thu, 23 Feb 2017 19:42:48 -0500 (EST) |
branch: master
commit d6bee529de4c8b2149ae06191762172e22768d96
Author: Ian D <address@hidden>
Commit: Ian D <address@hidden>
(enwc-wicd.el): Fixed opening header.
(enwc-wicd-end-scan-signal, enwc-wicd-status-changed-signal): New variables.
(enwc-wicd-setup): Store registered signals.
(enwc-wicd-unload): New function to unregister signals.
---
lisp/enwc-wicd.el | 71 ++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 47 insertions(+), 24 deletions(-)
diff --git a/lisp/enwc-wicd.el b/lisp/enwc-wicd.el
index a637696..27a202e 100644
--- a/lisp/enwc-wicd.el
+++ b/lisp/enwc-wicd.el
@@ -1,30 +1,34 @@
;;; enwc-wicd.el --- The Wicd backend to ENWC
-;; Copyright (C) 2012,2013,2014 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2014 Free Software Foundation, Inc.
-;; Author: Ian Dunn
-;; Keywords: enwc, network, wicd, manager, nm
+;; 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 ENWC
+;; This file is part of GNU Emacs
-;; ENWC is free software; you can redistribute it and/or modify it
+;; 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.
-;; ENWC is distributed in the hope that it will be useful, but WITHOUT
+;; 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 ENWC; see the file COPYING. If not, write to the Free
+;; 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:
-;; TODO
+
+;; Wicd is one of the default supported back-ends for ENWC.
+
+;;; Code:
(require 'enwc)
@@ -62,9 +66,19 @@
'("essid" "bssid" "quality" "encryption" "channel")
"The list of the desired details to be obtained from each network.")
-(defvar enwc-wicd-current-ap "")
+(defvar enwc-wicd-current-ap ""
+ "Current access point.
+UNUSED")
+
+(defvar enwc-wicd-current-nw-id -1
+ "Id of the current network.
+UNUSED")
+
+(defvar enwc-wicd-end-scan-signal nil
+ "D-Bus signal object for the \"SendEndScanSignal\" signal.")
-(defvar enwc-wicd-current-nw-id -1)
+(defvar enwc-wicd-status-changed-signal nil
+ "D-Bus signal objects for the \"StatusChanged\" signal.")
(defun enwc-wicd-dbus-wireless-call-method (method &rest args)
"Calls D-Bus method METHOD with arguments ARGS within
@@ -399,19 +413,28 @@ WIRED indicates whether or not ID is a wired connection."
(defun enwc-wicd-setup ()
"Setup the Wicd backend."
;; Thanks to Michael Albinus for pointing out this signal.
- (dbus-register-signal :system
- enwc-wicd-dbus-service
- enwc-wicd-dbus-wireless-path
- enwc-wicd-dbus-wireless-interface
- "SendEndScanSignal"
- 'enwc-process-scan)
-
- (dbus-register-signal :system
- enwc-wicd-dbus-service
- "/org/wicd/daemon"
- enwc-wicd-dbus-service
- "StatusChanged"
- 'enwc-wicd-wireless-prop-changed))
+ (setq enwc-wicd-end-scan-signal
+ (dbus-register-signal :system
+ enwc-wicd-dbus-service
+ enwc-wicd-dbus-wireless-path
+ enwc-wicd-dbus-wireless-interface
+ "SendEndScanSignal"
+ 'enwc-process-scan))
+
+ (setq enwc-wicd-status-changed-signal
+ (dbus-register-signal :system
+ enwc-wicd-dbus-service
+ "/org/wicd/daemon"
+ enwc-wicd-dbus-service
+ "StatusChanged"
+ 'enwc-wicd-wireless-prop-changed)))
+
+(defun enwc-wicd-unload ()
+ "Unload the Wicd back-end.
+
+Unregister all of the D-Bus signals set up during load."
+ (dbus-unregister-object enwc-wicd-end-scan-signal)
+ (dbus-unregister-object enwc-wicd-status-changed-signal))
(provide 'enwc-wicd)
- [elpa] master 7a3c057 03/76: Added support for toggling the mode line display., (continued)
- [elpa] master 7a3c057 03/76: Added support for toggling the mode line display., Ian Dunn, 2017/02/23
- [elpa] master b5e612f 04/76: * enwc.el (enwc-display-networks, enwc-maybe-pretty-entry): Added support for colorizing the current network., Ian Dunn, 2017/02/23
- [elpa] master 89f9418 08/76: enwc.el (enwc-display-wireless-networks): Removed old comment., Ian Dunn, 2017/02/23
- [elpa] master d6aa3ee 02/76: Fixed up enwc-wicd network properties., Ian Dunn, 2017/02/23
- [elpa] master f77237c 12/76: (enwc-format-mode-line-string): Checks to confirm that scan data exists., Ian Dunn, 2017/02/23
- [elpa] master 3662795 23/76: (enwc-cm-scan, enwc-cm-dict-assoc, enwc-cm-get-network-props): Cleaned up code., Ian Dunn, 2017/02/23
- [elpa] master 01075fa 28/76: Fixed up docstrings., Ian Dunn, 2017/02/23
- [elpa] master 11443eb 34/76: enwc-setup.el: Fixed up header and footer., Ian Dunn, 2017/02/23
- [elpa] master 561f9e1 27/76: (enwc-wicd-get-profile-info, enwc-wicd-get-profile-sec-info): Improved docstring., Ian Dunn, 2017/02/23
- [elpa] master cb32122 13/76: (enwc-nm-prop-to-prop, enwc-wicd-prop-to-prop): Convert the properties used internally to the property names used externally., Ian Dunn, 2017/02/23
- [elpa] master d6bee52 32/76: (enwc-wicd.el): Fixed opening header.,
Ian Dunn <=
- [elpa] master 5088938 40/76: Removed erroneous comment., Ian Dunn, 2017/02/23
- [elpa] master 17f27c6 18/76: (enwc-nm-prop-to-prop, enwc-nm-get-sec-types): Removed., Ian Dunn, 2017/02/23
- [elpa] master ee90297 31/76: (enwc-nm.el): Fixed several docstrings, and file header., Ian Dunn, 2017/02/23
- [elpa] master 4e0d5a2 41/76: Cosmetic changes., Ian Dunn, 2017/02/23
- [elpa] master 8f21449 45/76: Removed tag 2.0, Ian Dunn, 2017/02/23
- [elpa] master ec0539b 42/76: Fixed enwc-setup to be able to be called more than once., Ian Dunn, 2017/02/23
- [elpa] master 5c63470 48/76: Fixed autoloads generation and added hgignore., Ian Dunn, 2017/02/23
- [elpa] master 43c98da 50/76: Changed enwc-last-scan to a hashtable., Ian Dunn, 2017/02/23
- [elpa] master c6585bb 47/76: Added autoloads, Ian Dunn, 2017/02/23
- [elpa] master 48e7aa4 55/76: Updated Makefile, Ian Dunn, 2017/02/23