libHoloPlayCore.h

This header contains declarations for functions in the HoloPlayCore dynamic library, which handles communication with the HoloPlay Service runtime. A programmer looking to design a custom renderer for Looking Glass devices may not need to understand the functions and types declared in this header file. They handle communication with HoloPlay Service via the NNG interprocess communication library and provide abstractions for the CBOR-serialized messages returned from it, to provide easy access from both low- and high- level languages.

Convenience functions that implement these under the hood are declared in HoloPlayCore.h.

hpc_client_error

typedef enum hpc_client_error

Description

Enum definition for errors returned from the HoloPlayCore dynamic library.

The following table encapsulates potential errors with the connection itself, as opposed to hpc_service_error, which describes potential error messages included in a successful reply from HoloPlay Service.

Returns

Error

Description

hpc_CLIERR_NOERROR

No error, everything ok.

hpc_CLIERR_NOSERVICE

HoloPlay Service not installed or not running.

hpc_CLIERR_VERSIONERR

HoloPlay Service/HoloPlay Core version mismatch.

hpc_CLIERR_SERIALIZEERR

Something wrong with the serialization of message data being sent to HoloPlay Service.

hpc_CLIERR_DESERIALIZEERR

Something wrong with the serialization of message data being received from HoloPlay Service.

hpc_CLIERR_MSSGTOOBIG

Message sent was too large and was rejected.

hpc_CLIERR_SENDTIMEOUT

HoloPlay Service was detected but did not consume message.

hpc_CLIERR_RECVTIMEOUT

HoloPlay Service received message but did not reespond.

hpc_CLIERR_PIPEERROR

Some other problem with communication.

hpc_CLIERR_APPNOTINITIALIZED

hpc_RefreshState called before hpc_InitializeApp.

hpc_service_error

typedef enum hpc_service_error

Description

Enum definition for error codes included in HoloPlay Service responses.

Most error messages from HoloPlay Service concern access to the HoloPlay Service internal renderer, which is supported but not the primary focus of the current version of HoloPlay Core. Future versions of HoloPlay Service may return error codes not defined by this spec.

Returns

Error

Description

hpc_ERR_NOERROR

No error, everything ok.

hpc_ERR_BADCBOR

CBOR parser failure.

hpc_ERR_BADCOMMAND

Driver could not understand the command.

hpc_ERR_NOIMAGE

Driver expected an image file in binary data, but could not read one.

hpc_ERR_LKGNOTFOUND

Client attempted to draw to a Looking Glass that is not connected or has no calibration.

hpc_ERR_NOTINCACHE

Client attempted to load a nonexistent key from the cache.

hpc_ERR_INITTOOLATE

Client attempted to register an app ID after sending one or more messages.

hpc_ERR_NOTALLOWED

Client attempted to do something that is not allowed (i.e., tried to take over a display currently occupied by a greedy process).

hpc_license_type

typedef enum hpc_license_type

Description

Enum definition for possible types of licenses associated with a HoloPlay Core app.

Non-commercial apps cannot run on Looking Glass devices without an associated commercial license.

Returns

Error

Description

hpc_LICENSE_NONCOMMERCIAL

Non-commercial license type

hpc_LICENSE_COMMERCIAL

Commercial license type

Last updated