Jump to content

Qt for HarmonyOS/qtohosextras doc/Want FDs Receiver Example: Difference between revisions

From Qt Wiki
Add example documentation from qdoc output (QTFOROH-2307)
 
Fix example page conversion (QTFOROH-2307)
Line 9: Line 9:
The window logs every received want. For each entry in QOhosWant::fds the example prints the key, the descriptor value and the <code>dev</code> / <code>ino</code> numbers obtained with <code>fstat</code>, so they can be compared with the sender's log. Wants are handled both from QOhosAppContext::getAppLaunchWantInfo() at startup and from the QOhosAbilityContext::newWantInfoReceived() signal at runtime.
The window logs every received want. For each entry in QOhosWant::fds the example prints the key, the descriptor value and the <code>dev</code> / <code>ino</code> numbers obtained with <code>fstat</code>, so they can be compared with the sender's log. Wants are handled both from QOhosAppContext::getAppLaunchWantInfo() at startup and from the QOhosAbilityContext::newWantInfoReceived() signal at runtime.


Files:
* [[Qt_for_HarmonyOS/qtohosextras_doc/Want_FDs_Receiver_Example|abilitycontext/wantfdsreceiver/main.cpp]]
* [[Qt_for_HarmonyOS/qtohosextras_doc/Want_FDs_Receiver_Example|abilitycontext/wantfdsreceiver/wantfdsreceiver.pro]]
* [[Qt_for_HarmonyOS/qtohosextras_doc/Want_FDs_Receiver_Example|abilitycontext/wantfdsreceiver/wantfdsreceiver.pro]]


[[Category:Qt for HarmonyOS]]
[[Category:Qt for HarmonyOS]]

Revision as of 09:29, 16 September 2026

< Qt for HarmonyOS / qtohosextras doc

Want FDs Receiver Example

Demonstrates receiving file descriptors passed to the application through a want.


The window logs every received want. For each entry in QOhosWant::fds the example prints the key, the descriptor value and the dev / ino numbers obtained with fstat, so they can be compared with the sender's log. Wants are handled both from QOhosAppContext::getAppLaunchWantInfo() at startup and from the QOhosAbilityContext::newWantInfoReceived() signal at runtime.