2003-01-19 11:57:27 -05:00
|
|
|
;; Structures and interfaces for surflets.
|
2002-09-13 03:21:19 -04:00
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;;; Copyright 2002, 2003 Andreas Bernauer
|
|
|
|
;;; Copyright 2002 Martin Gasbichler
|
2002-09-13 03:21:19 -04:00
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;;; NOTE: SSAX/lib/packages.scm must be loaded before you can use this
|
|
|
|
;;; downloadable from
|
|
|
|
;;; http://sourceforge.net/project/showfiles.php?group_id=30687 (take
|
|
|
|
;;; the r5rs compliant version (ssax-sr5rs-plt200-4.9.tar.gz); and
|
|
|
|
;;; patch string->goodhtml in packages.scm to string->goodHTML)
|
2002-09-13 03:21:19 -04:00
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;;; Interfaces
|
|
|
|
;; Surflet Handler
|
2003-01-19 11:57:27 -05:00
|
|
|
(define-interface surflet-handler-interface
|
|
|
|
(export surflet-handler))
|
2002-09-13 03:21:19 -04:00
|
|
|
|
2003-03-09 14:18:35 -05:00
|
|
|
;; Responses from SUrflets
|
|
|
|
(define-interface surflet-handler/responses-interface
|
|
|
|
(export make-surflet-response
|
2003-07-05 14:13:32 -04:00
|
|
|
valid-surflet-response-data?
|
2003-03-09 14:18:35 -05:00
|
|
|
surflet-response?
|
|
|
|
surflet-response-status
|
|
|
|
surflet-response-content-type
|
|
|
|
surflet-response-headers
|
|
|
|
surflet-response-data))
|
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
;; SUrflet-requests as expected from the surflet handler
|
|
|
|
(define-interface surflet-handler/requests-interface
|
2003-06-03 03:36:48 -04:00
|
|
|
(export make-surflet-request ;FIXME? unusable for user
|
2003-03-13 06:36:49 -05:00
|
|
|
surflet-request?
|
|
|
|
surflet-request-request
|
|
|
|
surflet-request-input-port
|
|
|
|
surflet-request-method
|
|
|
|
surflet-request-uri
|
|
|
|
surflet-request-url
|
|
|
|
surflet-request-version
|
|
|
|
surflet-request-headers
|
|
|
|
surflet-request-socket))
|
|
|
|
|
|
|
|
(define-interface surflets/error-interface
|
|
|
|
(export send-error ;send error response
|
|
|
|
(status-code :syntax))) ;from httpd-responses
|
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;; Use for SUrflets
|
2003-03-13 06:36:49 -05:00
|
|
|
(define-interface surflet-handler/primitives-interface
|
2003-03-09 13:37:38 -05:00
|
|
|
(compound-interface
|
|
|
|
surflet-handler/responses-interface
|
2003-03-13 06:36:49 -05:00
|
|
|
surflet-handler/requests-interface
|
|
|
|
surflets/error-interface
|
2003-03-09 13:37:38 -05:00
|
|
|
(export send/suspend ;send and suspend
|
|
|
|
send/finish ;send and finish
|
|
|
|
send ;just send (no finish, no suspend)
|
|
|
|
)))
|
2002-09-13 03:21:19 -04:00
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
;; Send HTML-Strings (for advanced user)
|
|
|
|
(define-interface surflets/send-html-string-interface
|
|
|
|
(export send-html-string/suspend
|
|
|
|
send-html-string/finish
|
|
|
|
send-html-string))
|
|
|
|
|
|
|
|
;; Extensions/Exports to/from Olegs SSAX library
|
|
|
|
(define-interface surflets/sxml-interface
|
|
|
|
(export display-low-level-sxml
|
2003-05-04 10:04:54 -04:00
|
|
|
sxml->low-level-sxml ;direct map to pre-post-order
|
2003-03-13 06:36:49 -05:00
|
|
|
sxml->string
|
|
|
|
sxml->string/internal
|
|
|
|
sxml-attribute?
|
2003-04-16 08:30:57 -04:00
|
|
|
sxml-attribute-attributes
|
2003-03-13 06:36:49 -05:00
|
|
|
default-rule
|
|
|
|
text-rule
|
|
|
|
attribute-rule))
|
2003-03-09 13:37:38 -05:00
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
;; SUrflets' extensions to SXML
|
|
|
|
(define-interface surflets/surflet-sxml-interface
|
|
|
|
(export surflet-sxml->low-level-sxml
|
|
|
|
surflet-sxml-rules
|
|
|
|
surflet-form-rule
|
|
|
|
default-rules
|
|
|
|
plain-html-rule
|
2003-04-16 08:30:57 -04:00
|
|
|
nbsp-rule
|
2003-03-13 06:36:49 -05:00
|
|
|
url-rule))
|
|
|
|
|
|
|
|
;; Use for advanced users: make your own conversion rules.
|
|
|
|
(define-interface surflets/my-sxml-interface
|
|
|
|
(compound-interface
|
|
|
|
surflets/send-html-string-interface
|
|
|
|
surflets/sxml-interface
|
|
|
|
surflets/surflet-sxml-interface))
|
|
|
|
|
|
|
|
(define-interface surflets/continuations-interface
|
|
|
|
(export get-continuations
|
2003-04-16 12:02:37 -04:00
|
|
|
delete-continuation!
|
|
|
|
continuation-id))
|
2003-03-13 06:36:49 -05:00
|
|
|
|
|
|
|
;; Access to session-id and continuation-id
|
|
|
|
(define-interface surflets/ids-interface
|
|
|
|
(export my-session-id
|
|
|
|
my-continuation-id
|
|
|
|
my-ids
|
|
|
|
instance-session-id))
|
|
|
|
|
2003-03-13 06:52:37 -05:00
|
|
|
(define-interface surflets/session-data-interface
|
|
|
|
(export get-session-data
|
|
|
|
set-session-data!))
|
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
;; Use for advanced users: access to your sessions and continuations
|
2003-04-16 08:30:57 -04:00
|
|
|
;; (currently you get access to all sessions; this should and will be
|
|
|
|
;; restricted in the future)
|
2003-03-13 06:36:49 -05:00
|
|
|
(define-interface surflets/my-sessions-interface
|
|
|
|
(compound-interface
|
|
|
|
surflets/ids-interface
|
|
|
|
surflets/continuations-interface
|
2003-03-13 06:52:37 -05:00
|
|
|
surflets/session-data-interface
|
2003-03-13 06:36:49 -05:00
|
|
|
(export get-session
|
|
|
|
;; That would be too much:
|
|
|
|
;; get-sessions
|
|
|
|
delete-session!
|
|
|
|
instance-session-id
|
|
|
|
session-adjust-timeout!
|
|
|
|
adjust-timeout!
|
|
|
|
session-alive?
|
|
|
|
session-surflet-name
|
2003-04-16 12:02:37 -04:00
|
|
|
session-session-id
|
2004-07-27 09:45:26 -04:00
|
|
|
set-session-lifetime!
|
2003-04-13 16:24:56 -04:00
|
|
|
options-surflet-path
|
2003-03-13 06:36:49 -05:00
|
|
|
options-session-lifetime
|
2003-03-17 07:31:49 -05:00
|
|
|
options-cache-surflets?
|
|
|
|
options-make-session-timeout-text)))
|
2003-03-13 06:36:49 -05:00
|
|
|
|
|
|
|
(define-interface surflets/sessions-interface
|
2003-03-13 06:52:37 -05:00
|
|
|
(compound-interface
|
|
|
|
surflets/session-data-interface
|
|
|
|
(export get-session
|
|
|
|
get-sessions
|
|
|
|
delete-session!
|
|
|
|
instance-session-id
|
2003-03-31 05:56:28 -05:00
|
|
|
set-session-lifetime!
|
2003-03-13 06:52:37 -05:00
|
|
|
adjust-timeout!
|
2003-04-01 08:17:45 -05:00
|
|
|
session-adjust-timeout!
|
2003-03-13 06:52:37 -05:00
|
|
|
session-alive?
|
|
|
|
session-surflet-name
|
2003-04-16 12:02:37 -04:00
|
|
|
session-session-id ;faked
|
2003-03-13 06:52:37 -05:00
|
|
|
;; FIXME: This is too much and should be restricted:
|
|
|
|
session-continuation-table
|
|
|
|
session-continuation-table-lock
|
|
|
|
session-continuation-counter)))
|
2003-03-09 13:37:38 -05:00
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
(define-interface surflet-handler/surflets-interface
|
|
|
|
(export get-loaded-surflets
|
2004-07-27 10:19:44 -04:00
|
|
|
unload-surflet
|
|
|
|
reset-surflet-cache!))
|
2003-03-09 14:44:09 -05:00
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
(define-interface surflet-handler/options-interface
|
2003-03-17 07:31:49 -05:00
|
|
|
(export make-surflet-options
|
2003-04-13 16:24:56 -04:00
|
|
|
with-surflet-path
|
2003-03-17 07:31:49 -05:00
|
|
|
with-session-lifetime
|
|
|
|
with-cache-surflets?
|
|
|
|
with-make-session-timeout-text
|
2003-04-13 16:24:56 -04:00
|
|
|
options-surflet-path
|
2003-03-17 07:31:49 -05:00
|
|
|
options-session-lifetime
|
2003-03-13 06:36:49 -05:00
|
|
|
options-cache-surflets?
|
2003-03-17 07:31:49 -05:00
|
|
|
options-make-session-timeout-text
|
2003-04-13 16:24:56 -04:00
|
|
|
set-options-surflet-path!
|
2003-03-13 06:36:49 -05:00
|
|
|
set-options-session-lifetime!
|
2003-03-17 07:31:49 -05:00
|
|
|
set-options-cache-surflets?!
|
|
|
|
set-options-make-session-timeout-text))
|
2003-03-09 13:37:38 -05:00
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
(define-interface surflet-handler/resume-url-interface
|
|
|
|
(export resume-url?
|
2003-01-16 07:53:10 -05:00
|
|
|
resume-url-ids
|
|
|
|
resume-url-session-id
|
|
|
|
resume-url-continuation-id))
|
2002-09-30 10:43:15 -04:00
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
;; Use for adminstration of the Surflet Handler
|
|
|
|
(define-interface surflet-handler/admin-interface
|
|
|
|
(compound-interface
|
|
|
|
surflet-handler/surflets-interface
|
|
|
|
surflets/sessions-interface
|
|
|
|
surflets/continuations-interface
|
|
|
|
surflet-handler/resume-url-interface
|
|
|
|
surflet-handler/options-interface
|
|
|
|
))
|
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;; THE interface that SUrflets use.
|
2003-01-19 11:57:27 -05:00
|
|
|
(define-interface surflet-interface
|
2002-09-24 04:19:41 -04:00
|
|
|
(export main)) ; MAIN gets one parameter, the REQUEST
|
2002-09-14 12:48:59 -04:00
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;; Simple Surflet API as known from PLT
|
|
|
|
(define-interface simple-surflet-api-interface
|
|
|
|
(export single-query
|
|
|
|
queries
|
|
|
|
form-query
|
|
|
|
inform
|
|
|
|
final-page
|
2004-07-29 13:15:46 -04:00
|
|
|
make-text
|
2003-03-09 13:37:38 -05:00
|
|
|
make-password
|
|
|
|
make-number
|
|
|
|
make-boolean
|
|
|
|
make-radio
|
|
|
|
make-yes-no
|
|
|
|
extract/single
|
|
|
|
extract))
|
|
|
|
|
|
|
|
;; shift-reset
|
2002-09-14 12:48:59 -04:00
|
|
|
(define-interface shift-reset-interface
|
|
|
|
(export (reset :syntax)
|
|
|
|
(shift :syntax)))
|
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;; For memory profiling
|
2002-09-14 12:48:59 -04:00
|
|
|
(define-interface profiling-interface
|
|
|
|
(export profile-space
|
|
|
|
profile-result
|
|
|
|
profile-results
|
|
|
|
write-gnuplot-data-file
|
|
|
|
|
|
|
|
space-info-pair space-info-symbol
|
|
|
|
space-info-vector space-info-closure
|
|
|
|
space-info-location space-info-cell
|
|
|
|
space-info-channel space-info-port
|
|
|
|
space-info-ratnum space-info-record
|
|
|
|
space-info-continuation space-info-extended-number
|
|
|
|
space-info-template space-info-weak-pointer
|
|
|
|
space-info-shared-binding space-info-unused-d-header1
|
|
|
|
space-info-unused-d-header2 space-info-string
|
|
|
|
space-info-byte-vector space-info-double
|
|
|
|
space-info-bignum space-info-total
|
|
|
|
|
|
|
|
set-space-info-pair! set-space-info-symbol!
|
|
|
|
set-space-info-vector! set-space-info-closure!
|
|
|
|
set-space-info-location! set-space-info-cell!
|
|
|
|
set-space-info-channel! set-space-info-port!
|
|
|
|
set-space-info-ratnum! set-space-info-record!
|
|
|
|
set-space-info-continuation! set-space-info-extended-number!
|
|
|
|
set-space-info-template! set-space-info-weak-pointer!
|
|
|
|
set-space-info-shared-binding! set-space-info-unused-d-header1!
|
|
|
|
set-space-info-unused-d-header2! set-space-info-string!
|
|
|
|
set-space-info-byte-vector! set-space-info-double!
|
|
|
|
set-space-info-bignum! set-space-info-total!
|
|
|
|
|
|
|
|
pure-count pure-bytes
|
|
|
|
impure-count impure-bytes
|
|
|
|
total-count total-bytes
|
|
|
|
))
|
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;; Handling every condition
|
|
|
|
(define-interface handle-fatal-interface
|
|
|
|
(export with-fatal-handler*
|
|
|
|
(with-fatal-handler :syntax)))
|
|
|
|
|
|
|
|
;; Thread-safe counter
|
|
|
|
(define-interface thread-safe-counter-interface
|
|
|
|
(export make-thread-safe-counter
|
|
|
|
thread-safe-counter-value
|
|
|
|
thread-safe-counter-next!
|
|
|
|
thread-safe-counter?))
|
|
|
|
|
2003-04-13 13:23:11 -04:00
|
|
|
(define-interface with-locks-interface
|
2003-04-13 13:36:39 -04:00
|
|
|
(export with-lock*
|
|
|
|
(with-lock :syntax)))
|
2003-04-13 13:23:11 -04:00
|
|
|
|
2003-04-16 08:30:57 -04:00
|
|
|
;; Input-fields as Scheme-Objects
|
|
|
|
(define-interface surflets/input-field-value-interface
|
|
|
|
(export input-field?
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
raw-input-field-value
|
2003-04-16 08:30:57 -04:00
|
|
|
input-field-value
|
|
|
|
input-field-binding))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
2003-04-16 08:30:57 -04:00
|
|
|
;; For advanced users: creating your own input-fields
|
|
|
|
(define-interface surflets/my-input-fields-interface
|
|
|
|
(compound-interface
|
|
|
|
surflets/input-field-value-interface
|
2003-07-11 07:38:28 -04:00
|
|
|
(export generate-input-field-name
|
2003-04-16 08:30:57 -04:00
|
|
|
make-input-field
|
|
|
|
make-multi-input-field
|
|
|
|
input-field-name
|
|
|
|
input-field-type
|
|
|
|
input-field-transformer
|
|
|
|
input-field-attributes
|
|
|
|
input-field-html-tree-maker
|
|
|
|
input-field-html-tree
|
|
|
|
input-field-multi?
|
|
|
|
set-input-field-attributes!
|
|
|
|
touch-input-field!)))
|
|
|
|
|
2003-07-11 07:38:28 -04:00
|
|
|
;; For internal use: special exports to create
|
|
|
|
;; SXL-rules for input-fields
|
|
|
|
(define-interface surflets/internal-input-fields-interface
|
|
|
|
(export *input-field-trigger*
|
|
|
|
make-sxml-input-field))
|
|
|
|
|
2003-04-16 08:30:57 -04:00
|
|
|
(define-interface surflets/surflet-input-fields-interface
|
|
|
|
(compound-interface
|
|
|
|
surflets/input-field-value-interface
|
2003-07-08 17:22:06 -04:00
|
|
|
(export make-text-field
|
|
|
|
set-text-field-value!
|
2003-04-16 08:30:57 -04:00
|
|
|
|
2003-07-08 17:22:06 -04:00
|
|
|
make-number-field
|
|
|
|
set-number-field-value!
|
2003-04-16 08:30:57 -04:00
|
|
|
|
2003-07-08 17:22:06 -04:00
|
|
|
make-hidden-field
|
|
|
|
set-hidden-field-value!
|
2003-04-16 08:30:57 -04:00
|
|
|
|
2003-07-08 17:22:06 -04:00
|
|
|
make-password-field
|
|
|
|
set-password-field-value!
|
|
|
|
|
|
|
|
make-textarea
|
|
|
|
set-textarea-value!
|
|
|
|
|
|
|
|
make-select
|
|
|
|
make-annotated-select
|
|
|
|
make-simple-select-option
|
|
|
|
make-annotated-select-option
|
|
|
|
select-option?
|
|
|
|
select-select-option!
|
|
|
|
unselect-select-option!
|
|
|
|
add-select-option!
|
|
|
|
delete-select-option!
|
|
|
|
set-select-option-selected?!
|
2003-04-16 08:30:57 -04:00
|
|
|
|
2003-07-08 17:22:06 -04:00
|
|
|
make-radio-group
|
|
|
|
make-annotated-radio-group
|
|
|
|
make-radios
|
|
|
|
check-radio!
|
|
|
|
uncheck-radio!
|
|
|
|
set-radio-checked?!
|
|
|
|
|
|
|
|
make-checkbox
|
|
|
|
make-annotated-checkbox
|
|
|
|
check-checkbox!
|
|
|
|
uncheck-checkbox!
|
|
|
|
set-checkbox-checked?!
|
2003-04-16 08:30:57 -04:00
|
|
|
|
|
|
|
make-submit-button
|
|
|
|
make-reset-button
|
|
|
|
make-image-button)))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
|
|
|
;; Some utilities
|
|
|
|
(define-interface surflets/utilities-interface
|
|
|
|
(export form-query-list
|
|
|
|
rev-append
|
2003-04-15 09:55:00 -04:00
|
|
|
generate-unique-number
|
2003-04-16 08:30:57 -04:00
|
|
|
generate-unique-name
|
|
|
|
identity))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
|
|
|
;; Intelligent Addresses
|
|
|
|
(define-interface surflets/addresses-interface
|
|
|
|
(export make-address
|
|
|
|
make-annotated-address
|
2003-04-13 17:31:41 -04:00
|
|
|
address-name
|
|
|
|
address-annotated?
|
|
|
|
; address-add-annotation!
|
|
|
|
address-annotation))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
2003-04-14 04:30:27 -04:00
|
|
|
(define-interface surflets/callbacks-interface
|
|
|
|
(export make-callback
|
2003-04-16 12:02:37 -04:00
|
|
|
make-annotated-callback
|
2003-08-01 11:02:43 -04:00
|
|
|
callback-function))
|
2003-04-14 04:30:27 -04:00
|
|
|
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
;; Returned-via (dispatcher for input-fields and intelligent
|
|
|
|
;; addresses)
|
|
|
|
(define-interface surflets/returned-via-interface
|
|
|
|
(export returned-via
|
|
|
|
returned-via?
|
|
|
|
(case-returned-via :syntax)))
|
|
|
|
|
|
|
|
;; Outdater denies access to outdated object
|
|
|
|
(define-interface surflets/outdaters-interface
|
|
|
|
(export make-outdater
|
|
|
|
(if-outdated :syntax)
|
|
|
|
show-outdated))
|
|
|
|
|
|
|
|
;; Access to form bindings in URL
|
|
|
|
(define-interface surflets/bindings-interface
|
|
|
|
(export get-bindings
|
|
|
|
get-content-length
|
|
|
|
extract-bindings
|
|
|
|
extract-single-binding))
|
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
;; HTML-Extensions to send/suspend et al. (for basic user)
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(define-interface surflets/send-html-interface
|
|
|
|
(export send-html/suspend
|
|
|
|
send-html/finish
|
|
|
|
send-html))
|
|
|
|
|
2006-07-10 08:02:39 -04:00
|
|
|
(define-interface surflets/send-xml-interface
|
|
|
|
(export send-xml/finish
|
|
|
|
send-xml/suspend))
|
2003-03-13 06:36:49 -05:00
|
|
|
|
|
|
|
;; Helping functions for surflets (for basic user)
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(define-interface surflets-interface
|
|
|
|
(compound-interface
|
2003-03-13 06:36:49 -05:00
|
|
|
; surflet-handler/surflets-interface;
|
|
|
|
; surflets/sxml-interface
|
|
|
|
; surflets/surflet-sxml-interface
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
surflets/send-html-interface
|
2003-04-16 08:30:57 -04:00
|
|
|
surflets/surflet-input-fields-interface
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
surflets/addresses-interface
|
|
|
|
surflets/returned-via-interface
|
2003-03-13 06:52:37 -05:00
|
|
|
surflets/bindings-interface
|
|
|
|
surflets/session-data-interface))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
|
|
|
;;; Structures
|
2003-03-09 13:37:38 -05:00
|
|
|
;; structures from SUrflet Handler
|
|
|
|
(define-structures
|
|
|
|
((surflet-handler surflet-handler-interface)
|
|
|
|
(surflet-handler/surflets surflet-handler/surflets-interface)
|
2003-03-13 06:36:49 -05:00
|
|
|
(surflet-handler/options surflet-handler/options-interface)
|
|
|
|
(surflet-handler/resume-url surflet-handler/resume-url-interface)
|
2003-03-09 13:37:38 -05:00
|
|
|
(surflet-handler/admin surflet-handler/admin-interface)
|
2003-03-13 06:36:49 -05:00
|
|
|
(surflet-handler/primitives surflet-handler/primitives-interface)
|
|
|
|
(surflets/sessions surflets/sessions-interface)
|
|
|
|
(surflets/continuations surflets/continuations-interface)
|
2003-03-13 06:52:37 -05:00
|
|
|
(surflets/error surflets/error-interface)
|
|
|
|
(surflets/session-data surflets/session-data-interface))
|
2003-03-09 13:37:38 -05:00
|
|
|
(open define-record-types ;DEFINE-RECORD-TYPE
|
|
|
|
handle-fatal ;WITH-FATAL-ERROR-HANDLER* et al.
|
|
|
|
handle-fatal-error
|
|
|
|
httpd-errors ;errors for httpd
|
|
|
|
httpd-logging ;HTTP-SYSLOG
|
|
|
|
httpd-requests ;requests from httpd
|
|
|
|
httpd-responses ;replies for httpd
|
2003-03-10 07:57:44 -05:00
|
|
|
let-opt ;:OPTIONAL
|
2003-03-09 13:37:38 -05:00
|
|
|
locks ;MAKE-LOCK et al.
|
|
|
|
profiling ;PROFILE-SPACE
|
2005-05-03 08:39:31 -04:00
|
|
|
rt-modules ;get structures dynamically
|
2003-03-09 13:37:38 -05:00
|
|
|
scheme-with-scsh ;regexp et al.
|
2003-04-13 13:23:11 -04:00
|
|
|
search-trees
|
2003-03-09 13:37:38 -05:00
|
|
|
shift-reset ;SHIFT and RESET
|
2003-04-13 13:23:11 -04:00
|
|
|
(subset srfi-1 (alist-cons alist-delete!))
|
2003-03-09 13:37:38 -05:00
|
|
|
srfi-6 ;string-ports
|
|
|
|
srfi-14 ;CHAR-SET:DIGIT
|
|
|
|
srfi-27 ;random numbers
|
|
|
|
surflet-requests ;requests for surflets
|
2003-07-05 14:13:32 -04:00
|
|
|
surflet-responses ;responses from surflets
|
2003-03-09 13:37:38 -05:00
|
|
|
sxml-to-html ;SXML->HTML
|
|
|
|
tables ;HASH-TABLES
|
|
|
|
thread-cells ;THREAD-CELL et al.
|
|
|
|
thread-fluids ;FORK-THREAD
|
|
|
|
thread-safe-counter
|
|
|
|
threads ;SLEEP
|
|
|
|
uri ;URI-PATH-LIST->PATH
|
2003-04-13 13:23:11 -04:00
|
|
|
with-locks ;WITH-LOCK
|
2003-03-09 13:37:38 -05:00
|
|
|
)
|
|
|
|
(files surflet-handler))
|
|
|
|
|
|
|
|
;; SUrflets library of helping functions
|
|
|
|
(define-structure surflets surflets-interface
|
2003-03-13 06:52:37 -05:00
|
|
|
(open surflets/session-data
|
|
|
|
surflets/send-html ;send-html/suspend...
|
2003-04-16 08:30:57 -04:00
|
|
|
surflets/surflet-input-fields
|
2003-03-13 06:52:37 -05:00
|
|
|
surflets/addresses ;annotated-address...
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
surflets/returned-via
|
|
|
|
surflets/bindings))
|
2003-03-09 13:37:38 -05:00
|
|
|
|
2006-07-10 08:02:39 -04:00
|
|
|
(define-structure surflets/send-xml surflets/send-xml-interface
|
|
|
|
(open scheme
|
|
|
|
surflets/sxml
|
|
|
|
surflets/my-sxml
|
|
|
|
surflet-handler/primitives
|
|
|
|
surflet-handler/responses)
|
|
|
|
(files send-xml))
|
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
;; SUrflets library for advanced users: make and use your own
|
|
|
|
;; conversion rules.
|
|
|
|
(define-structure surflets/my-sxml surflets/my-sxml-interface
|
|
|
|
(open surflets/send-html-string
|
|
|
|
surflets/sxml
|
|
|
|
surflets/surflet-sxml))
|
|
|
|
|
2003-03-13 13:32:43 -05:00
|
|
|
;; SUrflets librarary for advanced users: access to session and
|
|
|
|
;; continuations and stuff.
|
|
|
|
(define-structure surflets/my-sessions surflets/my-sessions-interface
|
|
|
|
(open surflets/ids
|
|
|
|
surflets/continuations
|
|
|
|
surflets/session-data
|
|
|
|
surflet-handler/surflets
|
|
|
|
surflets/sessions
|
|
|
|
surflet-handler/options))
|
|
|
|
|
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;; Shift-Reset
|
|
|
|
(define-structure shift-reset shift-reset-interface
|
|
|
|
(open scheme
|
|
|
|
signals
|
|
|
|
escapes
|
|
|
|
thread-cells)
|
|
|
|
(files shift-reset))
|
|
|
|
|
|
|
|
;; Measuring memory usage.
|
2002-09-14 12:48:59 -04:00
|
|
|
(define-structure profiling profiling-interface
|
|
|
|
(open let-opt
|
|
|
|
define-record-types
|
|
|
|
spatial
|
|
|
|
srfi-13
|
|
|
|
srfi-1
|
2002-09-18 11:32:41 -04:00
|
|
|
locks
|
2003-02-19 13:47:04 -05:00
|
|
|
scheme-with-scsh)
|
2002-09-21 16:20:29 -04:00
|
|
|
(files profile))
|
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;; Simple Surflet API as known from PLT.
|
2003-01-19 11:57:27 -05:00
|
|
|
(define-structure simple-surflet-api simple-surflet-api-interface
|
2003-02-19 13:47:04 -05:00
|
|
|
(open scheme-with-scsh
|
2002-11-03 12:43:58 -05:00
|
|
|
define-record-types
|
|
|
|
let-opt
|
2003-01-19 11:57:27 -05:00
|
|
|
surflets
|
2003-04-16 08:30:57 -04:00
|
|
|
surflets/surflet-input-fields
|
2002-11-09 12:17:14 -05:00
|
|
|
(subset srfi-1 (zip filter find make-list))
|
2002-11-03 12:43:58 -05:00
|
|
|
handle-fatal-error
|
|
|
|
)
|
2003-01-22 07:53:46 -05:00
|
|
|
(files simple-surflet-api))
|
2003-01-25 11:09:03 -05:00
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;; Handling every condition
|
2003-01-25 11:09:03 -05:00
|
|
|
(define-structure handle-fatal handle-fatal-interface
|
|
|
|
(open scheme conditions handle)
|
|
|
|
(files handle-fatal))
|
|
|
|
|
|
|
|
|
2003-03-09 13:37:38 -05:00
|
|
|
;; Thread-safe counter
|
2003-01-25 11:09:03 -05:00
|
|
|
(define-structure thread-safe-counter thread-safe-counter-interface
|
|
|
|
(open scheme
|
|
|
|
locks
|
|
|
|
define-record-types)
|
2003-02-17 05:09:24 -05:00
|
|
|
(files thread-safe-counter))
|
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
;; SUrflet-requests as expected from the SUrflet handler
|
|
|
|
;;; 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
|
|
|
|
;;; actually seperate files. If you know everything about SUrflets,
|
2003-03-13 06:52:37 -05:00
|
|
|
;;; you use `surflet-requests'.
|
2003-03-13 06:36:49 -05:00
|
|
|
(define-structures
|
|
|
|
((surflet-handler/requests surflet-handler/requests-interface)
|
|
|
|
(surflet-requests surflet-handler/requests-interface))
|
2003-02-17 05:09:24 -05:00
|
|
|
(open scheme
|
|
|
|
define-record-types
|
|
|
|
httpd-requests)
|
|
|
|
(files surflet-request))
|
|
|
|
|
2003-07-05 14:13:32 -04:00
|
|
|
(define-structures
|
|
|
|
((surflet-handler/responses surflet-handler/responses-interface)
|
|
|
|
(surflet-responses surflet-handler/responses-interface))
|
|
|
|
(open scheme-with-scsh
|
|
|
|
define-record-types)
|
|
|
|
(files surflet-response))
|
|
|
|
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
;; Extensions to Olegs SSAX library
|
|
|
|
(define-structure surflets/sxml surflets/sxml-interface
|
|
|
|
(open scheme-with-scsh ;string-ports
|
|
|
|
(subset sxml-to-html (string->goodHTML entag))
|
|
|
|
(subset sxml-tree-trans (pre-post-order)))
|
|
|
|
(files sxml))
|
|
|
|
|
|
|
|
|
|
|
|
;; Input fields as Scheme objects
|
2003-04-16 08:30:57 -04:00
|
|
|
(define-structures
|
|
|
|
((surflets/input-field-value surflets/input-field-value-interface)
|
2003-07-11 07:38:28 -04:00
|
|
|
(surflets/my-input-fields surflets/my-input-fields-interface)
|
|
|
|
(surflets/internal-input-fields surflets/internal-input-fields-interface))
|
2003-04-16 08:30:57 -04:00
|
|
|
(open scheme-with-scsh ;error, format
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(subset let-opt (:optional))
|
|
|
|
handle-fatal-error
|
|
|
|
define-record-types
|
|
|
|
surflets/sxml
|
2003-04-16 08:30:57 -04:00
|
|
|
surflets/utilities
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
)
|
|
|
|
(files input-fields))
|
|
|
|
|
2004-07-29 04:23:56 -04:00
|
|
|
(define-structure surflets/input-fields surflets/my-input-fields)
|
2003-04-16 08:30:57 -04:00
|
|
|
|
|
|
|
(define-structure surflets/surflet-input-fields
|
|
|
|
surflets/surflet-input-fields-interface
|
|
|
|
(open scheme-with-scsh ;error, format
|
|
|
|
;; avoid name collision for member
|
|
|
|
(modify srfi-1 (rename (member member/srfi-1)))
|
|
|
|
define-record-types
|
2003-07-09 13:18:57 -04:00
|
|
|
let-opt
|
2003-04-16 08:30:57 -04:00
|
|
|
surflets/my-input-fields
|
|
|
|
surflets/utilities ;generate-unique-number
|
|
|
|
surflets/sxml
|
|
|
|
tables ;make-integer-table
|
|
|
|
)
|
|
|
|
(files surflet-input-fields))
|
|
|
|
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
|
|
|
;; Extensions to SXML for surflets
|
|
|
|
(define-structure surflets/surflet-sxml surflets/surflet-sxml-interface
|
|
|
|
(open scheme-with-scsh ;error,receive
|
2003-07-11 07:38:28 -04:00
|
|
|
(subset surflets/my-input-fields (input-field-html-tree))
|
|
|
|
(subset surflets/internal-input-fields
|
|
|
|
(*input-field-trigger*
|
|
|
|
make-sxml-input-field))
|
|
|
|
surflets/utilities
|
|
|
|
(subset srfi-1 (make-list))
|
|
|
|
surflets/sxml)
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(files surflet-sxml))
|
|
|
|
|
|
|
|
|
|
|
|
;; Access to session-id and continuation-id
|
|
|
|
(define-structure surflets/ids surflets/ids-interface
|
|
|
|
(open scheme
|
|
|
|
(subset surflet-requests (surflet-request-url))
|
|
|
|
(subset srfi-1 (last))
|
|
|
|
(subset surflet-handler/admin
|
|
|
|
(instance-session-id
|
|
|
|
resume-url-session-id
|
|
|
|
resume-url-continuation-id
|
|
|
|
resume-url-ids))
|
|
|
|
(subset url (http-url-path)))
|
|
|
|
(files ids))
|
|
|
|
|
|
|
|
|
|
|
|
;; Some utilities
|
|
|
|
(define-structure surflets/utilities surflets/utilities-interface
|
|
|
|
(open scheme
|
2003-04-14 04:30:27 -04:00
|
|
|
parse-html-forms)
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(files utilities))
|
|
|
|
|
|
|
|
|
|
|
|
;; Intelligent Addresses
|
|
|
|
(define-structure surflets/addresses surflets/addresses-interface
|
|
|
|
(open scheme
|
|
|
|
srfi-23 ;error
|
|
|
|
(subset uri (escape-uri))
|
|
|
|
define-record-types
|
|
|
|
(subset surflets/utilities (generate-unique-name)))
|
|
|
|
(files addresses))
|
|
|
|
|
2003-04-14 04:30:27 -04:00
|
|
|
(define-structure surflets/callbacks surflets/callbacks-interface
|
|
|
|
(open scheme
|
|
|
|
srfi-23 ;error
|
|
|
|
surflets/addresses
|
|
|
|
(subset surflet-handler/primitives (send/suspend))
|
|
|
|
surflets/bindings
|
|
|
|
surflets/returned-via)
|
|
|
|
(files callbacks))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
|
|
|
(define-structure surflets/returned-via surflets/returned-via-interface
|
|
|
|
(open scheme
|
2003-04-16 08:30:57 -04:00
|
|
|
surflets/input-field-value
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
surflets/addresses
|
|
|
|
(subset uri (unescape-uri)))
|
|
|
|
(files returned-via))
|
|
|
|
|
|
|
|
(define-structure surflets/outdaters surflets/outdaters-interface
|
|
|
|
(open scheme
|
|
|
|
define-record-types
|
|
|
|
surflets/send-html)
|
|
|
|
(files outdater))
|
|
|
|
|
|
|
|
(define-structure surflets/bindings surflets/bindings-interface
|
|
|
|
(open scheme-with-scsh ;read-string,error
|
|
|
|
locks
|
|
|
|
weak ;weak pointers
|
|
|
|
surflets/utilities ;form-query-list
|
|
|
|
surflet-requests
|
|
|
|
(subset url (http-url-search))
|
|
|
|
(subset srfi-14 (char-set:digit))
|
2003-06-03 03:36:48 -04:00
|
|
|
(subset srfi-13 (string-index string-trim))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(subset srfi-1 (filter))
|
|
|
|
(subset sunet-utilities (get-header)))
|
|
|
|
(files bindings))
|
|
|
|
|
2003-03-13 06:36:49 -05:00
|
|
|
(define-structures
|
|
|
|
((surflets/send-html surflets/send-html-interface)
|
|
|
|
(surflets/send-html-string surflets/send-html-string-interface))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(open scheme
|
2003-03-13 06:36:49 -05:00
|
|
|
surflet-handler/primitives
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
surflets/sxml
|
|
|
|
surflets/surflet-sxml)
|
|
|
|
(files send-html))
|
|
|
|
|
2003-04-13 13:23:11 -04:00
|
|
|
(define-structure with-locks with-locks-interface
|
|
|
|
(open scheme
|
|
|
|
locks)
|
|
|
|
(files with-locks))
|
|
|
|
|
2003-04-16 12:02:37 -04:00
|
|
|
;;; EOF
|
|
|
|
;;; Local Variables:
|
2004-07-27 09:45:26 -04:00
|
|
|
;;; buffer-tag-table: "../../../TAGS"
|
2003-04-16 12:02:37 -04:00
|
|
|
;;; End::
|