Er, we have it already :) https://github.com/yast/yast-ycp-ui-bindings/blob/6aca15a1239b8abfc9774fcffea264978eb621fb/source/YCP_UI.cc#L1017