Modules | |
System-wide parameters | |
Functions | |
T5_EXPORT T5_Result | t5ListGlasses (T5_Context context, char *buffer, size_t *bufferSize) |
Enumerate all glasses. More... | |
T5_EXPORT T5_Result | t5CreateGlasses (T5_Context context, const char *id, T5_Glasses *glasses) |
Create a glasses access object. More... | |
T5_EXPORT void | t5DestroyGlasses (T5_Glasses *glasses) |
Destroy a glasses object. More... | |
T5_EXPORT T5_Result | t5GetGameboardSize (T5_Context context, T5_GameboardType gameboardType, T5_GameboardSize *gameboardSize) |
Get the gameboard dimensions. More... | |
Require a T5_Context for invocation
T5_EXPORT T5_Result t5CreateGlasses | ( | T5_Context | context, |
const char * | id, | ||
T5_Glasses * | glasses | ||
) |
Create a glasses access object.
Use t5ListGlasses() to obtain a list of ids usable for the id
parameter.
Destroy with t5DestroyGlasses()
[in] | context | - T5_Context returned by t5CreateContext(). |
[in] | id | - Null terminated C string specifying the target glasses. |
[out] | glasses | - T5_Glasses for use with glasses related functions. |
T5_SUCCESS | Obtained handle to glasses. |
T5_ERROR_INVALID_ARGS | Nullptr was supplied for id . or Nullptr was supplied for glasses . |
T5_ERROR_NO_CONTEXT | context is invalid. |
T5_ERROR_STRING_OVERFLOW | One or more of the provided strings is too long. |
T5_ERROR_INTERNAL | Internal (Not correctable): Generic error. |
T5_ERROR_SERVICE_INCOMPATIBLE | Service is incompatible; context cannot be used. Need driver upgrade. |
T5_EXPORT void t5DestroyGlasses | ( | T5_Glasses * | glasses | ) |
Destroy a glasses object.
Destroys a T5_Glasses returned by t5CreateGlasses() and frees any associated resources.
Attempting to use a T5_Glasses after it has been destroyed will result in a T5_ERROR_NO_CONTEXT error.
[in,out] | glasses | - T5_Glasses returned by t5CreateGlasses(). Invalidated on return. |
T5_EXPORT T5_Result t5GetGameboardSize | ( | T5_Context | context, |
T5_GameboardType | gameboardType, | ||
T5_GameboardSize * | gameboardSize | ||
) |
Get the gameboard dimensions.
[in] | context | - T5_Context returned by t5CreateContext() |
[in] | gameboardType | - T5_GameboardType we're interested in |
[out] | gameboardSize | - Resulting gameboard dimensions |
T5_SUCCESS | Changed parameter list written to buffer. |
T5_ERROR_INVALID_ARGS | Gameboard type invalid or nullptr supplied for gameboardSize. |
Referenced by tiltfive::Client::getGameboardSize().
T5_EXPORT T5_Result t5ListGlasses | ( | T5_Context | context, |
char * | buffer, | ||
size_t * | bufferSize | ||
) |
Enumerate all glasses.
An entry in this list does not mean that it's available for use by the client. This list includes glasses that are locked for use by other clients as well as glasses that are not in the 'ready' state (E.g. Rebooting).
t5CreateGlasses() can be called on any entry, even if the glasses aren't currently available.
The result is encoded as a sequence of null-terminated strings, with the final entry being an empty string (IE The last entry is terminated with two nulls).
[in] | context | - T5_Context returned by t5CreateContext(). |
[out] | buffer | - Buffer to receive the list of devices as a series of null terminated strings. The last element will be an empty string (I.E. the list is terminated with two null chars in sequence). |
[in,out] | bufferSize | - On Call: Size of buffer. On Return: Size of written data. Note that this may be larger than the buffer, in which case T5_ERROR_OVERFLOW is returned, and this value represents the size of the buffer needed to avoid overflow. |
T5_SUCCESS | List successfully written to buffer. |
T5_ERROR_INVALID_ARGS | Nullptr was supplied for buffer . or Nullptr was supplied for count . |
T5_ERROR_OVERFLOW | Provided buffer is too small to contain glasses list. |
T5_ERROR_IO_FAILURE | Failed to communicate with the service. |
T5_ERROR_NO_SERVICE | Service is unavailable. |
T5_ERROR_NO_CONTEXT | context is invalid. |
T5_ERROR_INTERNAL | Internal (Not correctable): Generic error. |
T5_ERROR_STRING_OVERFLOW | Internal (Not correctable): String conversion overflow. |
T5_ERROR_SERVICE_INCOMPATIBLE | Service is incompatible; context cannot be used. Need driver upgrade. |
Referenced by tiltfive::Client::listGlasses().