mi::nservices::IAdmin_server_configuration Class Reference
Description
Admin server configuration API component. Used to register URLs to handlers that render the admin pages.
Public Member Functions
- virtual mi::Sint32 register_handler( const char* url, mi::http::IRequest_handler* handler, const char* category = nullptr, const char* name = nullptr) =0
- Registers a URL handler with the admin server. More...
Member Functions
- virtual mi::Sint32 mi::nservices::IAdmin_server_configuration::register_handler( const char* url, mi::http::IRequest_handler* handler, const char* category = nullptr, const char* name = nullptr) [pure virtual]
-
Registers a URL handler with the admin server.
Parameters
- url
- the URL to register to, must not start with /admin/ or be / or /index.html
- handler
- the handler to call when url is called
- category
- if provided then a link to this URL will be included in the main menu under this category.
- name
- if provided along with category then the menu link will use this name.
Returns
- 0 - success
- -1 - unknown error
- -2 - invalid parameter, url is NULL or empty string, handler is NULL, or category and name are not both provided
- -3 - url is not allowed
- -4 - url is already registered