Functions
Setup and Teardown

These factory methods are used to create and destroy an InteractionLib instance. More...

Functions

IL_API InteractionLibCreateInteractionLib (FieldOfUse fieldOfUse)
 Creates a new InteractionLib instance with a default adapter, if available. More...
 
IL_API InteractionLibCreateInteractionLib (FieldOfUse fieldOfUse, IL_Logger *logger)
 Creates a new InteractionLib instance with a default adapter, if available. More...
 
IL_API InteractionLibCreateInteractionLib (FieldOfUse fieldOfUse, IL_Logger *logger, IL_AdapterFunctions *adapterFunctions)
 Creates a new InteractionLib instance with a custom adapter. More...
 
IL_API void DestroyInteractionLib (InteractionLib *instance)
 Destroys an InteractionLib instance created by CreateInteractionLib() or its overloads. More...
 

Detailed Description

These factory methods are used to create and destroy an InteractionLib instance.

For testing purposes, Interaction Library SDK clients can "mock" or "stub" the Interaction Library functionality by providing their own implementation of the InteractionLib interface. By using CreateInteractionLib() or its overloads, an actual Interaction Library implementation instance of the InteractionLib interface will be created.

Function Documentation

◆ CreateInteractionLib() [1/3]

IL_API InteractionLib* IL::CreateInteractionLib ( FieldOfUse  fieldOfUse)

Creates a new InteractionLib instance with a default adapter, if available.

See also
InteractionLib::SetAdapter()
Parameters
fieldOfUseThis mandatory flag denotes if the Interaction Library is used for interactive or analytical purposes. Please see the EULA and documentation for more information.
Returns
Pointer to a new InteractionLib instance. Destroying or deleting this is currently not supported. InteractionLib destructor, but only via the DestroyInteractionLib function.

◆ CreateInteractionLib() [2/3]

IL_API InteractionLib* IL::CreateInteractionLib ( FieldOfUse  fieldOfUse,
IL_Logger logger 
)

Creates a new InteractionLib instance with a default adapter, if available.

See also
InteractionLib::SetAdapter()
Parameters
fieldOfUseThis mandatory flag denotes if the Interaction Library is used for interactive or analytical purposes. Please see the EULA and documentation for more information.
loggerOptional pointer to a structure with information about a callback function that will be called by the Interaction Library for logging purposes. If logger is nullptr, the Interaction Library does no logging related processing. The callback function is set in the IL_Logger::callback field. The level parameter denotes the highest log level at which the callback function will be called. For example, if "info" is specified, then the callback will be called for "error", "warning" and "info", but not for "debug" and "trace" The text parameter passed to the callback function points at a null terminated character array formatted in a format specified by Tobii. The parameter is only valid in the scope of the callback. The context parameter passed to the callback function is set in the IL_Logger::context field.
Returns
Pointer to a new InteractionLib instance. Destroying or deleting this is currently not supported. InteractionLib destructor, but only via the DestroyInteractionLib function.

◆ CreateInteractionLib() [3/3]

IL_API InteractionLib* IL::CreateInteractionLib ( FieldOfUse  fieldOfUse,
IL_Logger logger,
IL_AdapterFunctions adapterFunctions 
)

Creates a new InteractionLib instance with a custom adapter.

See also
InteractionLib::SetAdapter()
Parameters
fieldOfUseThis mandatory flag denotes if the Interaction Library is used for interactive or analytical purposes. Please see the EULA and documentation for more information.
loggerOptional pointer to a structure with information about a callback function that will be called by the Interaction Library for logging purposes. If logger is nullptr, the Interaction Library does no logging related processing. The callback function is set in the IL_Logger::callback field. The level parameter denotes the highest log level at which the callback function will be called. For example, if "info" is specified, then the callback will be called for "error", "warning" and "info", but not for "debug" and "trace" The text parameter passed to the callback function points at a null terminated character array formatted in a format specified by Tobii. The parameter is only valid in the scope of the callback. The context parameter passed to the callback function is set in the IL_Logger::context field.
adapterFunctionsPointer to an instance of the structure that defines the custom adapter. nullptr is a valid parameter value which means the default adapter will not be set. Without a valid adapter the following functions will do nothing and return Result::Warning_NoAdapterSet.

WaitAndUpdate() , WaitForDeviceConnection() , Update() , UpdateStreamingDataOutput() , UpdateInteraction() ,

However, it is still possible to add interactors and subscribe to gaze focus events and data streams.

Returns
Pointer to a new InteractionLib instance. Use DestroyInteractionLib() to destroy it.

◆ DestroyInteractionLib()

IL_API void IL::DestroyInteractionLib ( InteractionLib instance)

Destroys an InteractionLib instance created by CreateInteractionLib() or its overloads.

Parameters
instancePointer to an InteractionLib instance returned by the Interaction Library (as opposed to one created by a client for test purposes). If instance is nullptr, then nothing is done.