From 9ca0699deec7e00cae3176b976f5ce38da75d952 Mon Sep 17 00:00:00 2001 From: David Botton Date: Tue, 8 Feb 2022 17:59:29 -0500 Subject: [PATCH] add connection-body --- LICENSE | 3 ++- source/clog-base.lisp | 12 +++++++++++- source/clog.lisp | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 7b95972..5f5fb3e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ BSD 3-Clause License -Copyright (c) 2020-2021, David Botton +CLOG and the CLOG Builder +Copyright (c) 2020-2022, David Botton All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/source/clog-base.lisp b/source/clog-base.lisp index b1696d6..ca69eba 100644 --- a/source/clog-base.lisp +++ b/source/clog-base.lisp @@ -459,11 +459,21 @@ clog-obj that will persist regardless of thread. The event hooks are stored in this string based hash in the format of: \"html-id:event-name\" => #'event-handler. clog-* keys are reserved for internal use of clog. The key \"clog-body\" is set to the -clog-body of this connection.")) +clog-body of this connection and accessible with CONNECTION-BODY.")) (defmethod connection-data ((obj clog-obj)) (clog-connection:get-connection-data (connection-id obj))) +;;;;;;;;;;;;;;;;;;;;; +;; connection-body ;; +;;;;;;;;;;;;;;;;;;;;; + +(defgeneric connection-body (clog-obj) + (:documentation "Get connection's clog-body.")) + +(defmethod connection-body (clog-obj) + (connection-data-item clog-obj "clog-body")) + ;;;;;;;;;;;;;;;;;;;;;;;;;; ;; connection-data-item ;; ;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/source/clog.lisp b/source/clog.lisp index 6214b35..fdb944f 100644 --- a/source/clog.lisp +++ b/source/clog.lisp @@ -101,6 +101,7 @@ embedded in a native template application.)" "CLOG-Obj - Low Level" (connection-data generic-function) (connection-data-item generic-function) + (connection-body generic-function) (remove-connection-data-item generic-function) (validp generic-function)