Gauche-cgi-ext Reference Manual

For version 0.1.0

last update: Fri Aug 10 2007

http://www.fixedpoint.jp/gauche-cgi-ext/

Warning: still unstable.

API for Session

class: <cgi-session>

class: <cgi-session-meta>

The former abstracts the current session while the latter is its metaclass.


method: variables-of (session <cgi-session>)

Return an alist consisting of pairs (name . value) of session variables.


method: destroyed? (session <cgi-session>)

Return #t if session is destroyed.


method: timestamp-of (session <cgi-session>)

Return the timesampe of session.


parameter: *session-max-age*

parameter: *session-cookie-name*

parameter: *session-cookie-domain*

parameter: *session-cookie-path*

parameter: *session-cookie-max-age*

These are used for the setting of session. *session-max-age* represents the max age of session. *session-cookie-max-age*, *session-cookie-domain*, *session-cookie-path*, or *session-cookie-max-age* corresponds to the name, domain name, path, or max age of cookie of the session, respectively.


method: make-id (class <cgi-session-meta>)

THIS METHOD IS PRIVATE FOR IMPLEMENTATION OF SESSION:


method: valid-id? (class <cgi-session-meta>) id

THIS METHOD IS PRIVATE FOR IMPLEMENTATION OF SESSION:


method: set-variables (session <cgi-session>) vars

THIS METHOD IS PRIVATE FOR IMPLEMENTATION OF SESSION:


method: session-begin (class <cgi-session-meta>) &optional rest

Begin a session of class class, and return it.


method: session-get (session <cgi-session>) symbol &optional opt

Return the value of name symbol.


method: session-set (session <cgi-session>) &optional rest

Set the session variables, e.g.:


method: session-close (session <cgi-session>)

Save and close the session.


method: session-destroy (session <cgi-session>)

Destroy the session.


macro: session-let

macro: session-and-let*

A utility for binding variables according to session variables.


Miscellaneous

macro: cgi-let-parameter

macro: cgi-and-let*-parameter

A utility for bining variables according to cgi parameters.


© 2007 Takeshi Abe