MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / NFD_PathSet_EnumNextN

Function NFD_PathSet_EnumNextN

extern/nfd/nfd_portal.cpp:1468–1485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1466}
1467
1468nfdresult_t NFD_PathSet_EnumNextN(nfdpathsetenum_t* enumerator, nfdnchar_t** outPath) {
1469 DBusMessageIter& uri_iter = *reinterpret_cast<DBusMessageIter*>(enumerator);
1470 const int arg_type = dbus_message_iter_get_arg_type(&uri_iter);
1471 if (arg_type == DBUS_TYPE_INVALID) {
1472 *outPath = nullptr;
1473 return NFD_OKAY;
1474 }
1475 if (arg_type != DBUS_TYPE_STRING) {
1476 NFDi_SetError("D-Bus response signal URI sub iter is not a string.");
1477 return NFD_ERROR;
1478 }
1479 const char* uri;
1480 dbus_message_iter_get_basic(&uri_iter, &uri);
1481 const nfdresult_t res = AllocAndCopyFilePath(uri, *outPath);
1482 if (res != NFD_OKAY) return res;
1483 dbus_message_iter_next(&uri_iter);
1484 return NFD_OKAY;
1485}

Callers

nothing calls this directly

Calls 2

AllocAndCopyFilePathFunction · 0.85
NFDi_SetErrorFunction · 0.70

Tested by

no test coverage detected