bool StatementObject::GetProperty(NPIdentifier name, NPVariant *result) { //sprintf(tmp, "stmt GetProperty [%s]\n", NPN_UTF8FromIdentifier(name)); log(tmp); VOID_TO_NPVARIANT(*result); if (name == mc_rowCount_id) { INT32_TO_NPVARIANT(m_rowCount, *result); return true; } else if (name == mc_columnCount_id) { INT32_TO_NPVARIANT(m_columnCount, *result); return true; } else if (name == mc_errorMessage_id) { STRING_TO_NPVARIANT(GetErrorString(), *result); return true; } else if (name == mc_errorCode_id) { INT32_TO_NPVARIANT(GetErrorCode(), *result); return true; } else if (name == mc_errorState_id) { STRING_TO_NPVARIANT(GetErrorState(), *result); return true; } return false; }
XnStatus XnSensor::SetErrorState(XnStatus errorState) { XnStatus nRetVal = XN_STATUS_OK; if (errorState != GetErrorState()) { if (errorState == XN_STATUS_OK) { xnLogInfo(XN_MASK_DEVICE_SENSOR, "Device is back to normal state."); } else { xnLogError(XN_MASK_DEVICE_SENSOR, "Device has entered error mode: %s", xnGetStatusString(errorState)); } nRetVal = m_ErrorState.UnsafeUpdateValue((XnUInt64)errorState); XN_IS_STATUS_OK(nRetVal); } return (XN_STATUS_OK); }
const FString& FBuildPatchInstallError::ToString() { return ToString( GetErrorState() ); }
XnStatus XnSensor::CheckIfReadingAllowed() { return GetErrorState(); }