aboutsummaryrefslogtreecommitdiffstats
path: root/l/src/config.lisp
diff options
context:
space:
mode:
authorTeddy Wing2021-02-27 19:12:07 +0100
committerTeddy Wing2021-02-27 19:12:07 +0100
commit4792097ca56f278344f18a0a78aaca1278fd146e (patch)
tree8c48974c3a68b955df597a7a5eaa8b7a3afdefa6 /l/src/config.lisp
parent5e0f58d30c08bd294539ede86757970d46cab4f6 (diff)
downloadextreload-4792097ca56f278344f18a0a78aaca1278fd146e.tar.bz2
Move everything from `l/` into the project root
This is the final project. Now that we got rid of the web extension and native host code, we can move the Lisp code to the root.
Diffstat (limited to 'l/src/config.lisp')
-rw-r--r--l/src/config.lisp54
1 files changed, 0 insertions, 54 deletions
diff --git a/l/src/config.lisp b/l/src/config.lisp
deleted file mode 100644
index ab973cd..0000000
--- a/l/src/config.lisp
+++ /dev/null
@@ -1,54 +0,0 @@
-(in-package :extreload)
-
-(defclass config ()
- ((socket-url
- :initarg :socket-url
- :reader socket-url
- :documentation "DevTools WebSocket URL")
- (extension-ids
- :initarg :extension-ids
- :reader extension-ids
- :documentation "Sequence of extension IDs")
- (reload-current-tab
- :initarg :reload-current-tab
- :initform nil
- :reader reload-current-tab
- :documentation "True if the current tab should be reloaded")
- (debug-output
- :initarg :debug-output
- :initform nil
- :reader debug-output
- :documentation "True to enable debug output")
-
- (ws-client
- :reader ws-client
- :documentation "WebSocket client")))
-
-(defmethod print-object ((object config) stream)
- (print-unreadable-object (object stream :type t)
- (with-slots (socket-url
- extension-ids
- reload-current-tab
- debug-output
- ws-client)
- object
- (format
- stream
- ":socket-url ~s :extension-ids ~s :reload-current-tab ~s :debug-output ~s :ws-client ~s"
- socket-url extension-ids reload-current-tab debug-output ws-client))))
-
-(defun make-config (&key socket-url
- extension-ids
- reload-current-tab
- debug-output)
- "Initialise a new config."
- (let ((config (make-instance 'config
- :socket-url socket-url
- :extension-ids extension-ids
- :reload-current-tab reload-current-tab
- :debug-output debug-output)))
-
- ;; Initialise a new websocket-driver client
- (setf (slot-value config 'ws-client) (wsd:make-client socket-url))
-
- config))