Common Lisp bindings for the TrustCommerce transaction authorization
system

Matthew Danish <mrd@debian.org>

Copyright 2002

1 License

CL-TCLINK is licensed under the terms of the Lisp Lesser GNU Public License
(http://opensource.franz.com/preamble.html), known as the LLGPL. The LLGPL
consists of a preamble (see above URL) and the LGPL. Where these conflict, the
preamble takes precedence. CL-TCLINK is referenced in the preamble as the
"LIBRARY"

See file "LLGPL" for more details.

2 Installation

You can compile the C glue by typing ``make'' or by letting ASDF do it,
provided the tclink.asd file has the necessary code to do so (it should).

To compile/load the Lisp code, load your ASDF support if necessary and 
evaluate:
(load "tclink.asd")
(asdf:oos 'asdf:load-op 'tclink)

cCLan packages will be made available so this should all be automated.

3 Interface

The following symbols are exported from the CL-TCLINK package:

Constant

+PARAMETER-MAX-LENGTH+

The maximum length of a parameter name or value that is to
be transmitted.

Condition class

PARAMETER-TOO-LONG

Signalled when a parameter name or value that is too long
is passed to a CL-TCLINK function.

Function

WHICH-PARAMETER condition => 
parameter

Returns the name of the offending parameter for the given
condition.

Function

PARAMETER-VALUE condition => 
value

Returns the value of the offending parameter for the given
condition.

Function

CREATE =>  handle

Returns a handle that holds the state of parameters and return
values for a given transaction.

Function

DESTROY handle =>  unspecified

Frees the memory associated with the given handle.

Function

PUSH-PARAMETER handle name value => 
unspecified

Associates the given name with the given value for the given
handle.

Function

SEND handle =>  unspecified

Connects to a TrustCommerce server and sends the information
supplied through PUSH-PARAMETER or similar mechanisms.

Function

GET-RESPONSE handle name => 
value

Returns the value associated with name that was obtained
from the server when SEND was called on handle.

Function

GET-ENTIRE-RESPONSE handle &key (size 1024) => 
response

Returns an association list (name . value) containing all
the name/value associations obtained from the server.

Function

GET-VERSION &key (size 256) => 
version-string

Returns a version string.

Macro

WITH-HANDLE (handle) &body body

body is executed in an environment containing a new handle
that is bound to the variable named by handle. The handle
is destroyed upon exiting the dynamic scope of body.

Function

SEND-WITH-PARAMETERS parameters &optional (handle nil) => 
response

Given a handle, and an association-list (name . value) of
parameters, send to an available TrustCommerce server. If
handle is NIL, a new handle is created, used, and destroyed.
The entire response is returned, as if from GET-ENTIRE-RESPONSE.
