XnStatus xnLogReadMasksFromINI(const XnChar* cpINIFileName, const XnChar* cpSectionName, const XnChar* cpKey, XnSetMaskFunc pSetMaskFunc) { XnStatus nRetVal = XN_STATUS_OK; XnChar csTemp[XN_INI_MAX_LEN] = ""; nRetVal = xnOSReadStringFromINI(cpINIFileName, cpSectionName, cpKey, csTemp, XN_INI_MAX_LEN); if (nRetVal == XN_STATUS_OK) { nRetVal = xnLogSetMasks(csTemp, pSetMaskFunc); XN_IS_STATUS_OK(nRetVal); } return (XN_STATUS_OK); }
void xnLogReadMasksFromINI(const XnChar* cpINIFileName, const XnChar* cpSectionName, const XnChar* cpKey, XnLogFilteringType* pFilteringType, XnStringsHash* pMasksHash) { XnStatus nRetVal = XN_STATUS_OK; XnChar csTemp[XN_INI_MAX_LEN] = ""; *pFilteringType = XN_LOG_WRITE_NONE; nRetVal = xnOSReadStringFromINI(cpINIFileName, cpSectionName, cpKey, csTemp, XN_INI_MAX_LEN); if (nRetVal == XN_STATUS_OK) { if (strcmp(csTemp, XN_LOG_MASK_ALL) == 0) *pFilteringType = XN_LOG_WRITE_ALL; else if (csTemp[0] == '\0') // empty *pFilteringType = XN_LOG_WRITE_NONE; else *pFilteringType = XN_LOG_WRITE_MASKS; } xnLogSetMasks(csTemp, pMasksHash); }