示例#1
0
Json::Value RPCHandler::doPrint (Json::Value params, Resource::Charge& loadType, Application::ScopedLockType& masterLockHolder)
{
    masterLockHolder.unlock ();

    JsonPropertyStream stream;
    if (params.isObject() && params["params"].isArray() && params["params"][0u].isString ())
        getApp().write (stream, params["params"][0u].asString());
    else
        getApp().write (stream);

    return stream.top();
}
示例#2
0
Json::Value doPrint (RPC::Context& context)
{
    JsonPropertyStream stream;
    if (context.params_.isObject()
        && context.params_["params"].isArray()
        && context.params_["params"][0u].isString ())
    {
        getApp().write (stream, context.params_["params"][0u].asString());
    }
    else
    {
        getApp().write (stream);
    }

    return stream.top();
}