C/C++ Reference for LCAPI¶
LassoCAPI.h¶
LassoCAPI Main Header File.
This file contains all of the available LCAPI defines and functions.
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.
This is the default behavior so this flag is not required.
-
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 syntax or an error is generated. The result of executing any body statements can be retrieved using the lasso_childrenRun function.
-
const int
flag_typeInterstitial
= 0x00000010¶ Used internally.
-
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_INTERNALONLY
= 0x00000080¶ Used internally.
-
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_typeEval
= 0x00000200¶ Used internally. Not useful for LCAPI tag types.
-
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_INTERNALONLY2
= 0x00000800¶ Used internally.
-
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_noDefaultEncoding
= 0x00002000¶ Never apply default HTML encoding to the tag’s return value.
-
const int
flag_INTERNALONLY3
= 0x00004000¶
-
const int
flag_prototype
= 0x00008000¶ Applies only to types registered with lasso_registerTypeModule.
An instance of the type will be created immediately (onCreate will not be called). Any further calls to this type will result in a fast copy of the prototype being created.
-
const int
flag_atomic
= 0x00010000¶
-
const int
flag_private
= 0x00020000¶
-
const int
flag_nonBlockingCAPI
= 0x00040000¶
-
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_TAG_DEFAULT
= (flag_typeSubstitutionTag | flag_noGlobalImport)¶ Recommended default registration flags.
For a normal tag.
-
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_TYPE_DEFAULT
= (flag_typeInitializer | flag_noGlobalImport)¶ Recommended default registration flags.
For a type initializer tag.
Type Registration
These functions are called to register a new type.
-
LCAPICALL osError
lasso_registerTypeModule
(const char * namespaceName, const char * tagName, lasso_tag_func func, int flags, const char * description, const char * superType)¶ Registers a new type.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_registerTypeModuleW
(const UChar * namespaceName, const UChar * tagName, lasso_tag_func func, int flags, const UChar * description, const UChar * superType)¶
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)¶ Registers a new datasource module.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_registerDSModuleW
(const UChar * moduleName, lasso_ds_func func, int flags)¶
-
LCAPICALL osError
lasso_registerDSModule2
(const char * moduleName, lasso_ds_func func, int flags, void * userData, void(*userDataDtor)(void *))¶
-
LCAPICALL osError
lasso_registerDSModule2W
(const UChar * moduleName, lasso_ds_func func, int flags, void * userData, void(*userDataDtor)(void *))¶
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)¶ Allocates a new instance of type null.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeAllocVoid
(lasso_request_t token, lasso_type_t * outVoid)¶ Allocates a new instance of type void.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
token
: The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.outVoid
: The resulting new type instance.
-
LCAPICALL osError
lasso_typeAllocString
(lasso_request_t token, lasso_type_t * outString, const char * value, int length)¶ Allocates a new instance of type string.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeAllocStringW
(lasso_request_t token, lasso_type_t * outString, const UChar * value, int length)¶ Allocates a new instance of type string.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeAppendStringW
(lasso_request_t token, lasso_type_t type, const UChar * val, int len)¶
-
LCAPICALL osError
lasso_typeAllocInteger
(lasso_request_t token, lasso_type_t * outInteger, int64_t value)¶ Allocates a new instance of type integer.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeAllocDecimal
(lasso_request_t token, lasso_type_t * outDecimal, double value)¶ Allocates a new instance of type decimal.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeAllocDecimal2
(lasso_request_t token, lasso_type_t * outDecimal, double value, int precision)¶ Allocates a new instance of type decimal.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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. This is a no-op under Lasso 9.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeAllocTag
(lasso_request_t token, lasso_type_t * outTag, lasso_tag_func nativeTagFunction)¶ Allocates a new instance of type tag.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeAllocBoolean
(lasso_request_t token, lasso_type_t * outBool, bool inValue)¶ Allocates a new instance of type boolean.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
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)¶ 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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeGetInteger
(lasso_request_t token, lasso_type_t type, int64_t * out)¶ Retrieves the integer value from a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeGetDecimal
(lasso_request_t token, lasso_type_t type, double * out)¶ Retrieves the decimal value from a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeGetBoolean
(lasso_request_t token, lasso_type_t type, bool * out)¶ Retrieves the boolean value from a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_arrayGetSize
(lasso_request_t token, lasso_type_t array, int * len)¶ Retrieves the size of the provided array instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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. If the index is greater than the array’s current size or is less than zero, the new item is added to the end of the array.elem
: The type instance which will be placed at the specified index. The instance will be referenced.
-
LCAPICALL osError
lasso_pairGetFirst
(lasso_request_t token, lasso_type_t pr, lasso_type_t * out)¶ Retrieves the first member from the provided pair.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_pairGetSecond
(lasso_request_t token, lasso_type_t pr, lasso_type_t * out)¶ Retrieves the second member from the provided pair.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_pairSetFirst
(lasso_request_t token, lasso_type_t pr, lasso_type_t frst)¶ Sets the first member of the provided pair.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_pairSetSecond
(lasso_request_t token, lasso_type_t pr, lasso_type_t scnd)¶ Sets the second member of the provided pair.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
Datasource Module Functions
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getTableName
(lasso_request_t token, auto_lasso_value_t * t)¶ Gets the currently specified table name.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getTableEncoding
(lasso_request_t token, auto_lasso_value_t * t)¶ Gets the currently specified table encoding. This is the encoding as set in SiteAdmin for the current table.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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 encoding which will be placed in the name portion of the struct.
-
LCAPICALL osError
lasso_getSchemaName
(lasso_request_t token, auto_lasso_value_t * schema)¶ Gets the currently specified schema name.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getDataHostID
(lasso_request_t token, int * outId)¶ Returns the id of the host that maintains the current database.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
token
: The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.outId
: The resulting host id.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getDataHostExtra
(lasso_request_t token, auto_lasso_value_t * data)¶ Returns the “extra” information associated with the current host.
The data, if any, will be placed in the name portion of the struct.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
token
: The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.data
: The resulting extra host data.
-
LCAPICALL osError
lasso_getDataHostIsDynamic
(lasso_request_t token, bool * wasDyn)¶ Indicates if the host is dynamic.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
token
: The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.wasDyn
: Will be set to true if the host was dynamic and false if it was not.
-
LCAPICALL osError
lasso_getSkipRows
(lasso_request_t token, int * recs)¶ The number of rows that should be skipped in the found set.
-skiprecords
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getMaxRows
(lasso_request_t token, int * recs)¶ The maximum number of rows in the found set to return.
-maxrecords
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_setRowID
(lasso_request_t token, int id)¶ Sets the currently specified record id (FileMaker specific).
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_setRowID2
(lasso_request_t token, unsigned long long id)¶
-
LCAPICALL osError
lasso_getRowID2
(lasso_request_t token, unsigned long long * id)¶
-
LCAPICALL osError
lasso_getRowID
(lasso_request_t token, int * id)¶ Gets the currently specified record id (FileMaker specific).
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getPrimaryKeyColumn2
(lasso_request_t token, int index, auto_lasso_value_t * v, LP_TypeDesc * desc)¶ Gets the name and the value of the primary key column specified by index.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.desc
: A pointer to a LP_TypeDesc in which to place the original type of the input data.
-
LCAPICALL osError
lasso_getPrimaryKeyColumn3
(lasso_request_t token, int index, auto_lasso_value_t * keyName, lasso_type_t * type)¶ Gets the name and the value of the primary key column specified by index, preserving the original type.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.keyName
: The name of the key field will be stored in the name member.type
: The value portion of the key field in its original type.
-
LCAPICALL osError
lasso_getPrimaryKeyColumnCount
(lasso_request_t token, int * count)¶ Gets the number of key columns.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
token
: The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.count
: A pointer to an int in which the number of key columns will be placed.
-
LCAPICALL osError
lasso_getInputColumnCount
(lasso_request_t token, int * count)¶ Gets the number of input columns for this database action.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getSortColumnCount
(lasso_request_t token, int * count)¶ Gets the number of sort columns for this database action.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getInputColumn
(lasso_request_t token, int num, auto_lasso_value_t * v)¶ Gets an individual input column by index.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getInputColumn2
(lasso_request_t token, int num, auto_lasso_value_t * v, LP_TypeDesc * desc)¶ Gets an individual input column by index.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.desc
: A pointer to a LP_TypeDesc in which to place the original type of the input data.
-
LCAPICALL osError
lasso_getInputColumn3
(lasso_request_t token, int num, auto_lasso_value_t * colName, lasso_type_t * type)¶ Gets an individual input column by index, preserving the original type.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.colName
: The name of the column will be stored in the name member.type
: The value portion of the input column in its original type.
-
LCAPICALL osError
lasso_getSortColumn
(lasso_request_t token, int num, auto_lasso_value_t * v)¶ Gets an individual sort column by index.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_findInputColumn
(lasso_request_t token, const char * name, auto_lasso_value_t * value)¶ Gets an individual input column by name.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_findInputColumnW
(lasso_request_t token, const UChar * name, auto_lasso_value_t * value)¶ Gets an individual input column by name.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getLogicalOp
(lasso_request_t token, LP_TypeDesc * op)¶ Gets the logical operator for this database action.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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 at the top of this file.
-
LCAPICALL osError
lasso_getReturnColumnCount
(lasso_request_t token, int * count)¶ Gets the number of return columns for this action.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getReturnColumn
(lasso_request_t token, int num, auto_lasso_value_t * v)¶ Gets an individual return column by index.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_addResultRow
(lasso_request_t token, const char ** columns, unsigned long * dataSizes, int numColumns)¶ Add the column data for the next result row.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_addResultRow2
(lasso_request_t token, lasso_type_t * cols, int num)¶ Add the column data for the next result row. Column data is represented as Lasso types.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
token
: The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.cols
: An array of column values.num
: The number of items in the cols array.
-
LCAPICALL osError
lasso_addResultSet
(lasso_request_t token)¶ Adds a new result set to the datasource results.
At the onset of each LCAPI datasource call, there is an initial blank result set created. This is the first result set. After a datasource has added all the data for the first result set, if there is a second result set, the datasource should call lasso_addResultSet to start a new set and then proceed to populate the column information and data for that set as normal. This should be repeated for each result set. lasso_addResultSet should be called for each result set after the first. Calling lasso_addResultSet before populating the first result set will result in the first set being empty.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
token
: The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getDataSourceModuleName
(lasso_request_t token, auto_lasso_value_t * val)¶ Returns the name the current datasource module was registered with.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_setDSPreparedPtr
(lasso_request_t token, void * ptr)¶ Allows a datasource to set a prepared statement pointer.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
token
: The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.ptr
: The pointer value to set for later retrieval.
-
LCAPICALL osError
lasso_getDSPreparedPtr
(lasso_request_t token, void ** ptr)¶ Allows a datasource to get a previously set prepared statement pointer.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
token
: The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.ptr
: The pointer, if it has been presiously set, will be placed in this parameter.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getDSUserData
(lasso_request_t token, void ** outPtr)¶ Provides access to the “user data” that was set when the datasorce was registered.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
token
: The request token which should be passed to subsequent LCAPI functions for the duration of the current service function call.outPtr
: The pointer in which the user data 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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getIsStatementOnly
(lasso_request_t token, bool * out)¶ Used to check for the -statementonly inline param.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
Logging Functions
-
enum
log_level_t
¶ The various log levels.
Each log level can be configured to go to zero or more destinations.
Values:
-
LOG_LEVEL_ALWAYS
¶ Always printed to window (only). Used internally in a few places.
-
-
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.
-
LCAPICALL osError
lasso_log
(log_level_t msgLevel, const char * fmt, ...)¶ Log a message to stdout.
Defines
-
MACHINE_PC
¶
-
MACHINE_UNIX
¶
-
UCP
(X)¶
-
kLPOpBegin
¶
-
kLPOperatorBegin
¶
-
kLPOpEnd
¶
-
kLPOperatorEnd
¶
-
kLPOpBeginW
¶
-
kLPOperatorBeginW
¶
-
kLPOpEndW
¶
-
kLPOperatorEndW
¶
-
FD_SETSIZE
¶
-
LPW
(X)¶
-
LCAPICALL
¶
-
LCAPI_DEPRECATED
¶
-
LCAPI_VERSION
¶ Defines for testing the LCAPI versionCurrent Lasso Version.
-
LCAPI_VERSION_1
¶ Lasso Version 5. First LCAPI release
-
LCAPI_VERSION_2
¶ Lasso Version 6. Second LCAPI release
-
LCAPI_VERSION_3
¶ Lasso Version 7. Third LCAPI release
-
LCAPI_VERSION_4
¶ Lasso Version 8. Fourth LCAPI release
-
LCAPI_VERSION_9
¶ Lasso Version 9
-
INITVAL
(X)¶ 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);
-
SET_MATCHED_NAME
(param)¶
Typedefs
-
typedef enum lpEncodingType
encodingMethod
¶
-
typedef unsigned int
LP_TypeDesc
¶
-
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 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.
-
typedef struct lasso_request_t_ *
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 struct lasso_type_t_ *
lasso_type_t
¶ Represents a type within Lasso.
This opaque value represents an instance of a type within Lasso
-
typedef struct lasso_dsconnection_t_ *
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 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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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
char osPathname[1024]
Enums
-
enum
[anonymous]
¶ Values:
-
kLassoGreaterThan
= '> '¶
-
kLassoGreaterThanEquals
= '>= '¶
-
kLassoEquals
= '= '¶
-
kLassoLessThan
= '< '¶
-
kLassoLessThanEquals
= '<= '¶
-
kLassoBeginsWith
= 'bgwt'¶
-
kLassoEndsWith
= 'ends'¶
-
kLassoContains
= 'cont'¶
-
kLassoNotContains
= '!cts'¶
-
kLassoNotBeginsWith
= '!bgs'¶
-
kLassoNotEndsWith
= '!end'¶
-
kLassoAND
= 'AND '¶
-
kLassoOR
= 'OR '¶
-
kLassoNOT
= 'NOT '¶
-
kLassoNo
= 'no '¶
-
kLassoAny
= 'any '¶
-
kLassoInList
= ' nlt'¶
-
kLassoNotInList
= '!nlt'¶
-
kLassoInFullText
= ' ftx'¶
-
kLassoInRegExp
= ' rxp'¶
-
kLassoNotInRegExp
= '!rxp'¶
-
-
enum
lpEncodingType
¶ Values:
-
encodeURL
¶
-
encodeRaw
¶
-
encodeSmart
¶
-
encodeBreak
¶
-
encodeDefault
¶
-
encodeStrictURL
¶
-
encodeXML
¶
-
encodeNone
¶
-
encodeHTML
¶
-
-
enum
osError
¶ Values:
-
osErrNoErr
= 0¶
-
osErrAssert
= -10000¶
-
osErrStreamReadError
¶
-
osErrStreamWriteError
¶
-
osErrMemory
¶
-
osErrInvalidMemoryObject
¶
-
osErrOutOfMemory
¶
-
osErrOutOfStackSpace
¶
-
osErrCouldNotLockMemory
¶
-
osErrCouldNotUnlockMemory
¶
-
osErrCouldNotDisposeMemory
¶
-
osErrFile
¶
-
osErrFileInvalid
¶
-
osErrFileInvalidAccessMode
¶
-
osErrCouldNotCreateOrOpenFile
¶
-
osErrCouldNotCloseFile
¶
-
osErrCouldNotDeleteFile
¶
-
osErrFileNotFound
¶
-
osErrFileAlreadyExists
¶
-
osErrFileCorrupt
¶
-
osErrVolumeDoesNotExist
¶
-
osErrDiskFull
¶
-
osErrDirectoryFull
¶
-
osErrIOError
¶
-
osErrInvalidPathname
¶
-
osErrInvalidFilename
¶
-
osErrFileLocked
¶
-
osErrFileUnlocked
¶
-
osErrFileIsOpen
¶
-
osErrFileIsClosed
¶
-
osErrBOF
¶
-
osErrEOF
¶
-
osErrCouldNotWriteToFile
¶
-
osErrCouldNotReadFromFile
¶
-
osErrResNotFound
¶
-
osErrResource
¶
-
osErrNetwork
¶
-
osErrInvalidUsername
¶
-
osErrInvalidPassword
¶
-
osErrInvalidDatabase
¶
-
osErrNoPermission
¶
-
osErrFieldRestriction
¶
-
osErrWebAddError
¶
-
osErrWebUpdateError
¶
-
osErrWebDeleteError
¶
-
osErrInvalidParameter
¶
-
osErrOverflow
¶
-
osErrNilPointer
¶
-
osErrUnknownError
¶
-
osErrLoopAborted
¶
-
osErrSyntaxError
¶
-
osErrDivideByZero
¶
-
osErrIllegalInstruction
¶
-
osErrTagNotFound
¶
-
osErrVarNotFound
¶
-
osErrAborted
¶
-
osErrFailure
¶
-
osErrPreconditionFailed
¶
-
osErrPostconditionFailed
¶
-
osErrCriteriaNotMet
¶
-
osErrIllegalUseOfFrozenInstance
¶
-
osErrCompilationError
¶
-
osErrNotImplemented
¶
-
osErrSyntaxWarning
¶
-
osErrWebRequiredFieldMissing
= -800¶
-
osErrWebRepeatingRelatedField
= -801¶
-
osErrWebNoSuchObject
= -1728¶
-
osErrWebTimeout
= -1712¶
-
osErrWebActionNotSupported
= -802¶
-
osErrConnectionInvalid
= -609¶
-
osErrWebModuleNotFound
= -2000¶
-
osErrHTTPFileNotFound
= 404¶
-
osErrDatasourceError
= -3000¶
-
-
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.
Values:
-
datasourceInit
¶ Sent when a new “instance” of the datasource module is created.
-
datasourceTerm
¶ Sent when the “instance” of the datasource module is destroyed.
-
datasourceExists
¶
-
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.
-
datasourceDuplicate
¶
-
datasourceScripts
¶
-
datasourceImage
¶
-
datasourceFindAll
¶ Sent when the datasource module is to perform a -findall action.
-
datasourceMatchesName
¶ Sent to the datasource to find out if it “goes” under the given name. The name which is being tested will be passed in the name member of the param parameter. The data member of the param parameter will be NULL and the dataSize member will be zero. If the name matches the name the datasource goes under, the datasource should both set the dataSize member to non-zero and return osErrNoErr. Otherwise, it is assumed that the name is not a matching name for the datasource module.
-
datasourcePrepareSQL
¶ Sent to the datasource to prepare a sql statement for later execution. This is sent when the datasource action was -prepare. The statement text is sent to the datasource in the data member of the param parameter that is passed to each datasource call.
-
datasourceUnprepareSQL
¶ Sent to the datasource after a datasourcePrepareSQL action. This permits the datasource to perform and necessary cleanup activities after executing a prepared statement.
-
datasourceMAXIMUM
¶
-
datasourceNothing
= -1¶
-
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.
Anything allocated with this function will NOT be garbage collected by Lasso and must be freed using lasso_freeValue.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
result
: The lasso_value_t whose members will be freed.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
result
: The lasso_value_w_t whose members will be freed.
-
LCAPICALL osError
lasso_registerTagModule
(const char * namespaceName, const char * tagName, lasso_tag_func func, int flags, const char * description)¶ Registers a new tag.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_registerTagModuleW
(const UChar * namespaceName, const UChar * tagName, lasso_tag_func func, int flags, const UChar * description)¶
-
LCAPICALL osError
lasso_typeGetTrait
(lasso_request_t token, lasso_type_t from, lasso_type_t * into)¶
-
LCAPICALL osError
lasso_setResultMessage
(lasso_request_t token, const char * msg)¶ Set result message string.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_setResultMessageW
(lasso_request_t token, const UChar * msg)¶ Set result message string.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeAddTagMember
(lasso_request_t token, lasso_type_t to, const char * named, lasso_type_t member)¶ Adds a tag member to a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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 tag member will be added.named
: The name for the new member.member
: The new tag member to add.
-
LCAPICALL osError
lasso_typeAddTagMember2
(lasso_request_t token, lasso_type_t to, const char * named, lasso_tag_func nativeTagFunction)¶ Adds a tag member to a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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 tag member will be added.named
: The name for the new member.nativeTagFunction
: The function add.
-
LCAPICALL osError
lasso_typeAddDataMember
(lasso_request_t token, lasso_type_t to, const char * named, lasso_type_t member)¶ Adds a data member to a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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 data member will be added.named
: The name for the new member.member
: The new data member to add.
-
LCAPICALL osError
lasso_typeAddTagMemberW
(lasso_request_t token, lasso_type_t to, const UChar * named, lasso_type_t member)¶ Adds a tag member to a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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 tag member will be added.named
: The name for the new member.member
: The new tag member to add.
-
LCAPICALL osError
lasso_typeAddTagMember2W
(lasso_request_t token, lasso_type_t to, const UChar * named, lasso_tag_func nativeTagFunction)¶ Adds a tag member to a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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 tag member will be added.named
: The name for the new member.nativeTagFunction
: The function to add.
-
LCAPICALL osError
lasso_typeAddDataMemberW
(lasso_request_t token, lasso_type_t to, const UChar * named, lasso_type_t member)¶ Adds a data member to a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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 data member will be added.named
: The name for the new member.member
: The new data member to add.
-
LCAPICALL osError
lasso_typeGetDataMember
(lasso_request_t token, lasso_type_t from, const char * named, lasso_type_t * out)¶ Retrieves a data member from a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeGetDataMemberW
(lasso_request_t token, lasso_type_t from, const UChar * named, lasso_type_t * out)¶ Retrieves a data member from a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeSetDataMember
(lasso_request_t token, lasso_type_t from, const char * named, lasso_type_t to)¶ Sets a data member of a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.to
: A pointer to a type instance. The new value for the data member.
-
LCAPICALL osError
lasso_typeSetDataMemberW
(lasso_request_t token, lasso_type_t from, const UChar * named, lasso_type_t to)¶ Sets a data member of a type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.to
: A pointer to a type instance. The new value for the data member.
-
LCAPICALL osError
lasso_setPtrMember
(lasso_request_t token, lasso_type_t self, const char * name, void * data, void(*dtor)(void *))¶ Allows storage of an opaque pointer value.
The pointer member is given and name and is stored as an integer in the type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.dtor
: A pointer to a function which will be called when the member is destroyed.
-
LCAPICALL osError
lasso_setPtrMember2
(lasso_request_t token, lasso_type_t from, const char * name, void * data, void(*dtor)(void *obj), void *(*copyFunc)(void *obj))¶ Allows storage of an opaque pointer value.
The pointer member is given and name and is stored as an integer in the type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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 add the pointer member.name
: The name for the new member.data
: The pointer value which will be added.dtor
: A pointer to a function which will be called when the member is destroyed.copyFunc
: A pointer to a function which will be called when the member is copied.
-
LCAPICALL osError
lasso_setPtrMemberW
(lasso_request_t token, lasso_type_t self, const UChar * name, void * data, void(*dtor)(void *))¶ Allows storage of an opaque pointer value.
The pointer member is given and name and is stored as an integer in the type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.dtor
: A pointer to a function which will be called when the member is destroyed.
-
LCAPICALL osError
lasso_setPtrMember2W
(lasso_request_t token, lasso_type_t from, const UChar * named, void * data, void(*dtor)(void *obj), void *(*copyFunc)(void *obj))¶ Allows storage of an opaque pointer value.
The pointer member is given and name and is stored as an integer in the type instance.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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 add the pointer member.named
: The name for the new member.data
: The pointer value which will be added.dtor
: A pointer to a function which will be called when the member is destroyed.copyFunc
: A pointer to a function which will be called when the member is copied.
-
LCAPICALL osError
lasso_getPtrMember
(lasso_request_t token, lasso_type_t self, const char * name, void ** data)¶ Retrieves a previously added pointer value.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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
-
LCAPICALL osError
lasso_getPtrMemberW
(lasso_request_t token, lasso_type_t self, const UChar * name, void ** data)¶ Retrieves a previously added pointer value.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_typeGetName
(lasso_request_t token, lasso_type_t target, auto_lasso_value_t * outName)¶ Returns the name of the target type.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_returnTagValueBoolean
(lasso_request_t token, bool b)¶ Return a boolean value from the current LCAPI tag call.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_returnTagValueInteger
(lasso_request_t token, int64_t i)¶ Return an integer value from the current LCAPI tag call.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_returnTagValueString
(lasso_request_t token, const char * p, int l)¶ Return a string value from the current LCAPI tag call.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_returnTagValueStringW
(lasso_request_t token, const UChar * p, int l)¶ Return a string value from the current LCAPI tag call.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_returnTagValueDecimal
(lasso_request_t token, double d)¶ Return a decimal value from the current LCAPI tag call.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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 its type and value frozen. This is usually called at the same time that tags are registered.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
namespaceName
: The namespace for the constant.name
: The name for the constant.val
: The value for the constant.
-
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 its type and value frozen. This is usually called at the same time that tags are registered.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
namespaceName
: The namespace for the constant.name
: The name for the constant.val
: The value for the constant.
-
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 its type and value frozen. This is usually called at the same time that tags are registered.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
name
: The name for the constant.val
: The value for the constant.
-
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 its type and value frozen. This is usually called at the same time that tags are registered.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- Parameters
name
: The name for the constant.val
: The value for the constant.
-
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”.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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 “tag”.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_getTagParamCount
(lasso_request_t token, int * result)¶ Fetches the number of parameters that were passed to the tag.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL osError
lasso_setVariable
(lasso_request_t token, const char * named, const char * value, int index)¶
-
LCAPICALL osError
lasso_setVariableW
(lasso_request_t token, const UChar * named, const UChar * value, int index)¶
-
LCAPICALL void
lasso_getPlatformSpecificPath
(const char * inInternalPath, osPathname outPlatformPath)¶ This function is a no-op in Lasso 9.
- Parameters
inInternalPath
: The internal pathname.outPlatformPath
: The resulting platform specific pathname.
-
LCAPICALL void
lasso_getInternalPath
(const char * inPlatformPath, osPathname outInternalPath)¶ This function is a no-op in Lasso 9.
- Parameters
inPlatformPath
: the platform specific path name.outInternalPath
: The resulting internal pathname.
-
LCAPICALL void
lasso_fullyQualifyPath
(lasso_request_t token, const char * inRelativePath, osPathname outFullyQualified)¶ This function is a no-op in Lasso 9.
If the path is already from the root it won’t be changed.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
LCAPICALL void
lasso_resolvePath
(lasso_request_t token, const char * inPath, osPathname outFullPath)¶ This function is a no-op in Lasso 9.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem 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.
-
LCAPICALL void
lasso_resolveIncludePath
(lasso_request_t token, const char * inPath, osPathname outFullPath)¶ This function is a no-op in Lasso 9.
Resulting path must name an item within the web-root or a blank string is returned.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem 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.
-
LCAPICALL void
lasso_internalToFullPlatformPath
(lasso_request_t token, const char * relativeOrFullInternalPath, osPathname fullPlatformPath)¶ This function is a no-op in Lasso 9.
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.
- Return
- If the function succeeds, osErrNoErr is returned, otherwise, an error code indicating the problem is returned.
- 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.
-
struct
lasso_value_t
¶ - #include <LassoCAPI.h>
Used for retrieving data from some LCAPI functions.
The lasso_value_t struct is used for shuffling data into and out of LassoCAPI functions.
Any LCAPI function that constructs one of these will insure that Lasso properly disposes of the data once the user’s LassoCAPI function call is complete.
lasso_value_t is suitable for transferring binary data as long as the nameSize or dataSize members are properly set with the size of the data in bytes.
Depending on the purpose of the function which is constructing the lasso_value_t, any combination of the name or data members may be filled in or may be NULL. Consult the documentation of the specific function for more details.
Should be initialized using the INITVAL(X) macro before use.
-
struct
lasso_value_w_t
¶ - #include <LassoCAPI.h>
Used for retrieving Unicode character data from some LCAPI functions.
The lasso_value_w_t struct is used for shuffling Unicode character data into and out of LassoCAPI functions.
Any LCAPI function that constructs one of these will insure that Lasso properly disposes of the data once the user’s LassoCAPI function call is complete.
Depending on the purpose of the function which is constructing the lasso_value_t, any combination of the name or data members may be filled in or may be NULL. Consult the documentation of the specific function for more details.
Should be initialized using the INITVAL(X) macro before use.
-
struct
lasso_request_t_
¶ - #include <LassoCAPI.h>
Special value passed to modules that identify the request.
The same value should be used when calling into any LassoCAPI function.
-
struct
lasso_type_t_
¶ - #include <LassoCAPI.h>
Represents a type within Lasso.
This opaque value represents an instance of a type within Lasso
-
struct
lasso_dsconnection_t_
¶ - #include <LassoCAPI.h>
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.
-
namespace
LPTypes
¶ Variables
-
const LP_TypeDesc
lpTypeString
= 'TEXT'¶
-
const LP_TypeDesc
lpTypeNull
= 'null'¶
-
const LP_TypeDesc
lpTypeInteger
= 'long'¶
-
const LP_TypeDesc
lpTypeBoolean
= 'bool'¶
-
const LP_TypeDesc
lpTypeBytes
= 'blob'¶
-
const LP_TypeDesc
lpTypeDecimal
= 'doub'¶
-
const LP_TypeDesc
lpTypeDateTime
= 'Date'¶
-
const LP_TypeDesc
lpTypeArray
= 'arry'¶
-
const LP_TypeDesc
lpTypeTag
= 'code'¶
-
const LP_TypeDesc
lpTypePair
= 'pair'¶
-
const LP_TypeDesc
lpTypeCustom
= 'Yers'¶
-
const LP_TypeDesc
kDateDataType
= 'Date'¶
-
const LP_TypeDesc
kProtectionNone
= 'none'¶
-
const LP_TypeDesc
kProtectionReadOnly
= 'nmod'¶
-
const LP_TypeDesc