Main Page | Data Structures | File List | Data Fields | Globals

LassoCAPI.h File Reference

LassoCAPI Main Header File. More...

#include "osConfig.h"
#include "osErrors.h"
#include "RequestParams.h"
#include "LassoDefines.h"

Include dependency graph for LassoCAPI.h:

Include dependency graph

Data Structures

struct  lasso_value_t
 Used for retrieving data from some LCAPI functions. More...
struct  lasso_value_w_t
 Used for retrieving Unicode character data from some LCAPI functions. More...

Security Functions

typedef enum secure_operation_t secure_operation_t
 Various types of ways to access files.
enum  secure_operation_t {
  kInspectFiles, kCreateFiles, kDeleteFiles, kCopyFiles,
  kMoveFiles, kReadFiles, kWriteFiles, kAccessOutsideRoot
}
 Various types of ways to access files. More...
LCAPICALL osError lasso_isAdministrator (lasso_request_t token)
 Checks the current request for administrator privileges.
LCAPICALL osError lasso_isAnonymous (lasso_request_t token)
 Checks the current request for the lowest privilege level.
LCAPICALL osError lasso_switchToUser (lasso_request_t token, const char *username, const char *password)
 Switches the current request to the given user.
LCAPICALL osError lasso_operationAllowed (lasso_request_t token, secure_operation_t op, void *data)
 Tests for file access permissions.

Logging Functions

typedef enum log_level_t log_level_t
 The various log levels.
enum  log_level_t {
  LOG_LEVEL_CRITICAL, LOG_LEVEL_WARNING, LOG_LEVEL_DETAIL, LOG_LEVEL_ALWAYS,
  LOG_LEVEL_SQL, LOG_LEVEL_DEPRECATED
}
 The various log levels. More...
LCAPICALL osError lasso_logSetDestination (log_level_t msgLevel, int dest)
 Changes the system-wide log destination preference.
LCAPICALL osError lasso_log (log_level_t msgLevel, const char *fmt,...)
 Log a message.
const int flag_logDestinationConsole = 0x00000001
 Printed to the console.
const int flag_logDestinationFile = 0x00000002
 Written to the LassoErrors.txt file.
const int flag_logDestinationDatabase = 0x00000004
 Inserted into the errors table.

Tag Registration

These functions are called to register a new tag.

LCAPICALL osError lasso_registerTagModule (const char *namespaceName, const char *tagName, lasso_tag_func func, int flags, const char *description)
LCAPICALL osError lasso_registerTagModuleW (const UChar *namespaceName, const UChar *tagName, lasso_tag_func func, int flags, const UChar *description)

Datasource Module Registration

These functions are called to register a new datasource module.

LCAPICALL osError lasso_registerDSModule (const char *moduleName, lasso_ds_func func, int flags)
LCAPICALL osError lasso_registerDSModuleW (const UChar *moduleName, lasso_ds_func func, int flags)

Allocating Built-in Type Instances

The following functions allocate instances of specific built-in types. The lasso_request_t token may be null. If it is null, the allocated types are created as "detached" and must be manually freed using lasso_typeFree.

LCAPICALL osError lasso_typeAllocNull (lasso_request_t token, lasso_type_t *outNull)
LCAPICALL osError lasso_typeAllocString (lasso_request_t token, lasso_type_t *outString, const char *value, int length)
LCAPICALL osError lasso_typeAllocStringConv (lasso_request_t token, lasso_type_t *outString, const char *value, int length, const char *conv)
LCAPICALL osError lasso_typeAllocStringW (lasso_request_t token, lasso_type_t *outString, const UChar *value, int length)
LCAPICALL osError lasso_typeAllocInteger (lasso_request_t token, lasso_type_t *outInteger, osInt64 value)
LCAPICALL osError lasso_typeAllocDecimal (lasso_request_t token, lasso_type_t *outDecimal, double value)
LCAPICALL osError lasso_typeAllocDecimal2 (lasso_request_t token, lasso_type_t *outDecimal, double value, int precision)
LCAPICALL osError lasso_typeAllocPair (lasso_request_t token, lasso_type_t *outPair, lasso_type_t first, lasso_type_t second)
LCAPICALL osError lasso_typeAllocReference (lasso_request_t token, lasso_type_t *outRef, lasso_type_t referenced)
LCAPICALL osError lasso_typeAllocTag (lasso_request_t token, lasso_type_t *outTag, lasso_tag_func nativeTagFunction)
LCAPICALL osError lasso_typeAllocTagFromSource (lasso_request_t token, lasso_type_t *outTag, const char *source, int length)
LCAPICALL osError lasso_typeAllocArray (lasso_request_t token, lasso_type_t *outArray, int count, lasso_type_t *elements)
LCAPICALL osError lasso_typeAllocMap (lasso_request_t token, lasso_type_t *outMap, int count, lasso_type_t *elements)
LCAPICALL osError lasso_typeAllocBoolean (lasso_request_t token, lasso_type_t *outBool, bool inValue)

Getting or Setting Values of Built-in Type Instances

The following functions get and set the data on a previously created built-in type instance. When getting a value, the source type instance will not be altered. When setting a value, the provided type instance is converted, if required. The lasso_request_t token may be null.

LCAPICALL osError lasso_typeGetString (lasso_request_t token, lasso_type_t type, auto_lasso_value_t *val)
LCAPICALL osError lasso_typeGetStringConv (lasso_request_t token, lasso_type_t type, auto_lasso_value_t *val, const char *conv)
LCAPICALL osError lasso_typeGetStringW (lasso_request_t token, lasso_type_t type, auto_lasso_value_w_t *val)
LCAPICALL osError lasso_typeGetInteger (lasso_request_t token, lasso_type_t type, osInt64 *out)
LCAPICALL osError lasso_typeGetDecimal (lasso_request_t token, lasso_type_t type, double *out)
LCAPICALL osError lasso_typeGetBoolean (lasso_request_t token, lasso_type_t type, bool *out)
LCAPICALL osError lasso_typeSetString (lasso_request_t token, lasso_type_t type, const char *val, int len)
LCAPICALL osError lasso_typeSetStringW (lasso_request_t token, lasso_type_t type, const UChar *val, int len)
LCAPICALL osError lasso_typeSetStringConv (lasso_request_t token, lasso_type_t type, const char *val, int len, const char *conv)
LCAPICALL osError lasso_typeAppendString (lasso_request_t token, lasso_type_t type, const char *val, int len)
LCAPICALL osError lasso_typeAppendStringW (lasso_request_t token, lasso_type_t type, const UChar *val, int len)
LCAPICALL osError lasso_typeSetInteger (lasso_request_t token, lasso_type_t type, osInt64 val)
LCAPICALL osError lasso_typeSetDecimal (lasso_request_t token, lasso_type_t type, double val)
LCAPICALL osError lasso_typeSetDecimal2 (lasso_request_t token, lasso_type_t type, double val, int precision)
LCAPICALL osError lasso_typeSetBoolean (lasso_request_t token, lasso_type_t type, bool val)
LCAPICALL osError lasso_arrayGetSize (lasso_request_t token, lasso_type_t array, int *len)
LCAPICALL osError lasso_arrayGetElement (lasso_request_t token, lasso_type_t array, int index, lasso_type_t *out)
LCAPICALL osError lasso_arraySetElement (lasso_request_t token, lasso_type_t array, int index, lasso_type_t elem)
LCAPICALL osError lasso_arrayRemoveElement (lasso_request_t token, lasso_type_t array, int index)
LCAPICALL osError lasso_mapGetSize (lasso_request_t token, lasso_type_t mp, int *len)
LCAPICALL osError lasso_mapFindElement (lasso_request_t token, lasso_type_t mp, lasso_type_t key, lasso_type_t *out)
LCAPICALL osError lasso_mapGetNthElement (lasso_request_t token, lasso_type_t mp, int index, lasso_type_t *outPair)
LCAPICALL osError lasso_mapSetElement (lasso_request_t token, lasso_type_t mp, lasso_type_t key, lasso_type_t value)
LCAPICALL osError lasso_mapSetElementW (lasso_request_t token, lasso_type_t mp, const UChar *key, lasso_type_t value)
LCAPICALL osError lasso_mapRemoveElement (lasso_request_t token, lasso_type_t mp, lasso_type_t key)
LCAPICALL osError lasso_pairGetFirst (lasso_request_t token, lasso_type_t pr, lasso_type_t *out)
LCAPICALL osError lasso_pairGetSecond (lasso_request_t token, lasso_type_t pr, lasso_type_t *out)
LCAPICALL osError lasso_pairSetFirst (lasso_request_t token, lasso_type_t pr, lasso_type_t frst)
LCAPICALL osError lasso_pairSetSecond (lasso_request_t token, lasso_type_t pr, lasso_type_t scnd)

Datasource Module Functions

LCAPICALL osError lasso_addDataSourceResult (lasso_request_t token, const char *data)
 Adds a datasource result value.
LCAPICALL osError lasso_addDataSourceResultUTF8 (lasso_request_t token, const char *data)
 Adds a datasource result value.
LCAPICALL osError lasso_getDataSourceName (lasso_request_t token, auto_lasso_value_t *t, bool *useHostDefault, auto_lasso_value_t *usernamepassword)
 Gets the currently specified database name and associated data.
LCAPICALL osError lasso_getTableName (lasso_request_t token, auto_lasso_value_t *t)
 Gets the currently specified table name.
LCAPICALL osError lasso_getSchemaName (lasso_request_t token, auto_lasso_value_t *schema)
 Gets the currently specified schema name.
LCAPICALL osError lasso_getDataHost (lasso_request_t token, auto_lasso_value_t *host, auto_lasso_value_t *usernamepassword)
 Returns the host that maintains the current database.
LCAPICALL osError lasso_getDataHost2 (lasso_request_t token, auto_lasso_value_t *host, auto_lasso_value_t *defaultSchema, auto_lasso_value_t *usernamepassword)
 Returns the host that maintains the current database.
LCAPICALL osError lasso_getSkipRows (lasso_request_t token, int *recs)
 The number of rows that should be skipped in the found set.
LCAPICALL osError lasso_getMaxRows (lasso_request_t token, int *recs)
 The maximum number of rows in the found set to return.
LCAPICALL osError lasso_getRowID (lasso_request_t token, int *id)
 Gets the currently specified record id (FileMaker specific).
LCAPICALL osError lasso_setRowID (lasso_request_t token, int id)
 Sets the currently specified record id (FileMaker specific).
LCAPICALL osError lasso_getPrimaryKeyColumn (lasso_request_t token, auto_lasso_value_t *v)
 Gets the name and the value of the currently specified primary key column.
LCAPICALL osError lasso_getPrimaryKeyColumn2 (lasso_request_t token, int index, auto_lasso_value_t *v)
 Gets the name and the value of the primary key column specified by index.
LCAPICALL osError lasso_getInputColumnCount (lasso_request_t token, int *count)
 Gets the number of input columns for this database action.
LCAPICALL osError lasso_getSortColumnCount (lasso_request_t token, int *count)
 Gets the number of sort columns for this database action.
LCAPICALL osError lasso_getInputColumn (lasso_request_t token, int num, auto_lasso_value_t *v)
 Gets an individual input column by index.
LCAPICALL osError lasso_getSortColumn (lasso_request_t token, int num, auto_lasso_value_t *v)
 Gets an individual sort column by index.
LCAPICALL osError lasso_findInputColumn (lasso_request_t token, const char *name, auto_lasso_value_t *value)
 Gets an individual input column by name.
LCAPICALL osError lasso_findInputColumnW (lasso_request_t token, const UChar *name, auto_lasso_value_t *value)
 Gets an individual input column by name.
LCAPICALL osError lasso_getLogicalOp (lasso_request_t token, LP_TypeDesc *op)
 Gets the logical operator for this database action.
LCAPICALL osError lasso_getReturnColumnCount (lasso_request_t token, int *count)
 Gets the number of return columns for this action.
LCAPICALL osError lasso_getReturnColumn (lasso_request_t token, int num, auto_lasso_value_t *v)
 Gets an individual return column by index.
LCAPICALL osError lasso_addColumnInfo (lasso_request_t token, const char *name, int nullOK, LP_TypeDesc type, LP_TypeDesc protection)
 Adds information about a particular column.
LCAPICALL osError lasso_addColumnInfo2 (lasso_request_t token, const char *name, int nullOK, LP_TypeDesc type, LP_TypeDesc protection, const char **valueList, int countValueList)
 Adds information, including valuelists, about a particular column.
LCAPICALL osError lasso_addResultRow (lasso_request_t token, const char **columns, unsigned int *dataSizes, int numColumns)
 Add the column data for the next result row.
LCAPICALL osError lasso_setNumRowsFound (lasso_request_t token, int num)
 Sets the number of rows found in the query.
LCAPICALL osError lasso_getDataSourceModuleName (lasso_request_t token, auto_lasso_value_t *val)
 Returns the name the current datasource module was registered with.
LCAPICALL osError lasso_getDSConnection (lasso_request_t token, lasso_dsconnection_t *conn)
 Called to access the current datasource connection.
LCAPICALL osError lasso_setDSConnection (lasso_request_t token, lasso_dsconnection_t conn)
 Called to set the current connection for the datasource.
LCAPICALL osError lasso_setActionStatement (lasso_request_t token, const char *stat)
 Called to set the statement for the current action.
LCAPICALL osError lasso_setActionStatementW (lasso_request_t token, const UChar *stat)
 Called to set the statement for the current action.
LCAPICALL osError lasso_getIsStatementOnly (lasso_request_t token, bool *out)
 Used to check for the -statementonly inline param.

Semaphore Functions

Semephores are a means by which access to shared resources can be control amongst several threads of execution. Each semephore must have a unique name. Always release semaphores as soon as possible.

LCAPICALL osError lasso_createSem (lasso_request_t token, const char *name)
LCAPICALL osError lasso_destroySem (lasso_request_t token, const char *name)
LCAPICALL osError lasso_acquireSem (lasso_request_t token, const char *name)
LCAPICALL osError lasso_releaseSem (lasso_request_t token, const char *name)

Tag Registration Flags

The following flags may be OR'd together in various combinations and passed to lasso_registerTagModule or lasso_registerTagModuleW as the flags parameter to control how the tag behaves when it is called.

const int flag_typeInitializer = 0x00000001
 The tag is to be treated as an initializer for a custom type.
const int flag_typeSubstitutionTag = 0x00000002
 The tag is to be treated as a "regular" tag.
const int flag_typeAsync = 0x00000004
 The tag is to be run in its own thread.
const int flag_typeContainerTag = 0x00000008
 The tag is a container tag.
const int flag_typeInterstitial = 0x00000010
 Used internally.
const int flag_typeSkipSecurityCheck = 0x00000040
 Bypass any security checks for the tag.
const int flag_INTERNALONLY = 0x00000080
 Used internally.
const int flag_typeLoopingTag = 0x00000100
 The tag is a looping container tag.
const int flag_typeEval = 0x00000200
 Used internally.
const int flag_noGlobalImport = 0x00000400
 The tag should not be automatically imported into the global namespace.
const int flag_INTERNALONLY2 = 0x00000800
 Used internally.
const int flag_deprecated = 0x00001000
 Use of the tag is deprecated.
const int flag_noDefaultEncoding = 0x00002000
 Never apply default HTML encoding to the tag's return value.
const int flag_User1 = 0x01000000
 User defined flag.
const int flag_User2 = 0x02000000
 User defined flag.
const int flag_User3 = 0x03000000
 User defined flag.
const int flag_User4 = 0x04000000
 User defined flag.
const int REG_FLAGS_TAG_DEFAULT = (flag_typeSubstitutionTag | flag_noGlobalImport)
 Recommended default registration flags.
const int REG_FLAGS_CONTAINER_DEFAULT = (flag_typeContainerTag | flag_noGlobalImport)
 Recommended default registration flags.
const int REG_FLAGS_LOOPING_DEFAULT = (flag_typeLoopingTag | flag_noGlobalImport)
 Recommended default registration flags.
const int REG_FLAGS_TYPE_DEFAULT = (flag_typeInitializer | flag_noGlobalImport)
 Recommended default registration flags.

Defines

#define LCAPI_VERSION   4
#define LCAPI_VERSION_1   1
#define LCAPI_VERSION_2   2
#define LCAPI_VERSION_3   3
#define LCAPI_VERSION_4   LCAPI_VERSION
#define INITVAL(X)   { (X)->name = (X)->data = NULL; (X)->nameSize = (X)->dataSize = 0; }
 Initialize a lasso_value_t or lasso_value_w_t to be blank.
#define MAKE_REF(X)   lasso_typeAllocReference( token, &X, X )
 Changes the given type into a hard reference.

Typedefs

typedef lasso_value_t auto_lasso_value_t
typedef lasso_value_w_t auto_lasso_value_w_t
typedef int tag_action_t
 Types of actions tag modules could be called for.
typedef void * lasso_request_t
 Special value passed to modules that identify the request.
typedef void * lasso_type_t
 Represents a type within Lasso.
typedef void * lasso_dsconnection_t
 Represents a datasource module connection.
typedef osError(* lasso_ds_func )(lasso_request_t token, datasource_action_t action, const auto_lasso_value_t *param)
 Service function for Lasso Datasource modules.
typedef osError(* lasso_tag_func )(lasso_request_t token, tag_action_t action)
 Service function for a Lasso tag.
typedef void(* register_module_func )(void)
 LCAPI module registration callback.

Enumerations

enum  datasource_action_t {
  datasourceInit, datasourceTerm , datasourceNames, datasourceTableNames,
  datasourceSearch, datasourceAdd, datasourceUpdate, datasourceDelete,
  datasourceInfo, datasourceExecSQL, datasourceRandom, datasourceSchemaNames,
  datasourceCloseConnection, datasourceTickle , datasourceFindAll
}
 Types of actions datasources could be called for. More...

Functions

LCAPICALL osError lasso_allocValue (lasso_value_t *result, const char *name, unsigned int nameSize, const char *data, unsigned int dataSize, LP_TypeDesc type)
 Allocates a lasso_value_t with the indicated data.
LCAPICALL osError lasso_allocValueW (lasso_value_w_t *result, const UChar *name, unsigned int nameSize, const UChar *data, unsigned int dataSize, LP_TypeDesc type)
 Allocates a lasso_value_w_t with the indicated data.
LCAPICALL osError lasso_allocValueConv (lasso_value_t *result, const UChar *name, unsigned int nameSize, const char *nameEncoding, const UChar *data, unsigned int dataSize, const char *dataEncoding, LP_TypeDesc type)
 Allocates a lasso_value_t with the indicated data and encoding method.
LCAPICALL osError lasso_freeValue (lasso_value_t *result)
 Frees a previously allocated lasso_value_t.
LCAPICALL osError lasso_freeValueW (lasso_value_w_t *result)
 Frees a previously allocated lasso_value_w_t.
LCAPICALL osError lasso_getRequestParam (lasso_request_t token, RequestParamKeyword key, auto_lasso_value_t *result)
 Fetches a request specific variable.
LCAPICALL osError lasso_getLassoParam (lasso_request_t token, LassoParamKeyword key, auto_lasso_value_t *result)
 Fetches a server specific variable.
LCAPICALL osError lasso_setResultCode (lasso_request_t token, osError err)
 Set result code number.
LCAPICALL osError lasso_setResultMessage (lasso_request_t token, const char *msg)
LCAPICALL osError lasso_setResultMessageW (lasso_request_t token, const UChar *msg)
LCAPICALL osError lasso_typeAlloc (lasso_request_t token, const char *typeName, int paramCount, lasso_type_t *paramsArray, lasso_type_t *outType)
 Allocates a new type instance.
LCAPICALL osError lasso_typeAllocW (lasso_request_t token, const UChar *typeName, int paramCount, lasso_type_t *paramsArray, lasso_type_t *outType)
 Allocates a new type instance.
LCAPICALL osError lasso_typeAllocCustom (lasso_request_t token, lasso_type_t *outCustom, const char *name)
 Allocates a custom type within a type initializer.
LCAPICALL osError lasso_typeAllocCustomW (lasso_request_t token, lasso_type_t *outCustom, const UChar *name)
 Allocates a custom type within a type initializer.
LCAPICALL osError lasso_typeAllocFromProto (lasso_request_t token, lasso_type_t proto, lasso_type_t *out)
 Allocate a new type instance based on the given type instance.
LCAPICALL osError lasso_typeAllocOneOff (lasso_request_t token, const char *name, const char *parentTypeName, lasso_type_t *out)
 Allocate a new type with the given name.
LCAPICALL osError lasso_typeAllocOneOffW (lasso_request_t token, const UChar *name, const UChar *parentTypeName, lasso_type_t *out)
 Allocate a new type with the given name.
LCAPICALL osError lasso_typeRefer (lasso_request_t token, lasso_type_t toRefer)
 Add 1 to an instance's reference count.
LCAPICALL osError lasso_typeFree (lasso_request_t token, lasso_type_t inType)
 Subtract 1 from an instance's reference count.
LCAPICALL osError lasso_typeCollect (lasso_request_t token, lasso_type_t inType)
 Remove the LCAPI call's reference to a type instance.
LCAPICALL osError lasso_handleExternalConversion (lasso_request_t token, lasso_type_t instance, const char *encoding, auto_lasso_value_t *outVal)
 Convert a type instance into byte data.
LCAPICALL osError lasso_handleInternalConversion (lasso_request_t token, const char *src, unsigned int srcLen, const char *encoding, LP_TypeDesc closestLassoType, lasso_type_t *outType)
 Converts byte data into a type instance.
LCAPICALL osError lasso_typeInheritFrom (lasso_request_t token, lasso_type_t child, lasso_type_t newParent)
 Changes the inheritence structure of a type.
LCAPICALL osError lasso_typeGetParent (lasso_request_t token, lasso_type_t from, lasso_type_t *outParent)
 Retrieves the parent of the provided type instance.
LCAPICALL osError lasso_typeGetChild (lasso_request_t token, lasso_type_t from, lasso_type_t *outChild)
 Retrieves the child of the provided instance.
LCAPICALL osError lasso_typeSetCustomDtor (lasso_type_t the_custom_type, void(*dtor)(lasso_type_t the_custom_type))
 Adds a C function to be called after onDestroy.
LCAPICALL osError lasso_typeAddMember (lasso_request_t token, lasso_type_t to, const char *named, lasso_type_t member)
 Adds a member to a type instance.
LCAPICALL osError lasso_typeAddMemberW (lasso_request_t token, lasso_type_t to, const UChar *named, lasso_type_t member)
 Adds a member to a type instance.
LCAPICALL osError lasso_typeGetMember (lasso_request_t token, lasso_type_t from, const char *named, lasso_type_t *out)
 Retrieves a member from a type instance.
LCAPICALL osError lasso_typeGetMemberW (lasso_request_t token, lasso_type_t from, const UChar *named, lasso_type_t *out)
 Retrieves a member from a type instance.
LCAPICALL osError lasso_setPtrMember (lasso_request_t token, lasso_type_t self, const char *name, void *data)
 Allows storage of an opaque pointer value.
LCAPICALL osError lasso_setPtrMemberW (lasso_request_t token, lasso_type_t self, const UChar *name, void *data)
 Allows storage of an opaque pointer value.
LCAPICALL osError lasso_getPtrMember (lasso_request_t token, lasso_type_t self, const char *name, void **data)
 Retrieves a previously added pointer value.
LCAPICALL osError lasso_getPtrMemberW (lasso_request_t token, lasso_type_t self, const UChar *name, void **data)
 Retrieves a previously added pointer value.
LCAPICALL osError lasso_typeSetFlag (lasso_request_t token, lasso_type_t type, int flag)
 Sets the flag for the given type instance.
LCAPICALL osError lasso_typeHasFlag (lasso_request_t token, lasso_type_t type, int flag)
 Tests the flag for the given type instance.
LCAPICALL osError lasso_typeClearFlag (lasso_request_t token, lasso_type_t type, int flag)
 Removes the flag for the given type instance.
LCAPICALL osError lasso_getTagSelf (lasso_request_t token, lasso_type_t *self)
 Returns the type instance that the current tag call was a member of.
LCAPICALL osError lasso_typeGetName (lasso_request_t token, lasso_type_t target, auto_lasso_value_t *outName)
 Returns the name of the target type.
LCAPICALL osError lasso_typeGetNameW (lasso_request_t token, lasso_type_t target, auto_lasso_value_w_t *outName)
 Returns the name of the target type.
LCAPICALL osError lasso_typeIsA (lasso_request_t token, lasso_type_t target, LP_TypeDesc type)
 Tests to see if a type is an instance of another type.
LCAPICALL osError lasso_typeIsA2 (lasso_request_t token, lasso_type_t target, const char *typeName)
 Tests to see if a type is an instance of another type.
LCAPICALL osError lasso_typeIsA2W (lasso_request_t token, lasso_type_t target, const UChar *typeName)
 Tests to see if a type is an instance of another type.
LCAPICALL osError lasso_typeIsA3 (lasso_request_t token, lasso_type_t target, lasso_type_t type)
 Tests to see if a type is an instance of another type.
LCAPICALL osError lasso_returnTagValue (lasso_request_t token, lasso_type_t value)
 Specifies the return value of the current LCAPI tag call.
LCAPICALL osError lasso_returnTagValueBoolean (lasso_request_t token, bool b)
 Return a boolean value from the current LCAPI tag call.
LCAPICALL osError lasso_returnTagValueInteger (lasso_request_t token, osInt64 i)
 Return an integer value from the current LCAPI tag call.
LCAPICALL osError lasso_returnTagValueString (lasso_request_t token, const char *p, int l)
 Return a string value from the current LCAPI tag call.
LCAPICALL osError lasso_returnTagValueStringW (lasso_request_t token, const UChar *p, int l)
 Return a string value from the current LCAPI tag call.
LCAPICALL osError lasso_returnTagValueDecimal (lasso_request_t token, double d)
 Return a decimal value from the current LCAPI tag call.
LCAPICALL osError lasso_returnTagValueBytes (lasso_request_t token, const char *data, int length)
 Return binary data from the current LCAPI tag call.
LCAPICALL osError lasso_getTagReturnValue (lasso_request_t token, lasso_type_t *outValue)
 Provides direct access to the LCAPI tag's return value.
LCAPICALL osError lasso_getVariable2 (lasso_request_t token, const char *key, lasso_type_t *value)
 Provides access to a defined variable.
LCAPICALL osError lasso_getVariable2W (lasso_request_t token, const UChar *key, lasso_type_t *value)
 Provides access to a defined variable.
LCAPICALL osError lasso_setVariable2 (lasso_request_t token, const char *key, lasso_type_t value)
 Sets the specified variable's value.
LCAPICALL osError lasso_setVariable2W (lasso_request_t token, const UChar *key, lasso_type_t value)
 Sets the specified variable's value.
LCAPICALL osError lasso_getTagParam2 (lasso_request_t token, int paramIndex, lasso_type_t *result)
 Retrieves a parameter that was passed to the LCAPI tag call.
LCAPICALL osError lasso_findTagParam2 (lasso_request_t token, const char *paramName, lasso_type_t *result)
 Retrieves a parameter that was passed to the LCAPI tag call.
LCAPICALL osError lasso_findTagParam2W (lasso_request_t token, const UChar *paramName, lasso_type_t *result)
 Retrieves a parameter that was passed to the LCAPI tag call.
LCAPICALL osError lasso_childrenRun (lasso_request_t token, lasso_type_t *result)
 Execute the contents of a container tag.
LCAPICALL osError lasso_typeRunTag (lasso_request_t token, const char *name, lasso_type_t tagType, int paramCount, lasso_type_t *params, lasso_type_t *returnValue, lasso_type_t optionalTarget)
 Execute a given tag.
LCAPICALL osError lasso_typeRunTagW (lasso_request_t token, const UChar *name, lasso_type_t tagType, int paramCount, lasso_type_t *params, lasso_type_t *returnValue, lasso_type_t optionalTarget)
 Execute a given tag.
LCAPICALL osError lasso_findTagW (lasso_request_t token, const UChar *name, lasso_type_t *outTag, bool disableOnDemand)
 Searches for a tag.
LCAPICALL osError lasso_findTag (lasso_request_t token, const char *name, lasso_type_t *outTag, bool disableOnDemand)
 Searches for a tag.
LCAPICALL osError lasso_typeAssign (lasso_request_t token, lasso_type_t left_hand_side, lasso_type_t right_hand_side)
 Performs an assignment of one type to another.
LCAPICALL osError lasso_typeStealValue (lasso_request_t token, lasso_type_t thief, lasso_type_t victim)
 Transfer the data from one type to another type.
LCAPICALL osError lasso_runRequest (lasso_tag_func func, tag_action_t action, int unused)
 Creates and runs a new LCAPI call on the given lasso_tag_func.
LCAPICALL osError lasso_registerConstant2 (const char *namespaceName, const char *name, lasso_type_t val)
 Register a constant value.
LCAPICALL osError lasso_registerConstant2W (const UChar *namespaceName, const UChar *name, lasso_type_t val)
 Register a constant value.
LCAPICALL osError lasso_registerConstant (const char *name, lasso_type_t val)
 Register a constant value.
LCAPICALL osError lasso_registerConstantW (const UChar *name, lasso_type_t val)
 Register a constant value.
LCAPICALL osError lasso_includeRaw (lasso_request_t token, const char *path, auto_lasso_value_t *out)
 Works just like the include_raw tag.
LCAPICALL osError lasso_getTagName (lasso_request_t token, auto_lasso_value_t *result)
 Fetches the name of the tag that triggered this call.
LCAPICALL osError lasso_getTagNameW (lasso_request_t token, auto_lasso_value_w_t *result)
 Fetches the name of the tag that triggered this call.
LCAPICALL osError lasso_getTagParamCount (lasso_request_t token, int *result)
 Fetches the number of parameters that were passed to the tag.
LCAPICALL osError lasso_getTagParam (lasso_request_t token, int paramIndex, auto_lasso_value_t *result)
 Fetches the indicated parameter that was sent to the tag.
LCAPICALL osError lasso_getTagParamW (lasso_request_t token, int paramIndex, auto_lasso_value_w_t *result)
 Fetches the indicated parameter that was sent to the tag.
LCAPICALL osError lasso_tagParamIsDefined (lasso_request_t token, const char *paramName)
 Returns osErrNoErr if the param WAS defined.
LCAPICALL osError lasso_tagParamIsDefinedW (lasso_request_t token, const UChar *paramName)
 Returns osErrNoErr if the param WAS defined.
LCAPICALL osError lasso_findTagParam (lasso_request_t token, const char *paramName, auto_lasso_value_t *result)
 Retrieves a parameter that was passed to the LCAPI tag call.
LCAPICALL osError lasso_findTagParamW (lasso_request_t token, const UChar *paramName, auto_lasso_value_w_t *result)
 Retrieves a parameter that was passed to the LCAPI tag call.
LCAPICALL osError lasso_getResultHeader (lasso_request_t token, auto_lasso_value_t *result)
 Allows access to the result (HTTP) header.
LCAPICALL osError lasso_getResultHeaderW (lasso_request_t token, auto_lasso_value_w_t *result)
 Allows access to the result (HTTP) header.
LCAPICALL osError lasso_setResultHeader (lasso_request_t token, const char *header)
 Sets the result (HTTP) header.
LCAPICALL osError lasso_setResultHeaderW (lasso_request_t token, const UChar *header)
 Sets the result (HTTP) header.
LCAPICALL osError lasso_getCookieValue (lasso_request_t token, const char *named, auto_lasso_value_t *value)
 Retrieves a cookie value set by the client.
LCAPICALL osError lasso_getCookieValueW (lasso_request_t token, const UChar *named, auto_lasso_value_w_t *value)
 Retrieves a cookie value set by the client.
LCAPICALL osError lasso_processBuffer (lasso_request_t token, const char *buffer, auto_lasso_value_t *output)
 Processes the supplied buffer.
LCAPICALL void lasso_getPlatformSpecificPath (const char *inInternalPath, osPathname outPlatformPath)
 Converts an internal pathname into a platform-specific pathname.
LCAPICALL void lasso_getInternalPath (const char *inPlatformPath, osPathname outInternalPath)
 Converts a platform-specific pathname into an internal pathname.
LCAPICALL void lasso_fullyQualifyPath (lasso_request_t token, const char *inRelativePath, osPathname outFullyQualified)
 Converts a relative path into a fully qualified from-the-server-root path.
LCAPICALL void lasso_resolvePath (lasso_request_t token, const char *inPath, osPathname outFullPath)
 Converts a partial path into a full, from the file system root, internal path.
LCAPICALL void lasso_resolveIncludePath (lasso_request_t token, const char *inPath, osPathname outFullPath)
 Converts a partial path into a full, from the file system root, internal path which is guaranteed to be within the web root.
LCAPICALL void lasso_internalToFullPlatformPath (lasso_request_t token, const char *relativeOrFullInternalPath, osPathname fullPlatformPath)
 Converts an internal path into a full platform specific path.
LCAPICALL bool lasso_isFullInternalPath (const char *path)
 Tests the given internal path to see if it is a full path from the filesystem root.
LCAPICALL osError lasso_setAutoResolveFullPaths (lasso_request_t token, bool to)
 Toggles how Lasso resolves file paths.
LCAPICALL osError lasso_getAutoResolveFullPaths (lasso_request_t token, bool *get)
 Retreives Lasso's current file resolution mode.

Detailed Description

LassoCAPI Main Header File.

This file contains all of the available LCAPI defines and functions.


Define Documentation

#define INITVAL  )     { (X)->name = (X)->data = NULL; (X)->nameSize = (X)->dataSize = 0; }
 

Initialize a lasso_value_t or lasso_value_w_t to be blank.

It is recommended that each lasso_value_t be initialized using this macro before use.

Example:

		lasso_value_t myVal;
		INITVAL(&myVal);
	

#define LCAPI_VERSION   4
 

Current Lasso Version.

#define LCAPI_VERSION_1   1
 

Lasso Version 5. First LCAPI release

#define LCAPI_VERSION_2   2
 

Lasso Version 6. Second LCAPI release

#define LCAPI_VERSION_3   3
 

Lasso Version 7. Third LCAPI release

#define LCAPI_VERSION_4   LCAPI_VERSION
 

Lasso Version 8. Fourth LCAPI release


Typedef Documentation

typedef lasso_value_t auto_lasso_value_t
 

Special typedef so programmers know when Lasso will automatically dispose of the value.

typedef lasso_value_w_t auto_lasso_value_w_t
 

Special typedef so programmers know when Lasso will automatically dispose of the value.

typedef osError(* lasso_ds_func)(lasso_request_t token, datasource_action_t action, const auto_lasso_value_t *param)
 

Service function for Lasso Datasource modules.

A LCAPI datasource module should implement one of these and pass it to the lasso_registerDSModule or lasso_registerDSModuleW function when the datasource module is registered. The function will be called by Lasso when a datasource operation is to be performed.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
action The current action for the datasource module to perform.
param Any additional data associated with the action.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

typedef void* lasso_dsconnection_t
 

Represents a datasource module connection.

This opaque value is only interpreted by the datasource module itself. It can be stored via lasso_setDSConnection and retrieved via lasso_getDSConnection. Lasso will automatically send the datasource the datasourceCloseConnection message when it is time to close the connection.

typedef void* lasso_request_t
 

Special value passed to modules that identify the request.

The same value should be used when calling into any LassoCAPI function.

typedef osError(* lasso_tag_func)(lasso_request_t token, tag_action_t action)
 

Service function for a Lasso tag.

An LCAPI tag should implement one of these and pass it to the lasso_registerTagModule or lasso_registerTagModuleW function when the LCAPI module is registered. The function will be called by Lasso every time the tag is called in a script.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
action Unused. Do not rely on this parameter to hold any particular value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

typedef void* lasso_type_t
 

Represents a type within Lasso.

This opaque value represents an instance of a type within Lasso

typedef enum log_level_t log_level_t
 

The various log levels.

Each log level can be configured to go to zero or more destinations.

typedef void(* register_module_func)(void)
 

LCAPI module registration callback.

All Lasso modules must export a function named "registerLassoModule". When Lasso attempts to load an LCAPI module, it will look for this exported funtion and, if found, call it. Within that function, the user may register any number of datasource modules or any number of tags using the lasso_registerDSModule, lasso_registerDSModuleW, lasso_registerTagModule or lasso_registerTagModuleW functions.

typedef int tag_action_t
 

Types of actions tag modules could be called for.

Ignore this for now, it may be put into use in a future version but is not utliized at present.


Enumeration Type Documentation

enum datasource_action_t
 

Types of actions datasources could be called for.

One of these will be passed as the action parameter for the lasso_ds_func.

Enumeration values:
datasourceInit  Sent when a new "instance" of the datasource module is created.
datasourceTerm  Sent when the "instance" of the datasource module is destroyed.
datasourceNames  Sent when Lasso attempts to gather the names of all the databases that the datasource module supports. Call lasso_addDataSourceResult once for each supported database.
datasourceTableNames  Sent when Lasso attempts to gather the names of the tables available for the given database. The name of the database itself will be passed in the param parameter. Call lasso_addDataSourceResult once for each available table.
datasourceSearch  Sent when the datasource module is to perform a -search action.
datasourceAdd  Sent when the datasource module is to perform a -add action.
datasourceUpdate  Sent when the datasource module is to perform a -update action.
datasourceDelete  Sent when the datasource module is to perform a -delete action.
datasourceInfo  Sent when the datasource module is to perform a -show action.
datasourceExecSQL  Sent when the datasource module is to perform a -sql action.
datasourceRandom  Sent when the datasource module is to perform a -random action.
datasourceSchemaNames  Sent when Lasso attempts to gather the names of the schemas available for the given database. The name of the database itself will be passed in the param parameter. Call lasso_addDataSourceResult once for each available schema.

This is currently only utilized for LJAPI.

datasourceCloseConnection  Sent when the datasource module should close a connection previously set via the lasso_setDSConnection function.
datasourceTickle  Sent to the datasource module when -database and -table are specified in an inline, but no action, or a -nothing action is used. The database could, perhaps, set or reset its connection to the database via lasso_setDSConnection. Or, it could do nothing.
datasourceFindAll  Sent when the datasource module is to perform a -findall action.

enum log_level_t
 

The various log levels.

Each log level can be configured to go to zero or more destinations.

Enumeration values:
LOG_LEVEL_CRITICAL  Critical error.
LOG_LEVEL_WARNING  Warning.
LOG_LEVEL_DETAIL  Detail.
LOG_LEVEL_ALWAYS  Always printed to window (only). Used internally in a few places.
LOG_LEVEL_SQL  SQL statement for a database action.
LOG_LEVEL_DEPRECATED  Deprecated tag used.

enum secure_operation_t
 

Various types of ways to access files.

Enumeration values:
kInspectFiles  Query size, etc.
kCreateFiles  Create.
kDeleteFiles  Delete.
kCopyFiles  Copy.
kMoveFiles  Move.
kReadFiles  Read.
kWriteFiles  Write.
kAccessOutsideRoot  Outside of web root.


Function Documentation

LCAPICALL osError lasso_addColumnInfo lasso_request_t  token,
const char *  name,
int  nullOK,
LP_TypeDesc  type,
LP_TypeDesc  protection
 

Adds information about a particular column.

Column information should be added in the order in which the columns occur inthe database. Column information should be added no matter what the action is. For the show action, only column information is added.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
name The column name.
nullOK IS a null value for this column ok?
type The data type for the column as represented by a type code. osConfig.h.
protection The code for the column's protection. osConfig.h.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_addColumnInfo2 lasso_request_t  token,
const char *  name,
int  nullOK,
LP_TypeDesc  type,
LP_TypeDesc  protection,
const char **  valueList,
int  countValueList
 

Adds information, including valuelists, about a particular column.

Column information should be added in the order in which the columns occur inthe database. Column information should be added no matter what the action is. For the show action, only column information is added.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
name The column name.
nullOK IS a null value for this column ok?
type The data type for the column as represented by a type code. osConfig.h.
protection The code for the column's protection. osConfig.h.
valueList An array of strings for the column's valuelist.
countValueList The number of values in the value list.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_addDataSourceResult lasso_request_t  token,
const char *  data
 

Adds a datasource result value.

Datasource actions which require returning multiple values can use this to add those values. For example, this call can be used to add the name of a datasource that the module services or the names of the tables in a particular datasource.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
data The data to add. Data must be in ISO8859-1 encoding.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_addDataSourceResultUTF8 lasso_request_t  token,
const char *  data
 

Adds a datasource result value.

Datasource actions which require returning multiple values can use this to add those values. For example, this call can be used to add the name of a datasource that the module services or the names of the tables in a particular datasource.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
data The data to add. Data must be in UTF-8 encoding.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_addResultRow lasso_request_t  token,
const char **  columns,
unsigned int *  dataSizes,
int  numColumns
 

Add the column data for the next result row.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
columns An array of column values.
dataSizes An array of column value lengths. Every column in columns should have an associated length.
numColumns The number of items in the columns and dataSizes arrays.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_allocValue lasso_value_t result,
const char *  name,
unsigned int  nameSize,
const char *  data,
unsigned int  dataSize,
LP_TypeDesc  type
 

Allocates a lasso_value_t with the indicated data.

Anything allocated with this function will NOT be garbage collected by Lasso and must be freed using lasso_freeValue.

Parameters:
result A pointer to the lasso_value_t which will be constructed.
name The name portion which will be copied and set.
nameSize The size of the name parameter in bytes.
data The data portion which will be copied and set.
dataSize The size of the data parameter in bytes.
type The type code for the value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_allocValueConv lasso_value_t result,
const UChar *  name,
unsigned int  nameSize,
const char *  nameEncoding,
const UChar *  data,
unsigned int  dataSize,
const char *  dataEncoding,
LP_TypeDesc  type
 

Allocates a lasso_value_t with the indicated data and encoding method.

This function can be used to convert Unicode data into any of the supported encodings.

Anything allocated with this function will NOT be garbage collected by Lasso and must be freed using lasso_freeValue.

Parameters:
result A pointer to the lasso_value_w_t which will be constructed.
name The name portion which will be converted and set.
nameSize The number of characters in the name portion.
nameEncoding The destination encoding for the name portion.
data The data portion which will be converted and set.
dataSize The number of characters in the data portion.
dataEncoding The destination encoding for the data portion.
type The type code for the value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_allocValueW lasso_value_w_t result,
const UChar *  name,
unsigned int  nameSize,
const UChar *  data,
unsigned int  dataSize,
LP_TypeDesc  type
 

Allocates a lasso_value_w_t with the indicated data.

Anything allocated with this function will NOT be garbage collected by Lasso and must be freed using lasso_freeValueW.

Parameters:
result A pointer to the lasso_value_w_t which will be constructed.
name The name portion which will be copied and set.
nameSize The number of characters in the name portion.
data The data portion which will be copied and set.
dataSize The number of characters in the data portion.
type The type code for the value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_arrayGetElement lasso_request_t  token,
lasso_type_t  array,
int  index,
lasso_type_t out
 

Retrieves the specified element of the provided array instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
array The array instance.
index The zero based index at which to retreive.
out The pointer in which to store the result.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_arrayGetSize lasso_request_t  token,
lasso_type_t  array,
int *  len
 

Retrieves the size of the provided array instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
array The array instance.
len A pointer in which to store the resulting size.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_arrayRemoveElement lasso_request_t  token,
lasso_type_t  array,
int  index
 

Removes the specified element from the provided array instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
array The array instance.
index The zero based index at which to remove.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_arraySetElement lasso_request_t  token,
lasso_type_t  array,
int  index,
lasso_type_t  elem
 

Sets the specified element of the provided array instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
array The array instance.
index The zero based index at which to set.
elem The type instance which will be placed at the specified index. The instance will be referenced.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_childrenRun lasso_request_t  token,
lasso_type_t result
 

Execute the contents of a container tag.

Tags become containers by registering with the flag_typeContainerTag flag. The resulting data will be of type string.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
result The resulting data.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_findInputColumn lasso_request_t  token,
const char *  name,
auto_lasso_value_t value
 

Gets an individual input column by name.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
name the name of the input column to retrieve.
value The resulting value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_findInputColumnW lasso_request_t  token,
const UChar *  name,
auto_lasso_value_t value
 

Gets an individual input column by name.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
name the name of the input column to retrieve.
value The resulting value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_findTag lasso_request_t  token,
const char *  name,
lasso_type_t outTag,
bool  disableOnDemand
 

Searches for a tag.

The search method is the same as would be used to find a tag in a script. Returns osErrNoErr if the tag is found. The final parameter can be used to disable searching for the tag in any on-demand libraries.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
name The tag name to search for.
outTag The resulting tag, if found.
disableOnDemand Used to disable the searching of on-demand libraries.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_findTagParam lasso_request_t  token,
const char *  paramName,
auto_lasso_value_t result
 

Retrieves a parameter that was passed to the LCAPI tag call.

The parameter must have been specified by keyword. The keyword will be placed in the name portion of the struct and the value in the data portion. If only a keyword was provided, the data portion will be NULL.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
paramName The keyword of the desired parameter.
result The resulting parameter value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_findTagParam2 lasso_request_t  token,
const char *  paramName,
lasso_type_t result
 

Retrieves a parameter that was passed to the LCAPI tag call.

The parameter must have been specified by keyword.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
paramName The keyword of the desired parameter.
result The resulting parameter value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_findTagParam2W lasso_request_t  token,
const UChar *  paramName,
lasso_type_t result
 

Retrieves a parameter that was passed to the LCAPI tag call.

The parameter must have been specified by keyword.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
paramName The keyword of the desired parameter.
result The resulting parameter value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_findTagParamW lasso_request_t  token,
const UChar *  paramName,
auto_lasso_value_w_t result
 

Retrieves a parameter that was passed to the LCAPI tag call.

The parameter must have been specified by keyword. The keyword will be placed in the name portion of the struct and the value in the data portion. If only a keyword was provided, the data portion will be NULL.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
paramName The keyword of the desired parameter.
result The resulting parameter value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_findTagW lasso_request_t  token,
const UChar *  name,
lasso_type_t outTag,
bool  disableOnDemand
 

Searches for a tag.

The search method is the same as would be used to find a tag in a script. Returns osErrNoErr if the tag is found. The final parameter can be used to disable searching for the tag in any on-demand libraries.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
name The tag name to search for.
outTag The resulting tag, if found.
disableOnDemand Used to disable the searching of on-demand libraries.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_freeValue lasso_value_t result  ) 
 

Frees a previously allocated lasso_value_t.

Do not pass an auto_lasso_value_t to this function or you will end up with a double free.

Parameters:
result The lasso_value_t whose members will be freed.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_freeValueW lasso_value_w_t result  ) 
 

Frees a previously allocated lasso_value_w_t.

Do not pass an auto_lasso_value_w_t to this function or you will end up with a double free.

Parameters:
result The lasso_value_w_t whose members will be freed.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL void lasso_fullyQualifyPath lasso_request_t  token,
const char *  inRelativePath,
osPathname  outFullyQualified
 

Converts a relative path into a fully qualified from-the-server-root path.

If the path is already from the root it won't be changed.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
inRelativePath The relative path.
outFullyQualified the resulting fully qualified path.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getAutoResolveFullPaths lasso_request_t  token,
bool *  get
 

Retreives Lasso's current file resolution mode.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
get The pointer in which to store the result value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getCookieValue lasso_request_t  token,
const char *  named,
auto_lasso_value_t value
 

Retrieves a cookie value set by the client.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
named The name of the cookie to look for.
value The resulting cookie value which will be placed in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getCookieValueW lasso_request_t  token,
const UChar *  named,
auto_lasso_value_w_t value
 

Retrieves a cookie value set by the client.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
named The name of the cookie to look for.
value The resulting cookie value which will be placed in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getDataHost lasso_request_t  token,
auto_lasso_value_t host,
auto_lasso_value_t usernamepassword
 

Returns the host that maintains the current database.

The host name will be placed in the name portion of the struct while the port will be placed in the data portion.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
host The resulting host data.
usernamepassword The resulting username/password combo.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getDataHost2 lasso_request_t  token,
auto_lasso_value_t host,
auto_lasso_value_t defaultSchema,
auto_lasso_value_t usernamepassword
 

Returns the host that maintains the current database.

The host name will be placed in the name portion of the struct while the port will be placed in the data portion.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
host The resulting host data.
defaultSchema The resulting default schema name which will be placed in the name portion of the struct.
usernamepassword The resulting username/password combo.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getDataSourceModuleName lasso_request_t  token,
auto_lasso_value_t val
 

Returns the name the current datasource module was registered with.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
val The resulting datasource module name which will be palced in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getDataSourceName lasso_request_t  token,
auto_lasso_value_t t,
bool *  useHostDefault,
auto_lasso_value_t usernamepassword
 

Gets the currently specified database name and associated data.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
t The resulting database name.
useHostDefault The setting which specifies whether the hosts username/password combo should be used in the absence of a database specific combo.
usernamepassword The username/password combo for the database.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getDSConnection lasso_request_t  token,
lasso_dsconnection_t conn
 

Called to access the current datasource connection.

Datasource connections are set using the lasso_setDSConnection function.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
conn A pointer in which to store the result.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getInputColumn lasso_request_t  token,
int  num,
auto_lasso_value_t v
 

Gets an individual input column by index.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
num the zero based index of the column to retrieve.
v The resulting value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getInputColumnCount lasso_request_t  token,
int *  count
 

Gets the number of input columns for this database action.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
count The resulting number of input columns.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL void lasso_getInternalPath const char *  inPlatformPath,
osPathname  outInternalPath
 

Converts a platform-specific pathname into an internal pathname.

Parameters:
inPlatformPath the platform specific path name.
outInternalPath The resulting internal pathname.

LCAPICALL osError lasso_getIsStatementOnly lasso_request_t  token,
bool *  out
 

Used to check for the -statementonly inline param.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
out A pointer in which to store the result.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getLassoParam lasso_request_t  token,
LassoParamKeyword  key,
auto_lasso_value_t result
 

Fetches a server specific variable.

Request specific variables are enumerated in RequestParams.h

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
key The key identifying the server variable to retrieve.
result The resulting data for the server variable.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getLogicalOp lasso_request_t  token,
LP_TypeDesc *  op
 

Gets the logical operator for this database action.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
op The resulting operator code. Operator codes are declared in LassoDefines.h.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getMaxRows lasso_request_t  token,
int *  recs
 

The maximum number of rows in the found set to return.

-maxrecords

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
recs The resulting -maxrecords value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL void lasso_getPlatformSpecificPath const char *  inInternalPath,
osPathname  outPlatformPath
 

Converts an internal pathname into a platform-specific pathname.

Parameters:
inInternalPath The internal pathname.
outPlatformPath The resulting platform specific pathname.

LCAPICALL osError lasso_getPrimaryKeyColumn lasso_request_t  token,
auto_lasso_value_t v
 

Gets the name and the value of the currently specified primary key column.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
v The resulting key name and value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getPrimaryKeyColumn2 lasso_request_t  token,
int  index,
auto_lasso_value_t v
 

Gets the name and the value of the primary key column specified by index.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
index The zero based index.
v The resulting key name and value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getPtrMember lasso_request_t  token,
lasso_type_t  self,
const char *  name,
void **  data
 

Retrieves a previously added pointer value.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
self The type instance from which to retrieve.
name The name of the previously added pointer value.
data A pointer to a void * in which to store the found value.s
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getPtrMemberW lasso_request_t  token,
lasso_type_t  self,
const UChar *  name,
void **  data
 

Retrieves a previously added pointer value.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
self The type instance from which to retrieve.
name The name of the previously added pointer value.
data A pointer to a void * in which to store the found value.s
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getRequestParam lasso_request_t  token,
RequestParamKeyword  key,
auto_lasso_value_t result
 

Fetches a request specific variable.

Request specific variables are enumerated in RequestParams.h

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
key The key identifying the request variable to retrieve.
result The resulting data for the requested variable. Some request variables require input data which is submited in this parameter.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getResultHeader lasso_request_t  token,
auto_lasso_value_t result
 

Allows access to the result (HTTP) header.

The data will be a copy of the current HTTP header data.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
result The header data which will be placed in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getResultHeaderW lasso_request_t  token,
auto_lasso_value_w_t result
 

Allows access to the result (HTTP) header.

The data will be a copy of the current HTTP header data.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
result The header data which will be placed in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getReturnColumn lasso_request_t  token,
int  num,
auto_lasso_value_t v
 

Gets an individual return column by index.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
num The zero based index of the return column to retrieve.
v The resulting value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getReturnColumnCount lasso_request_t  token,
int *  count
 

Gets the number of return columns for this action.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
count The resulting number of return columns.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getRowID lasso_request_t  token,
int *  id
 

Gets the currently specified record id (FileMaker specific).

-keyvalue

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
id The resulting numeric -keyvalue value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getSchemaName lasso_request_t  token,
auto_lasso_value_t schema
 

Gets the currently specified schema name.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
schema The resulting schema name which will be placed in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getSkipRows lasso_request_t  token,
int *  recs
 

The number of rows that should be skipped in the found set.

-skiprecords

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
recs The resulting -skiprecords value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getSortColumn lasso_request_t  token,
int  num,
auto_lasso_value_t v
 

Gets an individual sort column by index.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
num the zero based index of the sort column to retrieve.
v The resulting value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getSortColumnCount lasso_request_t  token,
int *  count
 

Gets the number of sort columns for this database action.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
count The resulting number of sort columns.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getTableName lasso_request_t  token,
auto_lasso_value_t t
 

Gets the currently specified table name.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
t The resulting table name which will be placed in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getTagName lasso_request_t  token,
auto_lasso_value_t result
 

Fetches the name of the tag that triggered this call.

For example, in the case of: [my_tag: ...] the resulting value would be "my_tag".

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
result The resulting tag name which will be placed in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getTagNameW lasso_request_t  token,
auto_lasso_value_w_t result
 

Fetches the name of the tag that triggered this call.

For example, in the case of: [my_tag: ...] the resulting value would be "my_tag".

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
result The resulting tag name which will be placed in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getTagParam lasso_request_t  token,
int  paramIndex,
auto_lasso_value_t result
 

Fetches the indicated parameter that was sent to the tag.

Parameter indexes start at zero. If the parameter was specified as a keyword/value pair, the keyword will be placed in the name portion of the struct and the value in the data portion. If the parameter was provided without a keyword, the name portion of the struct will be NULL.

All parameters values will be converted to string, regardless of the original type.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
paramIndex The zero based index of the desired parameter.
result The resulting parameter data.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getTagParam2 lasso_request_t  token,
int  paramIndex,
lasso_type_t result
 

Retrieves a parameter that was passed to the LCAPI tag call.

The parameter index is zero based.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
paramIndex The zero based index of the desired parameter.
result The resulting parameter value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getTagParamCount lasso_request_t  token,
int *  result
 

Fetches the number of parameters that were passed to the tag.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
result A pointer in which to store the result.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getTagParamW lasso_request_t  token,
int  paramIndex,
auto_lasso_value_w_t result
 

Fetches the indicated parameter that was sent to the tag.

Parameter indexes start at zero. If the parameter was specified as a keyword/value pair, the keyword will be placed in the name portion of the struct and the value in the data portion. If the parameter was provided without a keyword, the name portion of the struct will be NULL.

All parameters values will be converted to string, regardless of the original type.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
paramIndex The zero based index of the desired parameter.
result The resulting parameter data.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getTagReturnValue lasso_request_t  token,
lasso_type_t outValue
 

Provides direct access to the LCAPI tag's return value.

In many cases, directly manipulating this value can yield better performance than lasso_returnTagValue. The resulting type instance will start out as type null.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outValue A pointer inwhich to place the resulting return value type instance.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getTagSelf lasso_request_t  token,
lasso_type_t self
 

Returns the type instance that the current tag call was a member of.

This is used in member tags of custom types to return the target of the current call.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
self A pointer in which to store the resulting type instance.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getVariable2 lasso_request_t  token,
const char *  key,
lasso_type_t value
 

Provides access to a defined variable.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
key The name of the variable to access.
value The resulting variable value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_getVariable2W lasso_request_t  token,
const UChar *  key,
lasso_type_t value
 

Provides access to a defined variable.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
key The name of the variable to access.
value The resulting variable value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_handleExternalConversion lasso_request_t  token,
lasso_type_t  instance,
const char *  encoding,
auto_lasso_value_t outVal
 

Convert a type instance into byte data.

Converts a Lasso type INTO single-byte or binary data using the specific encoding method. This is the basis of table-level automatic encoding and translation. The default for all database, column, table names should be "iso8859-1".

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
instance The instance which will be converted.
encoding The encoding conversion method.
outVal A pointer to a lasso_value_t struct in which to store the result. The result will be placed in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_handleInternalConversion lasso_request_t  token,
const char *  src,
unsigned int  srcLen,
const char *  encoding,
LP_TypeDesc  closestLassoType,
lasso_type_t outType
 

Converts byte data into a type instance.

Converts a single-byte or binary representation of a Lasso type BACK INTO an instance of that type using the specified encoding method.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
src The source data.
srcLen The number of bytes in the source data.
encoding The encoding conversion method.
closestLassoType The type code for the closest applicable Lasso type. This is used as a hint to the converter.
outType The resulting Lasso type instance.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_includeRaw lasso_request_t  token,
const char *  path,
auto_lasso_value_t out
 

Works just like the include_raw tag.

Includes file data based on the given path. The path is resolved based on the current request. Full paths, or paths outside of the request's webserver folder are not permitted.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
path The path to the file.
out The resulting data which will be placed in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL void lasso_internalToFullPlatformPath lasso_request_t  token,
const char *  relativeOrFullInternalPath,
osPathname  fullPlatformPath
 

Converts an internal path into a full platform specific path.

Takes a path, such as one which may have been passed to any Lasso tag, and converts it into a full platform specific path name.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
relativeOrFullInternalPath The input path to convert.
fullPlatformPath The resulting converted path.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_isAdministrator lasso_request_t  token  ) 
 

Checks the current request for administrator privileges.

Returns osErrNoErr if the current user has administrator privs. This is useful for doing administrative activities or file accesses which only the administrator should be able to do.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_isAnonymous lasso_request_t  token  ) 
 

Checks the current request for the lowest privilege level.

Returns osErrNoErr if the current user is the anonymous user.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL bool lasso_isFullInternalPath const char *  path  ) 
 

Tests the given internal path to see if it is a full path from the filesystem root.

Parameters:
path The path to test.
Returns:
True if the given internal path is a full path from the filesystem root.

LCAPICALL osError lasso_log log_level_t  msgLevel,
const char *  fmt,
  ...
 

Log a message.

The message goes to the prefered destination for the message level. Messages are limited to 2048 bytes in length. Messages sent to the console are limited to 512 bytes in length. Messages sent to the database are limited to a little less than 2048 bytes since the total length of the sql statement used to insert the message is limited to 2048 bytes.

LCAPICALL osError lasso_logSetDestination log_level_t  msgLevel,
int  dest
 

Changes the system-wide log destination preference.

Multiple destinations can be OR'd together.

LCAPICALL osError lasso_mapFindElement lasso_request_t  token,
lasso_type_t  mp,
lasso_type_t  key,
lasso_type_t out
 

Searches for the specified key in the provided map instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
mp The map instance.
key The key to search for within the map.
out The pointer in which to store the result.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_mapGetNthElement lasso_request_t  token,
lasso_type_t  mp,
int  index,
lasso_type_t outPair
 

Retrieves the specified element of the provided map instance by index.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
mp The map instance.
index The zero based index at which to retreive.
outPair The pointer in which to store the result. The result will be a pair whose first member is the key and second member is the associated element.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_mapGetSize lasso_request_t  token,
lasso_type_t  mp,
int *  len
 

Retrieves the size of the provided map instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
mp The map instance.
len A pointer in which to store the resulting size.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_mapRemoveElement lasso_request_t  token,
lasso_type_t  mp,
lasso_type_t  key
 

Removes the specified element from the map based on the provided key.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
mp The map instance.
key The key to be removed.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_mapSetElement lasso_request_t  token,
lasso_type_t  mp,
lasso_type_t  key,
lasso_type_t  value
 

Sets the specified element of the provided map instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
mp The map instance.
key The instance of the key which will be set.
value The value of the element to associate with the provided key.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_mapSetElementW lasso_request_t  token,
lasso_type_t  mp,
const UChar *  key,
lasso_type_t  value
 

Sets the specified element of the provided map instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
mp The map instance.
key The instance of the key which will be set.
value The value of the element to associate with the provided key.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_operationAllowed lasso_request_t  token,
secure_operation_t  op,
void *  data
 

Tests for file access permissions.

Returns osErrNoErr if the given operation is permitted by Lasso security. The data perameter should be the full path to the file using the *internal pathname* format.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
op The file operation.
data The path name.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_pairGetFirst lasso_request_t  token,
lasso_type_t  pr,
lasso_type_t out
 

Retrieves the first member from the provided pair.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
pr The pair instance.
out The pointer in which to store the result.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_pairGetSecond lasso_request_t  token,
lasso_type_t  pr,
lasso_type_t out
 

Retrieves the second member from the provided pair.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
pr The pair instance.
out The pointer in which to store the result.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_pairSetFirst lasso_request_t  token,
lasso_type_t  pr,
lasso_type_t  frst
 

Sets the first member of the provided pair.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
pr The pair instance.
frst The instance to use as the first member. The instance will be referenced.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_pairSetSecond lasso_request_t  token,
lasso_type_t  pr,
lasso_type_t  scnd
 

Sets the second member of the provided pair.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
pr The pair instance.
scnd The instance to use as the second member. The instance will be referenced.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_processBuffer lasso_request_t  token,
const char *  buffer,
auto_lasso_value_t output
 

Processes the supplied buffer.

The buffer should consist of plain text, bracketed Lasso tags or <?LassoScript ?> pairs.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
buffer The buffer holding the script data.
output The resulting data which will be stored in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_registerConstant const char *  name,
lasso_type_t  val
 

Register a constant value.

Constants can be called just like tags, but the resulting value will only have a single instance and will have both it's type and value frozen. This is usually called at the same time that tags are registered.

Parameters:
name The name for the constant.
val The value for the constant.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_registerConstant2 const char *  namespaceName,
const char *  name,
lasso_type_t  val
 

Register a constant value.

Constants can be called just like tags, but the resulting value will only have a single instance and will have both it's type and value frozen. This is usually called at the same time that tags are registered.

Parameters:
namespaceName The namespace for the constant.
name The name for the constant.
val The value for the constant.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_registerConstant2W const UChar *  namespaceName,
const UChar *  name,
lasso_type_t  val
 

Register a constant value.

Constants can be called just like tags, but the resulting value will only have a single instance and will have both it's type and value frozen. This is usually called at the same time that tags are registered.

Parameters:
namespaceName The namespace for the constant.
name The name for the constant.
val The value for the constant.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_registerConstantW const UChar *  name,
lasso_type_t  val
 

Register a constant value.

Constants can be called just like tags, but the resulting value will only have a single instance and will have both it's type and value frozen. This is usually called at the same time that tags are registered.

Parameters:
name The name for the constant.
val The value for the constant.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_registerDSModule const char *  moduleName,
lasso_ds_func  func,
int  flags
 

Parameters:
moduleName The name of the datasource module.
func The User supplied callback for the datasource module.
flags Any special flags for the datasource module.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_registerDSModuleW const UChar *  moduleName,
lasso_ds_func  func,
int  flags
 

Parameters:
moduleName The name of the datasource module.
func The User supplied callback for the datasource module.
flags Any special flags for the datasource module.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_registerTagModule const char *  namespaceName,
const char *  tagName,
lasso_tag_func  func,
int  flags,
const char *  description
 

Parameters:
namespaceName The namespace in which the tag will be registered.
tagName The name which the tag can be called by.
func The user supplied callback for the tag.
flags Any special flags for the tag.
description A description for the tag.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_registerTagModuleW const UChar *  namespaceName,
const UChar *  tagName,
lasso_tag_func  func,
int  flags,
const UChar *  description
 

Parameters:
namespaceName The namespace in which the tag will be registered.
tagName The name which the tag can be called by.
func The user supplied callback for the tag.
flags Any special flags for the tag.
description A description for the tag.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_registerTypeModule const char *  namespaceName,
const char *  tagName,
lasso_tag_func  func,
int  flags,
const char *  description,
const char *  superType
 

Parameters:
namespaceName The namespace in which the type will be registered.
tagName The name which the type can be called by.
func The user supplied callback for the type initializer.
flags Any special flags for the type. If flag_typeInitializer is ommited, it will be automatically added. Any conflicting flags such as flag_typeContainerTag or flag_typeLoopingTag will be ignored.
description A description for the type.
superType Optionally, the name of the new type's super type.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_registerTypeModuleW const UChar *  namespaceName,
const UChar *  tagName,
lasso_tag_func  func,
int  flags,
const UChar *  description,
const UChar *  superType
 

Parameters:
namespaceName The namespace in which the type will be registered.
tagName The name which the type can be called by.
func The user supplied callback for the type initializer.
flags Any special flags for the type. If flag_typeInitializer is ommited, it will be automatically added. Any conflicting flags such as flag_typeContainerTag or flag_typeLoopingTag will be ignored.
description A description for the type.
superType Optionally, the name of the new type's super type.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL void lasso_resolveIncludePath lasso_request_t  token,
const char *  inPath,
osPathname  outFullPath
 

Converts a partial path into a full, from the file system root, internal path which is guaranteed to be within the web root.

Resulting path must name an item within the web-root or a blank string is returned.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
inPath The path to resolve.
outFullPath The resulting full path.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL void lasso_resolvePath lasso_request_t  token,
const char *  inPath,
osPathname  outFullPath
 

Converts a partial path into a full, from the file system root, internal path.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
inPath The path to resolve.
outFullPath The resulting full path.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_returnTagValue lasso_request_t  token,
lasso_type_t  value
 

Specifies the return value of the current LCAPI tag call.

Any type can be returned. A tag can only have one return value. Setting another return value will overwrite the previous.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
value The value to return.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_returnTagValueBoolean lasso_request_t  token,
bool  b
 

Return a boolean value from the current LCAPI tag call.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
b The boolean value to return.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_returnTagValueBytes lasso_request_t  token,
const char *  data,
int  length
 

Return binary data from the current LCAPI tag call.

When using this, the result of the LCAPI call will be a bytes type. This can be called as many times as needed and new data will be appended to any previous data.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
data The binary data to return.
length The number of bytes to return.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_returnTagValueDecimal lasso_request_t  token,
double  d
 

Return a decimal value from the current LCAPI tag call.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
d The double value to return.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_returnTagValueInteger lasso_request_t  token,
osInt64  i
 

Return an integer value from the current LCAPI tag call.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
i The integer value to return.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_returnTagValueString lasso_request_t  token,
const char *  p,
int  l
 

Return a string value from the current LCAPI tag call.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
p The character data to be returned. The data should be in UTF-8 encoding.
l The length of the character data to return.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_returnTagValueStringW lasso_request_t  token,
const UChar *  p,
int  l
 

Return a string value from the current LCAPI tag call.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
p The character data to be returned.
l The length of the character data to return.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_runRequest lasso_tag_func  func,
tag_action_t  action,
int  unused
 

Creates and runs a new LCAPI call on the given lasso_tag_func.

If there is already an active request on the current thread, the lasso_tag_func will be run within that thread's context. If there is no currently active request on the current thread, a new request will be created and run based off the global context. The tag_action_t parameter will be passed to the lasso_tag_func and can be used to signal or pass information to the function.

Parameters:
func The lasso_tag_func which will be called.
action User data to be passed to the tag.
unused unused.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setActionStatement lasso_request_t  token,
const char *  stat
 

Called to set the statement for the current action.

Datasources must call this to support the action_statement tag.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
stat The statement value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setActionStatementW lasso_request_t  token,
const UChar *  stat
 

Called to set the statement for the current action.

Datasources must call this to support the action_statement tag.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
stat The statement value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setAutoResolveFullPaths lasso_request_t  token,
bool  to
 

Toggles how Lasso resolves file paths.

Toggles whether Lasso will resolve the entire given file path (/blah/file.lasso) through the webserver (the default behavior - true) OR whether Lasso will resolve "/" through the server and then prepend that to the given file path (false).

The default behavior can conflict with some usages of mod_rewrite As of LP7, this setting is global

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
to The toggle.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setDSConnection lasso_request_t  token,
lasso_dsconnection_t  conn
 

Called to set the current connection for the datasource.

May recurse to deliver the datasourceCloseConnection message if there is already a valid lasso_dbconnection_t.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
conn The connection value to set.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setNumRowsFound lasso_request_t  token,
int  num
 

Sets the number of rows found in the query.

This will not always be the same value as the number of rows added with the lasso_addResultRow call as the skip recs and max recs parameters effect that number.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
num the number of found rows.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setPtrMember lasso_request_t  token,
lasso_type_t  self,
const char *  name,
void *  data
 

Allows storage of an opaque pointer value.

The pointer member is given and name and is stored as an integer in the type instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
self The type instance in which to add the pointer member.
name The name for the new member.
data The pointer value which will be added.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setPtrMemberW lasso_request_t  token,
lasso_type_t  self,
const UChar *  name,
void *  data
 

Allows storage of an opaque pointer value.

The pointer member is given and name and is stored as an integer in the type instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
self The type instance in which to add the pointer member.
name The name for the new member.
data The pointer value which will be added.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setResultCode lasso_request_t  token,
osError  err
 

Set result code number.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
err The result code
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setResultHeader lasso_request_t  token,
const char *  header
 

Sets the result (HTTP) header.

The data will be set as-is, so make sure it is properly formatted. The data should not include the final trailing CRLF pair.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
header The header data to use.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setResultHeaderW lasso_request_t  token,
const UChar *  header
 

Sets the result (HTTP) header.

The data will be set as-is, so make sure it is properly formatted. The data should not include the final trailing CRLF pair.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
header The header data to use.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setResultMessage lasso_request_t  token,
const char *  msg
 

Set result message string.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
msg The result message string.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setResultMessageW lasso_request_t  token,
const UChar *  msg
 

Set result message string.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
msg The result message string.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setRowID lasso_request_t  token,
int  id
 

Sets the currently specified record id (FileMaker specific).

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
id The numeric row id.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setVariable2 lasso_request_t  token,
const char *  key,
lasso_type_t  value
 

Sets the specified variable's value.

The variable does not have to already exist.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
key The name of the variable to set.
value The value to set.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_setVariable2W lasso_request_t  token,
const UChar *  key,
lasso_type_t  value
 

Sets the specified variable's value.

The variable does not have to already exist.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
key The name of the variable to set.
value The value to set.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_switchToUser lasso_request_t  token,
const char *  username,
const char *  password
 

Switches the current request to the given user.

A proper password must be provided. The switch will persist until the request is finished or is switches again. Pass "anonymous" with no password to switch to lowest privileges.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
username The username.
password The password.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_tagParamIsDefined lasso_request_t  token,
const char *  paramName
 

Returns osErrNoErr if the param WAS defined.

Any other result means it wasn't defined. Only parameters specified with a keyword should be searched for.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
paramName The name of the keyworded parameter to search for.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_tagParamIsDefinedW lasso_request_t  token,
const UChar *  paramName
 

Returns osErrNoErr if the param WAS defined.

Any other result means it wasn't defined. Only parameters specified with a keyword should be searched for.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
paramName The name of the keyworded parameter to search for.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAddMember lasso_request_t  token,
lasso_type_t  to,
const char *  named,
lasso_type_t  member
 

Adds a member to a type instance.

If the new member is a tag, it will be added to the tag members for the type. Otherwise, the new member will be added as a data member.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
to The type instance to which the new member will be added.
named The name for the new member.
member The new member to add.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAddMemberW lasso_request_t  token,
lasso_type_t  to,
const UChar *  named,
lasso_type_t  member
 

Adds a member to a type instance.

If the new member is a tag, it will be added to the tag members for the type. Otherwise, the new member will be added as a data member.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
to The type instance to which the new member will be added.
named The name for the new member.
member The new member to add.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAlloc lasso_request_t  token,
const char *  typeName,
int  paramCount,
lasso_type_t paramsArray,
lasso_type_t outType
 

Allocates a new type instance.

The name of the type to allocate is signified by the second parameter. If a type initializer is found for the given name, it will be executed. An array of lasso_type_t parameters can be passed to the type initializer.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
typeName The name of the type to instantiate.
paramCount The number of lasso_type_t parameters to pass to the initializer.
paramsArray An array of parameters to pass to the type initializer.
outType A pointer to the newly instantiated type.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocArray lasso_request_t  token,
lasso_type_t outArray,
int  count,
lasso_type_t elements
 

Allocates a new instance of type array.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outArray The resulting new type instance.
count The number of new array elements to insert. The number of items in the elements parameter.
elements A pointer to an array of lasso_type_t which will become the elements of the array. Each item will be referenced.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocBoolean lasso_request_t  token,
lasso_type_t outBool,
bool  inValue
 

Allocates a new instance of type boolean.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outBool The resulting new type instance.
inValue The boolean value which the new type instance will hold.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocCustom lasso_request_t  token,
lasso_type_t outCustom,
const char *  name
 

Allocates a custom type within a type initializer.

This function is used within lasso_tag_funcs that were registered as being a type initializer (flag_typeInitializer). It initializes a blank custom type and sets the type's name to the provided value. The new type does not yet have a lineage and has no members added to it. New data or tag members should be added using lasso_typeAddMember. The new type must be the return value of the tag call, set via lasso_returnTagValue. Any inherited members will be added to the type after the LCAPI call returns.

Warning:
Do NOT call this unless you are in a type initializer. If you are not in a type initializer, the result will be a type that will never be fully initialized.
Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outCustom The resulting newly allocated custom type.
name The new type's name.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocCustomW lasso_request_t  token,
lasso_type_t outCustom,
const UChar *  name
 

Allocates a custom type within a type initializer.

This function is used within lasso_tag_funcs that were registered as being a type initializer (flag_typeInitializer). It initializes a blank custom type and sets the type's name to the provided value. The new type does not yet have a lineage and has no members added to it. New data or tag members should be added using lasso_typeAddMember. The new type must be the return value of the tag call, set via lasso_returnTagValue. Any inherited members will be added to the type after the LCAPI call returns.

Warning:
Do NOT call this unless you are in a type initializer. If you are not in a type initializer, the result will be a type that will never be fully initialized.
Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outCustom The resulting newly allocated custom type.
name The new type's name.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocDecimal lasso_request_t  token,
lasso_type_t outDecimal,
double  value
 

Allocates a new instance of type decimal.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outDecimal The resulting new type instance.
value The double value which the new type instance will hold.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocDecimal2 lasso_request_t  token,
lasso_type_t outDecimal,
double  value,
int  precision
 

Allocates a new instance of type decimal.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outDecimal The resulting new type instance.
value The double value which the new type instance will hold.
precision The decimal precision that the new type instance will output to.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocFromProto lasso_request_t  token,
lasso_type_t  proto,
lasso_type_t out
 

Allocate a new type instance based on the given type instance.

The given type's tag members will be referenced in the new type. No data members are added to the new type.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
proto The original type instance whose tag members will be referenced.
out The resulting new type instance.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocInteger lasso_request_t  token,
lasso_type_t outInteger,
osInt64  value
 

Allocates a new instance of type integer.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outInteger The resulting new type instance.
value The integer value which the new type instance will hold.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocMap lasso_request_t  token,
lasso_type_t outMap,
int  count,
lasso_type_t elements
 

Allocates a new instance of type map.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outMap The resulting new type instance.
count The number of new map elements to insert. Half the number of items in the elements parameter.
elements A pointer to an array of lasso_type_t which will become the elements of the map. Each even numbered item will be treated as the key for for following element.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocNull lasso_request_t  token,
lasso_type_t outNull
 

Allocates a new instance of type null.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outNull The resulting new type instance.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocOneOff lasso_request_t  token,
const char *  name,
const char *  parentTypeName,
lasso_type_t out
 

Allocate a new type with the given name.

The type does not have to have been registered as a type initializer or registered at all. The new type will have no tag or data members, but those may be added using the appropriate LCAPI call at any time. If no parent type name is provided (a NULL pointer or empty string is passed in), type null will be the default. If a parent type name is provided, it must have been a previously registered type initializer. onCreate will be called for the parent and any of its parents, but will not be called for the new type instance itself.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
name the name for the new type instance.
parentTypeName The name of the parent type.
out The new type instance.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocOneOffW lasso_request_t  token,
const UChar *  name,
const UChar *  parentTypeName,
lasso_type_t out
 

Allocate a new type with the given name.

The type does not have to have been registered as a type initializer or registered at all. The new type will have no tag or data members, but those may be added using the appropriate LCAPI call at any time. If no parent type name is provided (a NULL pointer or empty string is passed in), type null will be the default. If a parent type name is provided, it must have been a previously registered type initializer. onCreate will be called for the parent and any of its parents, but will not be called for the new type instance itself.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
name the name for the new type instance.
parentTypeName The name of the parent type.
out The new type instance.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocPair lasso_request_t  token,
lasso_type_t outPair,
lasso_type_t  first,
lasso_type_t  second
 

Allocates a new instance of type pair.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outPair The resulting new type instance.
first The instance to use for the first member of the pair. A reference to the instance will be made.
second The instance to use for the second member of the pair. A reference to the instance will be made.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocReference lasso_request_t  token,
lasso_type_t outRef,
lasso_type_t  referenced
 

Allocates a new hard reference to a type instance. The new instance will point to the original.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outRef The resulting new type instance.
referenced The instance to be referenced.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocString lasso_request_t  token,
lasso_type_t outString,
const char *  value,
int  length
 

Allocates a new instance of type string.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outString The resulting new type instance.
value The UTF-8 data from which to copy for the new string instance.
length The length of the UTF-8 data in characters.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocStringConv lasso_request_t  token,
lasso_type_t outString,
const char *  value,
int  length,
const char *  conv
 

Allocates a new instance of type string using the specified conversion method.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outString The resulting new type instance.
value The source data from which to copy for the new string instance.
length The length of the source data in bytes.
conv The encoding of the source data.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocStringW lasso_request_t  token,
lasso_type_t outString,
const UChar *  value,
int  length
 

Allocates a new instance of type string.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outString The resulting new type instance.
value The UTF-16 data from which to copy for the new string instance.
length The length of the UTF-16 data in characters.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocTag lasso_request_t  token,
lasso_type_t outTag,
lasso_tag_func  nativeTagFunction
 

Allocates a new instance of type tag.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outTag The resulting new type instance.
nativeTagFunction The LCAPI lasso_tag_func which will be called when the tag is used.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocTagFromSource lasso_request_t  token,
lasso_type_t outTag,
const char *  source,
int  length
 

Allocates a new instance of type tag from the given source text.

If the source text is UTF-8, it must contain a BOM or it will be treated as the default platform encoding.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
outTag The resulting new type instance.
source The source text which will be compiled to become the body of the tag.
length The length of the source text in characters.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAllocW lasso_request_t  token,
const UChar *  typeName,
int  paramCount,
lasso_type_t paramsArray,
lasso_type_t outType
 

Allocates a new type instance.

The name of the type to allocate is signified by the second parameter. If a type initializer is found for the given name, it will be executed. An array of lasso_type_t parameters can be passed to the type initializer.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
typeName The name of the type to instantiate.
paramCount The number of lasso_type_t parameters to pass to the initializer.
paramsArray An array of parameters to pass to the type initializer.
outType A pointer to the newly instantiated type.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAppendString lasso_request_t  token,
lasso_type_t  type,
const char *  val,
int  len
 

Appends additional data to the string instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance which will be appended to.
val The source data to append in UTF-8 encoding.
len The number of bytes of source data to be appended.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAppendStringW lasso_request_t  token,
lasso_type_t  type,
const UChar *  val,
int  len
 

Appends additional data to the string instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance which will be appended to.
val The source data to append.
len The number of characters of source data to be appended.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeAssign lasso_request_t  token,
lasso_type_t  left_hand_side,
lasso_type_t  right_hand_side
 

Performs an assignment of one type to another.

The result will be the same as if the following had been executed in LDML: #left_hand_side = #right_hand_side

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
left_hand_side The left hand side of the operation.
right_hand_side The right hand side of the operation.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeClearFlag lasso_request_t  token,
lasso_type_t  type,
int  flag
 

Removes the flag for the given type instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance.
flag The flag to remove from the type instance.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeCollect lasso_request_t  token,
lasso_type_t  inType
 

Remove the LCAPI call's reference to a type instance.

The LCAPI garbage collection system usually holds a reference to any used type instances. Calling this will remove that reference, which may result in the instance being destroyed at that point. Usage of a type pointer after calling this is not permitted unless the type has been "referred" to previously using lasso_typeRefer.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
inType The type instance to operate on.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeFree lasso_request_t  token,
lasso_type_t  inType
 

Subtract 1 from an instance's reference count.

Once the instance's reference count reaches zero, it is destroyed and the lasso_type_t is no longer valid. The lasso_request_t token may be NULL if it is not available for any reason.

Warning:
ONLY call this if you have previously called lasso_typeRefer using the same type instance or the result may be a double free.
Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
inType The type instance which should be unreferred to.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetBoolean lasso_request_t  token,
lasso_type_t  type,
bool *  out
 

Retrieves the boolean value from a type instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance from which to retieve the boolean value.
out A pointer to the resulting boolean.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetChild lasso_request_t  token,
lasso_type_t  from,
lasso_type_t outChild
 

Retrieves the child of the provided instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
from The parent instance from which to retrieve the child.
outChild A pointer in which to return the child.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetDecimal lasso_request_t  token,
lasso_type_t  type,
double *  out
 

Retrieves the decimal value from a type instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance from which to retieve the decimal value.
out A pointer to the resulting double.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetInteger lasso_request_t  token,
lasso_type_t  type,
osInt64 *  out
 

Retrieves the integer value from a type instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance from which to retieve the integer value.
out A pointer to the resulting 64-bit integer.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetMember lasso_request_t  token,
lasso_type_t  from,
const char *  named,
lasso_type_t out
 

Retrieves a member from a type instance.

Members are searched for by name with tag members being searched first. Data members are searched if no tag is found with the given name.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
from The type instance in which to search.
named The name of the member to look for.
out A pointer to a type instance in which to store the found member.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetMemberW lasso_request_t  token,
lasso_type_t  from,
const UChar *  named,
lasso_type_t out
 

Retrieves a member from a type instance.

Members are searched for by name with tag members being searched first. Data members are searched if no tag is found with the given name.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
from The type instance in which to search.
named The name of the member to look for.
out A pointer to a type instance in which to store the found member.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetName lasso_request_t  token,
lasso_type_t  target,
auto_lasso_value_t outName
 

Returns the name of the target type.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
target The type instance to get the name of.
outName The resulting name which will be stored in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetNameW lasso_request_t  token,
lasso_type_t  target,
auto_lasso_value_w_t outName
 

Returns the name of the target type.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
target The type instance to get the name of.
outName The resulting name which will be stored in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetParent lasso_request_t  token,
lasso_type_t  from,
lasso_type_t outParent
 

Retrieves the parent of the provided type instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
from The child instance from which to retrieve the parent.
outParent A pointer in which to return the parent.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetString lasso_request_t  token,
lasso_type_t  type,
auto_lasso_value_t val
 

Retrieves character data from a type instance.

If the type is a string instance, the data will be converted to UTF-8. If the type is a bytes instance, the data will be provided unaltered. For any other type, the result will be the same as converting the type into a string and returning the data as UTF-8.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance from which to retrieve the character data.
val A pointer to a lasso_value_t struct in which to store the result. The data will be stored in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetStringConv lasso_request_t  token,
lasso_type_t  type,
auto_lasso_value_t val,
const char *  conv
 

Retrieves character data from a type instance using the specified conversion method. If the special conversion method of "BINARY" is used, and the source type is a string, the resulting data will be UTF-16 data. If the special conversion method of "BINARY" is used, and the source type is bytes, the resulting data will be provided unaltered. For any other type, if the special conversion method of "BINARY" is used, the result will be the same as converting the instance to a string and retrieving the UTF-16 data.

The remaining possible values for the conversion method are any of the character encoding methods supported by ICU or any of the converters stored in the '__external_converters__' global variable.

In all cases, the nameSize portion of the resulting value struct will be the number of bytes in the result data.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance from which to retrieve the character data.
val A pointer to a lasso_value_t struct in which to store the result. The data will be stored in the name portion of the struct.
conv The encoding method to use when transforming the Unicode string data.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeGetStringW lasso_request_t  token,
lasso_type_t  type,
auto_lasso_value_w_t val
 

Retrieves Unicode character data from a type instance.

For any type other than string, the result will be the same as converting the type into a string and returning the data as UTF-16.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance from which to retrieve the character data.
val A pointer to a lasso_value_w_t struct in which to store the result. The data will be stored in the name portion of the struct.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeHasFlag lasso_request_t  token,
lasso_type_t  type,
int  flag
 

Tests the flag for the given type instance.

Returns osErrNoErr if the flag is set for that type instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance to be tested.
flag The flag to test for.
Returns:
If the flag is set, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeInheritFrom lasso_request_t  token,
lasso_type_t  child,
lasso_type_t  newParent
 

Changes the inheritence structure of a type.

Sets newParent to be the new parent of child Any parent that child currently has will be destroyed

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
child The child instance which will have its inheritance changed.
newParent The new parent for the child.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeIsA lasso_request_t  token,
lasso_type_t  target,
LP_TypeDesc  type
 

Tests to see if a type is an instance of another type.

Test by type code.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
target The target instance to test.
type The type code to test for.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeIsA2 lasso_request_t  token,
lasso_type_t  target,
const char *  typeName
 

Tests to see if a type is an instance of another type.

Test by type name.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
target The target instance to test.
typeName The type name to test for.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeIsA2W lasso_request_t  token,
lasso_type_t  target,
const UChar *  typeName
 

Tests to see if a type is an instance of another type.

Test by type name.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
target The target instance to test.
typeName The type name to test for.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeIsA3 lasso_request_t  token,
lasso_type_t  target,
lasso_type_t  type
 

Tests to see if a type is an instance of another type.

Test based on another type instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
target The target instance to test.
type The type name to test for.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeRefer lasso_request_t  token,
lasso_type_t  toRefer
 

Add 1 to an instance's reference count.

Type instances each have a reference count. Types created or otherwise referenced or received during an LCAPI call can be assumed to have a reference count of at least 1. If client code wishes to utilize any type instance beyond the end of the LCAPI call, it should add 1 to the instance's reference count. This is called "referring to" an instance. When client code has finished utilizing any "referred to" instance, it should subtract 1 from the instance's reference count using lasso_typeFree. When a type instance's reference count reaches zero, the instance is destroyed.

LCAPICALL osError lasso_typeRunTag lasso_request_t  token,
const char *  name,
lasso_type_t  tagType,
int  paramCount,
lasso_type_t params,
lasso_type_t returnValue,
lasso_type_t  optionalTarget
 

Execute a given tag.

The tag can be run given a specific name and an array of parameters. The tag's return value can be accessed. If the tag is a member tag, the instance of which it is a member can be passed using the final parameter. The params, returnValue and optionalTarget parameters may all be NULL.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
name The name for the tag.
tagType The tag instance to be executed.
paramCount The number of parameters passed in the params array.
params The array of parameters for the tag. May be NULL.
returnValue A pointer in which to store the return value.
optionalTarget The target instance for a member tag call. May be NULL if the tag is not a member tag.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeRunTagW lasso_request_t  token,
const UChar *  name,
lasso_type_t  tagType,
int  paramCount,
lasso_type_t params,
lasso_type_t returnValue,
lasso_type_t  optionalTarget
 

Execute a given tag.

The tag can be run given a specific name and an array of parameters. The tag's return value can be accessed. If the tag is a member tag, the instance of which it is a member can be provided using the final parameter. The params, returnValue and optionalTarget parameters may all be NULL.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
name The name for the tag.
tagType The tag instance to be executed.
paramCount The number of parameters passed in the params array.
params The array of parameters for the tag. May be NULL.
returnValue A pointer in which to store the return value.
optionalTarget The target instance for a member tag call. May be NULL if the tag is not a member tag.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeSetBoolean lasso_request_t  token,
lasso_type_t  type,
bool  val
 

Sets the boolean value of a type instance, converting the type if necessary.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance which will be set to the provided boolean.
val The boolean value to use.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeSetCustomDtor lasso_type_t  the_custom_type,
void(*  dtor)(lasso_type_t the_custom_type)
 

Adds a C function to be called after onDestroy.

Adds a user provided C function which will be called after onDestroy has been invoked on the instance.

Parameters:
the_custom_type The custom type instance which will have the C function added.
dtor The C function to add. The C function must accept one parameter, which is the type instance in question.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeSetDecimal lasso_request_t  token,
lasso_type_t  type,
double  val
 

Sets the decimal value of a type instance, converting the type if necessary.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance which will be set to the provided double.
val The double value to use.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeSetDecimal2 lasso_request_t  token,
lasso_type_t  type,
double  val,
int  precision
 

Sets the decimal value of a type instance, converting the type if necessary.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance which will be set to the provided integer.
val The integer value to use.
precision The decimal precision which the decimal instance will output to.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeSetFlag lasso_request_t  token,
lasso_type_t  type,
int  flag
 

Sets the flag for the given type instance.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance on which to set the flag.
flag The flag to set.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeSetInteger lasso_request_t  token,
lasso_type_t  type,
osInt64  val
 

Sets the integer value of a type instance, converting the type if necessary.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance which will be set to the provided integer.
val The integer value to use.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeSetString lasso_request_t  token,
lasso_type_t  type,
const char *  val,
int  len
 

Converts the type instance into a string and sets the value.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance to set.
val The source data in UTF-8 encoding.
len The length of the source UTF-8 data.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeSetStringConv lasso_request_t  token,
lasso_type_t  type,
const char *  val,
int  len,
const char *  conv
 

Converts the type instance using the specified source data and conversion method. If the special conversion method of "BINARY" is used, the type instance will be converted into a bytes type, the contents of which will be the unaltered source data.

The remaining possible values for the conversion method are any of the character encoding methods supported by ICU or any of the converters stored in the '__internal_converters__' global variable.

If any of the built-in ICU conversion methods are used, the provided instance will be converted into a string type. If any other conversion methods are used, the resulting type of the provided instance can can vary.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance to be converted.
val A pointer the source data to be used for the conversion.
len The length of the source data in bytes.
conv The conversion method to use when transforming type instance.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeSetStringW lasso_request_t  token,
lasso_type_t  type,
const UChar *  val,
int  len
 

Converts the type instance into a string and sets the value.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
type The type instance to set.
val The source data.
len The length of the source data.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.

LCAPICALL osError lasso_typeStealValue lasso_request_t  token,
lasso_type_t  thief,
lasso_type_t  victim
 

Transfer the data from one type to another type.

After the call, victim will still be valid, but will be of type null, while the thief will contain all the data previously contained by the victim.

Parameters:
token The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
thief The thief which will take the value of the victim.
victim The victim which will lose its value.
Returns:
If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.


Variable Documentation

const int flag_deprecated = 0x00001000
 

Use of the tag is deprecated.

Depending on the administrator's configuration, calling the tag will automatically output a warning to the logging system.

const int flag_noGlobalImport = 0x00000400
 

The tag should not be automatically imported into the global namespace.

All LCAPI tags, starting with LP8, which are registered with a namespace should specify this flag.

const int flag_typeAsync = 0x00000004
 

The tag is to be run in its own thread.

It will return no value to the caller.

const int flag_typeContainerTag = 0x00000008
 

The tag is a container tag.

The tag must be called using the proper

tag; ... /tag;
syntax or an error is generated. The result of executing any body statements can be retrieved using the lasso_childrenRun function.

const int flag_typeEval = 0x00000200
 

Used internally.

Not useful for LCAPI tag types.

const int flag_typeLoopingTag = 0x00000100
 

The tag is a looping container tag.

For any tag registered with this flag, Lasso will automatically keep track of the loop_count and increment it each time the tag calls lasso_childrenRun.

const int flag_typeSkipSecurityCheck = 0x00000040
 

Bypass any security checks for the tag.

Useful to avoid any performance hits associated with security checks. Should only be used when a tag performs only trival or completely secure operations.

const int flag_typeSubstitutionTag = 0x00000002
 

The tag is to be treated as a "regular" tag.

This is the default behavior so this flag is not required.

const int flag_User1 = 0x01000000
 

User defined flag.

May be used with lasso_tagSetFlag, lasso_tagHasFlag, lasso_tagClearFlag OR lasso_typeSetFlag, lasso_typeHasFlag, lasso_typeClearFlag

const int flag_User2 = 0x02000000
 

User defined flag.

May be used with lasso_tagSetFlag, lasso_tagHasFlag, lasso_tagClearFlag OR lasso_typeSetFlag, lasso_typeHasFlag, lasso_typeClearFlag

const int flag_User3 = 0x03000000
 

User defined flag.

May be used with lasso_tagSetFlag, lasso_tagHasFlag, lasso_tagClearFlag OR lasso_typeSetFlag, lasso_typeHasFlag, lasso_typeClearFlag

const int flag_User4 = 0x04000000
 

User defined flag.

May be used with lasso_tagSetFlag, lasso_tagHasFlag, lasso_tagClearFlag OR lasso_typeSetFlag, lasso_typeHasFlag, lasso_typeClearFlag

const int REG_FLAGS_CONTAINER_DEFAULT = (flag_typeContainerTag | flag_noGlobalImport)
 

Recommended default registration flags.

For a container tag.

const int REG_FLAGS_LOOPING_DEFAULT = (flag_typeLoopingTag | flag_noGlobalImport)
 

Recommended default registration flags.

For a looping container tag.

const int REG_FLAGS_TAG_DEFAULT = (flag_typeSubstitutionTag | flag_noGlobalImport)
 

Recommended default registration flags.

For a normal tag.

const int REG_FLAGS_TYPE_DEFAULT = (flag_typeInitializer | flag_noGlobalImport)
 

Recommended default registration flags.

For a type initializer tag.


Generated on Mon Nov 15 10:33:10 2004 for LassoCAPI by doxygen 1.3.8