- Overview
- Files
- Related Pages
- Modules

- File List
- Globals

Macros
tanvastouch_errors.h File Reference

Status codes used in the TanvasTouch Engine API. More...

Go to the source code of this file.

## Macros
#define | TANVASTOUCH_AS(t, v) ((t)v)
#define | TANVASTOUCH_INVALID_RESOURCE_ID TANVASTOUCH_AS(tanvastouch_resource_id, 0)
#define | TANVASTOUCH_OK TANVASTOUCH_AS(int, 0)
#define | TANVASTOUCH_ERROR (1u << 16u)
#define | TANVASTOUCH_ERROR_RESOURCE (2u << 16u)
#define | TANVASTOUCH_ERROR_ENGINE (3u << 16u)
#define | TANVASTOUCH_ERROR_CLIENT (4u << 16u)
#define | TANVASTOUCH_ERROR_WRAPPER (5u << 16u)
#define | TANVASTOUCH_ERROR_TEXTURE (6u << 16u)
#define | TANVASTOUCH_ERROR_MATERIAL (7u << 16u)
#define | TANVASTOUCH_ERROR_GENERAL TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR | 65535u))
#define | TANVASTOUCH_ERROR_RESOURCE_UNKNOWN TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_RESOURCE | 1u))
#define | TANVASTOUCH_ERROR_RESOURCE_CANNOT_CREATE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_RESOURCE | 2u))
#define | TANVASTOUCH_ERROR_RESOURCE_DATA_REQUIRED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_RESOURCE | 3u))
#define | TANVASTOUCH_ERROR_TEXTURE_OFFSET_TOO_LARGE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_TEXTURE | 1u))
#define | TANVASTOUCH_ERROR_TEXTURE_SIZE_MISMATCH TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_TEXTURE | 2u))
#define | TANVASTOUCH_ERROR_TEXTURE_NEGATIVE_WIDTH TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_TEXTURE | 3u))
#define | TANVASTOUCH_ERROR_TEXTURE_NEGATIVE_HEIGHT TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_TEXTURE | 4u))
#define | TANVASTOUCH_ERROR_MATERIAL_TOO_FEW_UVS TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_MATERIAL | 1u))
#define | TANVASTOUCH_ERROR_MATERIAL_INVALID_TEXTURE_INDEX TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_MATERIAL | 2u))
#define | TANVASTOUCH_ERROR_ENGINE_UNKNOWN_CALL TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 1u))
#define | TANVASTOUCH_ERROR_ENGINE_FAILED_VERIFICATION TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 2u))
#define | TANVASTOUCH_ERROR_ENGINE_INVALID_REQUEST TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 3u))
#define | TANVASTOUCH_ERROR_ENGINE_OPERATION_FAILED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 4u))
#define | TANVASTOUCH_ERROR_ENGINE_ALREADY_RUNNING TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 5u))
#define | TANVASTOUCH_ERROR_CLIENT_INVALID_RESPONSE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 1u))
#define | TANVASTOUCH_ERROR_CLIENT_INVALID_SEQUENCE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 2u))
#define | TANVASTOUCH_ERROR_CLIENT_FAILED_VERIFICATION TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 3u))
#define | TANVASTOUCH_ERROR_CLIENT_CANNOT_FIND_ENGINE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 4u))
#define | TANVASTOUCH_ERROR_CLIENT_PERMISSION_DENIED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 5u))
#define | TANVASTOUCH_ERROR_CLIENT_INCOMPATIBLE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 6u))
#define | TANVASTOUCH_ERROR_CLIENT_UNLICENSED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 7u))
#define | TANVASTOUCH_ERROR_CLIENT_NOT_INITIALIZED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 8u))
#define | TANVASTOUCH_ERROR_CLIENT_GENERAL TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 65535u))

## Detailed Description

Status codes used in the TanvasTouch Engine API.

## Macro Definition Documentation

## ◆ TANVASTOUCH_AS

#define TANVASTOUCH_AS | ( |  | t,
|  |  | v
| ) |  | ((t)v)

In a C++ program, uses uniform initialization or old-style initialization to construct tanvastouch_resource_ids and integer error codes. In a C program, uses C casts. Intended for use only in tanvastouch_errors.h.

## ◆ TANVASTOUCH_ERROR

#define TANVASTOUCH_ERROR (1u << 16u)

General error category.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_CLIENT

#define TANVASTOUCH_ERROR_CLIENT (4u << 16u)

Errors dealing with the application's involvement in API calls.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_CLIENT_CANNOT_FIND_ENGINE

#define TANVASTOUCH_ERROR_CLIENT_CANNOT_FIND_ENGINE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 4u))

The API library cannot connect to the engine, perhaps because the engine is not running or is listening on a different endpoint.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_CLIENT_FAILED_VERIFICATION

#define TANVASTOUCH_ERROR_CLIENT_FAILED_VERIFICATION TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 3u))

The engine's response to an API call failed the API library's verification.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_CLIENT_GENERAL

#define TANVASTOUCH_ERROR_CLIENT_GENERAL TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 65535u))

The API library could not connect to the engine due to an uncategorized error.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_CLIENT_INCOMPATIBLE

#define TANVASTOUCH_ERROR_CLIENT_INCOMPATIBLE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 6u))

The version of the API in use by the library is not compatible with the API supported by the engine.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_CLIENT_INVALID_RESPONSE

#define TANVASTOUCH_ERROR_CLIENT_INVALID_RESPONSE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 1u))

The engine's response to an API call is not in the correct format.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_CLIENT_INVALID_SEQUENCE

#define TANVASTOUCH_ERROR_CLIENT_INVALID_SEQUENCE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 2u))

The engine's response to an API call does not have the expected sequence number.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_CLIENT_NOT_INITIALIZED

#define TANVASTOUCH_ERROR_CLIENT_NOT_INITIALIZED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 8u))

The client has not been correctly configured.

Since
  3.0.0

## ◆ TANVASTOUCH_ERROR_CLIENT_PERMISSION_DENIED

#define TANVASTOUCH_ERROR_CLIENT_PERMISSION_DENIED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 5u))

The API library was denied permission to connect to the given endpoint.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_CLIENT_UNLICENSED

#define TANVASTOUCH_ERROR_CLIENT_UNLICENSED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_CLIENT | 7u))

The client is not licensed - either because the verification is still in progress, or the license is denied.

Since
  3.0.0

Deprecated:
  Version 4.0.0 of the TanvasTouch Engine removed client licensing; therefore, this error is no longer issued.

## ◆ TANVASTOUCH_ERROR_ENGINE

#define TANVASTOUCH_ERROR_ENGINE (3u << 16u)

Errors dealing with the engine's involvement in API calls.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_ENGINE_ALREADY_RUNNING

#define TANVASTOUCH_ERROR_ENGINE_ALREADY_RUNNING TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 5u))

The API call failed engine-side because the requested operation is already running.

Since
  3.0.0

## ◆ TANVASTOUCH_ERROR_ENGINE_FAILED_VERIFICATION

#define TANVASTOUCH_ERROR_ENGINE_FAILED_VERIFICATION TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 2u))

The data comprising the API call is in the correct format but failed engine-side verification, perhaps due to a corrupt buffer or transmission problem.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_ENGINE_INVALID_REQUEST

#define TANVASTOUCH_ERROR_ENGINE_INVALID_REQUEST TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 3u))

The data comprising the API call is not in the correct format.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_ENGINE_OPERATION_FAILED

#define TANVASTOUCH_ERROR_ENGINE_OPERATION_FAILED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 4u))

The API call failed engine-side due to an uncategorized error.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_ENGINE_UNKNOWN_CALL

#define TANVASTOUCH_ERROR_ENGINE_UNKNOWN_CALL TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_ENGINE | 1u))

The API call is not known to the engine, perhaps due to a protocol mismatch between the engine and application.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_GENERAL

#define TANVASTOUCH_ERROR_GENERAL TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR | 65535u))

An uncategorized error.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_RESOURCE

#define TANVASTOUCH_ERROR_RESOURCE (2u << 16u)

Errors dealing with haptic resources.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_RESOURCE_CANNOT_CREATE

#define TANVASTOUCH_ERROR_RESOURCE_CANNOT_CREATE TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_RESOURCE | 2u))

The requested resource could not be created.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_RESOURCE_DATA_REQUIRED

#define TANVASTOUCH_ERROR_RESOURCE_DATA_REQUIRED TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_RESOURCE | 3u))

Data was not supplied to an API endpoint that requires it.

Since
  4.0.0

## ◆ TANVASTOUCH_ERROR_RESOURCE_UNKNOWN

#define TANVASTOUCH_ERROR_RESOURCE_UNKNOWN TANVASTOUCH_AS(int, (TANVASTOUCH_ERROR_RESOURCE | 1u))

A resource ID passed to a API call does not correspond to any resource for the current process.

Since
  2.0.0

## ◆ TANVASTOUCH_ERROR_WRAPPER

#define TANVASTOUCH_ERROR_WRAPPER (5u << 16u)

Errors defined by an API wrapper. These will be defined in the wrapper code. Do not change this value as it'll mean changing all the same in all of the wrappers.

Since
  3.0.0

## ◆ TANVASTOUCH_INVALID_RESOURCE_ID

#define TANVASTOUCH_INVALID_RESOURCE_ID TANVASTOUCH_AS(tanvastouch_resource_id, 0)

A resource ID that denotes an invalid resource.

Since
  2.0.0

## ◆ TANVASTOUCH_OK

#define TANVASTOUCH_OK TANVASTOUCH_AS(int, 0)

Success status code.

Since
  2.0.0