| 35 | // - none |
| 36 | |
| 37 | OSVR_ReturnCode osvrClientGetInterface(OSVR_ClientContext ctx, |
| 38 | const char path[], |
| 39 | OSVR_ClientInterface *iface) { |
| 40 | if (nullptr == ctx) { |
| 41 | /// Return failure if given a null context |
| 42 | return OSVR_RETURN_FAILURE; |
| 43 | } |
| 44 | osvr::common::tracing::markGetInterface(path); |
| 45 | osvr::common::ClientInterfacePtr ret = ctx->getInterface(path); |
| 46 | if (ret) { |
| 47 | *iface = ret.get(); |
| 48 | return OSVR_RETURN_SUCCESS; |
| 49 | } |
| 50 | return OSVR_RETURN_FAILURE; |
| 51 | } |
| 52 | |
| 53 | OSVR_ReturnCode osvrClientFreeInterface(OSVR_ClientContext ctx, |
| 54 | OSVR_ClientInterface iface) { |