| 1466 | } |
| 1467 | |
| 1468 | nfdresult_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 | } |
nothing calls this directly
no test coverage detected