Installs the Add-On command handler object.
GSErrCode ACAPI_Install_AddOnCommandHandler ( GS::Owner<API_AddOnCommand> addOnCommand );
Parameters
- addOnCommand
- [in] The Add-On command handler object. After the ACAPI_Install_AddOnCommandHandler is called, the ownership is passed and the object can not be used.
Return Values
APIERR_REFUSEDPAR
- The
addOnCommand
parameter isnullptr
. APIERR_BADNAME
- There is already an
API_AddOnCommand
installed with the same name for this Add-On. APIERR_BADPARS
- The input, output or schema definitions is not in a valid JSON format.
NoError
- The function has completed with success.
For other common API errors see the API Errors document.
Remarks
This function installs a handler object for the corresponding HTTP requests. The handler object is identified by the Add-On MDID and its name.
The ACAPI_Install_AddOnCommandHandler
function should be called from Initialize.
After a successful ACAPI_Install_AddOnCommandHandler
function call, the Add-On stays in the memory.
Example
Refer to the AddOnCommand_Test example project of the API Development Kit.
Requirements
- Version: API 25 or later
- Header: ACAPinc.h