HTTPsREST_Publish
Prototype
void HTTPsREST_Publish (const HTTPs_REST_RESOURCE *p_resource, CPU_INT32U list_ID, HTTPs_REST_ERR *p_err);
Arguments
p_resource
Pointer to the rest resource to publish (read only).
list_ID
Identification of the list to publish on.
p_err
Pointer to variable that will receive the return error code from this function
Return Values
None.
Required Configuration
None.
Notes / Warnings
None.
Example Template
Listing - REST Publish Resources Example
/* ********************************************************************************************************* * AppREST_ResourcesInit() * * Description : Initialize the REST application resources. * * Argument(s) : none. * * Return(s) : DEF_OK, if initialization was successful. * DEF_FAIL, otherwise. * * Caller(s) : AppREST_Init(). * * Note(s) : none. ********************************************************************************************************* */ CPU_BOOLEAN AppREST_ResourcesInit (void) { HTTPs_REST_ERR err; HTTPsREST_Publish(&AppREST_List_Resource, 0, &err); if (err != HTTPs_REST_ERR_NONE) { return (DEF_FAIL); } HTTPsREST_Publish(&AppREST_User_Resource, 0, &err); if (err != HTTPs_REST_ERR_NONE) { return (DEF_FAIL); } HTTPsREST_Publish(&AppREST_File_Resource, 0, &err); if (err != HTTPs_REST_ERR_NONE) { return (DEF_FAIL); } return (DEF_OK); }