Pré. | Proc. |
SetConfiguration
This method receives the details that the user inputs into the Pro Cloud Server configuration when enabling this Custom Service Plug-in.
Inputs
Parameter |
Details |
See also |
---|---|---|
parameters |
A JSON string of parameters. See Details for more information about available parameters. |
Outputs via Callbacks
[Optional] LogMessage - set log messages about the configuration settings received. Be careful not to log sensitive information.
Note: SetError callbacks will be ignored for this method.
Details
This method receives the details that the user inputs into the Pro Cloud Server configuration when enabling this Custom Service Plug-in.
It includes these details:
- Custom item/value pairs of settings entered in 'Custom Properties' section.
Proxy settings:
- proxyServer
- proxyBypass
- proxyUsername
- proxyPassword
Example Implementation
void ExampleServicePlugin::SetConfiguration(const char* parameters)
{
LogMessage(LOG_TRACE, std::string(__FUNCTION__).c_str());
Json::Value jsonParameters;
if (strlen(parameters))
{
std::stringstream(parameters) >> jsonParameters;
}
for (auto& myProperty : jsonParameters.getMemberNames())
{
m_properties[myProperty] = jsonParameters[myProperty].asString();
}
}