| 104 | } |
| 105 | |
| 106 | XN_C_API XnStatus xnEnumerationErrorsToString(const XnEnumerationErrors* pErrors, XnChar* csBuffer, XnUInt32 nSize) |
| 107 | { |
| 108 | XnStatus nRetVal = XN_STATUS_OK; |
| 109 | |
| 110 | XnUInt32 nWritten = 0; |
| 111 | csBuffer[0] = '\0'; |
| 112 | |
| 113 | nRetVal = xnOSStrAppend(csBuffer, "One or more of the following nodes could not be enumerated:\n\n", nSize); |
| 114 | XN_IS_STATUS_OK(nRetVal); |
| 115 | |
| 116 | nWritten = xnOSStrLen(csBuffer); |
| 117 | |
| 118 | for (XnEnumerationErrorsIterator it = xnEnumerationErrorsGetFirst(pErrors); |
| 119 | xnEnumerationErrorsIteratorIsValid(it); |
| 120 | it = xnEnumerationErrorsGetNext(it)) |
| 121 | { |
| 122 | nRetVal = xnProductionNodeDescriptionToString(xnEnumerationErrorsGetCurrentDescription(it), csBuffer + nWritten, nSize - nWritten); |
| 123 | XN_IS_STATUS_OK(nRetVal); |
| 124 | |
| 125 | nRetVal = xnOSStrAppend(csBuffer, ": ", nSize); |
| 126 | XN_IS_STATUS_OK(nRetVal); |
| 127 | |
| 128 | nRetVal = xnOSStrAppend(csBuffer, xnGetStatusString(xnEnumerationErrorsGetCurrentError(it)), nSize); |
| 129 | XN_IS_STATUS_OK(nRetVal); |
| 130 | |
| 131 | nRetVal = xnOSStrAppend(csBuffer, "\n", nSize); |
| 132 | XN_IS_STATUS_OK(nRetVal); |
| 133 | |
| 134 | nWritten = xnOSStrLen(csBuffer); |
| 135 | } |
| 136 | |
| 137 | return (XN_STATUS_OK); |
| 138 | } |
| 139 | |
| 140 | XN_C_API XnEnumerationErrorsIterator xnEnumerationErrorsGetFirst(const XnEnumerationErrors* pError) |
| 141 | { |
no test coverage detected