MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / waitForResponse

Function waitForResponse

source/MRViewer/MRFileDialogPortal.cpp:331–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329}
330
331std::optional<Response> waitForResponse( DBusConnection* conn )
332{
333 while ( true )
334 {
335 if ( !dbus_connection_read_write( conn, -1 ) )
336 return {};
337
338 while ( auto* respMsg = dbus_connection_pop_message( conn ) )
339 {
340 MR_FINALLY { dbus_message_unref( respMsg ); };
341 if ( dbus_message_is_signal( respMsg, "org.freedesktop.portal.Request", "Response" ) )
342 return parseResponse( respMsg );
343 }
344 }
345}
346
347char fromHex( char hex )
348{

Callers 1

runPortalFileDialogFunction · 0.85

Calls 1

parseResponseFunction · 0.70

Tested by

no test coverage detected