OpenAssetIO [beta]
An abstract API for generalising interactions between a host application and an asset management system
HostInterface Class Referenceabstract

The HostInterface provides an abstraction of the 'caller of the API'. More...

#include <HostInterface.hpp>

Public Types

using Ptr = HostInterfacePtr
 
using ConstPtr = HostInterfaceConstPtr
 

Public Member Functions

 HostInterface ()=default
 
virtual ~HostInterface ()=default
 Polymorphic destructor. More...
 
Host Information
virtual Identifier identifier () const =0
 Returns an identifier that uniquely identifies the Host. More...
 
virtual Str displayName () const =0
 Returns a human readable name to be used to reference this specific host in user-facing presentations, for example: More...
 
virtual InfoDictionary info ()
 Returns other information that may be useful about this Host. More...
 

Detailed Description

The HostInterface provides an abstraction of the 'caller of the API'.

Colloquially, we refer to this as the 'host'. This may be a simple pipeline tool, or a full content creation application.

The HostInterface provides a generic mechanism for a manager to query information about the identity of the host. In future, this interface may be extended to include the ability to retrieve information about available documents and their known entity references.

In order for a host to use the API, it must provide an implementation of the HostInterface to the ManagerFactory class upon construction.

A manager does not call the HostInterface directly, it is always accessed via the Host wrapper. This allows the API to insert suitable house-keeping and auditing functionality in between.

Note
OpenAssetIO makes use of shared pointers to facilitate object lifetime management across multiple languages. Instances passed into API methods via shared pointer may have their lifetimes extended beyond that of your code.

Member Typedef Documentation

Constructor & Destructor Documentation

HostInterface ( )
default
virtual ~HostInterface ( )
virtualdefault

Polymorphic destructor.

Member Function Documentation

virtual Str displayName ( ) const
pure virtual

Returns a human readable name to be used to reference this specific host in user-facing presentations, for example:

"OpenAssetIO Test Host" "OpenRV" "Nuke"

Returns
Host's display name.
virtual Identifier identifier ( ) const
pure virtual

Returns an identifier that uniquely identifies the Host.

This may be used by a Manager's ManagerInterface to adjust its behavior accordingly. The identifier should be unique for any application, but common to all versions.

The identifier should use only alpha-numeric characters and '.', '_' or '-'. We suggest using the "reverse DNS" style, for example:

"org.openassetio.test.host" "io.aswf.openrv" "com.foundry.nuke"

Returns
host identifier.
See also
https://en.wikipedia.org/wiki/Reverse_domain_name_notation
virtual InfoDictionary info ( )
virtual

Returns other information that may be useful about this Host.

This can contain arbitrary key/value pairs. Managers never rely directly on any particular keys being set here, but the information may be useful for diagnostic or debugging purposes. For example:

{ 'version' : '1.1v3' }

Returns
Arbitrary manager-specific info dictionary.
Todo:
Definitions for well-known keys such as 'version' etc.

The documentation for this class was generated from the following file:
  • /src/src/openassetio-core/include/openassetio/hostApi/HostInterface.hpp