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.
typedef enum hpc_client_error
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.
No error, everything ok.
HoloPlay Service not installed or not running.
HoloPlay Service/HoloPlay Core version mismatch.
Something wrong with the serialization of message data being sent to HoloPlay Service.
Something wrong with the serialization of message data being received from HoloPlay Service.
Message sent was too large and was rejected.
HoloPlay Service was detected but did not consume message.
HoloPlay Service received message but did not reespond.
Some other problem with communication.
hpc_RefreshState called before hpc_InitializeApp.
typedef enum hpc_service_error
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.
No error, everything ok.
CBOR parser failure.
Driver could not understand the command.
Driver expected an image file in binary data, but could not read one.
Client attempted to draw to a Looking Glass that is not connected or has no calibration.
Client attempted to load a nonexistent key from the cache.
Client attempted to register an app ID after sending one or more messages.
Client attempted to do something that is not allowed (i.e., tried to take over a display currently occupied by a greedy process).
typedef enum hpc_license_type
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.