Factor out SESSION-DATA and make it available in SURFLETS

This commit is contained in:
interp 2003-03-13 11:52:37 +00:00
parent 88e255d5de
commit fe70289bc6
2 changed files with 28 additions and 23 deletions

View File

@ -95,6 +95,10 @@
my-ids my-ids
instance-session-id)) instance-session-id))
(define-interface surflets/session-data-interface
(export get-session-data
set-session-data!))
;; Use for advanced users: access to your sessions and continuations ;; Use for advanced users: access to your sessions and continuations
;; and continuations (currently you get access to all sessions; this ;; and continuations (currently you get access to all sessions; this
;; should and will be restricted in the future) ;; should and will be restricted in the future)
@ -102,12 +106,11 @@
(compound-interface (compound-interface
surflets/ids-interface surflets/ids-interface
surflets/continuations-interface surflets/continuations-interface
surflets/session-data-interface
(export get-session (export get-session
;; That would be too much: ;; That would be too much:
;; get-sessions ;; get-sessions
delete-session! delete-session!
get-session-data
set-session-data!
instance-session-id instance-session-id
session-adjust-timeout! session-adjust-timeout!
adjust-timeout! adjust-timeout!
@ -117,21 +120,21 @@
options-cache-surflets?))) options-cache-surflets?)))
(define-interface surflets/sessions-interface (define-interface surflets/sessions-interface
(export get-session (compound-interface
get-sessions surflets/session-data-interface
delete-session! (export get-session
get-session-data get-sessions
set-session-data! delete-session!
instance-session-id instance-session-id
session-adjust-timeout! session-adjust-timeout!
adjust-timeout! adjust-timeout!
session-alive? session-alive?
session-surflet-name session-surflet-name
;; FIXME: This is too much and should be restricted: ;; FIXME: This is too much and should be restricted:
session-memo session-memo
session-continuation-table session-continuation-table
session-continuation-table-lock session-continuation-table-lock
session-continuation-counter)) session-continuation-counter)))
(define-interface surflet-handler/surflets-interface (define-interface surflet-handler/surflets-interface
(export get-loaded-surflets (export get-loaded-surflets
@ -338,7 +341,8 @@
surflets/input-fields-interface surflets/input-fields-interface
surflets/addresses-interface surflets/addresses-interface
surflets/returned-via-interface surflets/returned-via-interface
surflets/bindings-interface)) surflets/bindings-interface
surflets/session-data-interface))
;;; Structures ;;; Structures
;; structures from SUrflet Handler ;; structures from SUrflet Handler
@ -352,7 +356,8 @@
(surflet-handler/responses surflet-handler/responses-interface) (surflet-handler/responses surflet-handler/responses-interface)
(surflets/sessions surflets/sessions-interface) (surflets/sessions surflets/sessions-interface)
(surflets/continuations surflets/continuations-interface) (surflets/continuations surflets/continuations-interface)
(surflets/error surflets/error-interface)) (surflets/error surflets/error-interface)
(surflets/session-data surflets/session-data-interface))
(open define-record-types ;DEFINE-RECORD-TYPE (open define-record-types ;DEFINE-RECORD-TYPE
handle-fatal ;WITH-FATAL-ERROR-HANDLER* et al. handle-fatal ;WITH-FATAL-ERROR-HANDLER* et al.
handle-fatal-error handle-fatal-error
@ -382,9 +387,10 @@
;; SUrflets library of helping functions ;; SUrflets library of helping functions
(define-structure surflets surflets-interface (define-structure surflets surflets-interface
(open surflets/send-html (open surflets/session-data
surflets/send-html ;send-html/suspend...
surflets/input-fields surflets/input-fields
surflets/addresses surflets/addresses ;annotated-address...
surflets/returned-via surflets/returned-via
surflets/bindings)) surflets/bindings))
@ -442,7 +448,7 @@
;;; We have two names for the same thing to ease the use of structure ;;; We have two names for the same thing to ease the use of structure
;;; names: requests seem to be part of the surflet-handler, but are ;;; names: requests seem to be part of the surflet-handler, but are
;;; actually seperate files. If you know everything about SUrflets, ;;; actually seperate files. If you know everything about SUrflets,
;;; you use `surlfet-requests'. ;;; you use `surflet-requests'.
(define-structures (define-structures
((surflet-handler/requests surflet-handler/requests-interface) ((surflet-handler/requests surflet-handler/requests-interface)
(surflet-requests surflet-handler/requests-interface)) (surflet-requests surflet-handler/requests-interface))

View File

@ -1,7 +1,6 @@
(define-structure surflet surflet-interface (define-structure surflet surflet-interface
(open scheme-with-scsh (open scheme-with-scsh
surflets surflets
surflets/sessions
surflets/error surflets/error
profiling profiling
handle-fatal-error handle-fatal-error