| 33 | // - none |
| 34 | |
| 35 | OSVR_ReturnCode osvrClientGetStringParameterLength(OSVR_ClientContext ctx, |
| 36 | const char path[], |
| 37 | size_t *len) { |
| 38 | if (ctx == nullptr) { |
| 39 | return OSVR_RETURN_FAILURE; |
| 40 | } |
| 41 | if (len == nullptr) { |
| 42 | return OSVR_RETURN_FAILURE; |
| 43 | } |
| 44 | std::string val = ctx->getStringParameter(path); |
| 45 | *len = val.empty() ? 0 : (val.size() + 1); |
| 46 | return OSVR_RETURN_SUCCESS; |
| 47 | } |
| 48 | |
| 49 | OSVR_ReturnCode osvrClientGetStringParameter(OSVR_ClientContext ctx, |
| 50 | const char path[], char *buf, |
no test coverage detected