Task: Implement the MIME Association Reader feature
TASK-DESCRIPTION
- Create:
sources/desktop/mime_association_reader.h - Create:
sources/desktop/mime_association_reader.cpp - Create:
tests/mime_association_reader_test.cpp - Create:
tests/22-mime-association-reader.shThe reader resolves which desktop file opens a MIME type and reports where that answer came from, and implements the requirements inprompts/features/08-mime-association-reader.md. The fallback tomimeinfo.cachemust agree with whatxdg-mime query defaultreports for the same type.
TASK-OUTPUT
Produce these complete files in this order, then the VERIFICATION: line: 1. sources/desktop/mime_association_reader.h 2. sources/desktop/mime_association_reader.cpp 3. tests/mime_association_reader_test.cpp 4. tests/22-mime-association-reader.sh
TASK-CONTEXT
documents/12-desktop-loading-and-provenance.md section 4. A missing or unreadable file is skipped without error, and the reader never throws.
TASK-FILES
| Operation | Path |
|---|---|
| create | sources/desktop/mime_association_reader.h |
| create | sources/desktop/mime_association_reader.cpp |
| create | tests/mime_association_reader_test.cpp |
| create | tests/22-mime-association-reader.sh |
TASK-VERIFY
- Run:
make testfrom the repository root. - Expected: exit status 0, and the reported default matches
xdg-mime query defaultwhenxdg-mimeis installed.
TASK-FEATURES
prompts/features/08-mime-association-reader.md
TASK-ACCEPTANCE
MIME-ASSOCIATION-READER-R001MIME-ASSOCIATION-READER-R002MIME-ASSOCIATION-READER-R004MIME-ASSOCIATION-READER-R006MIME-ASSOCIATION-READER-R007MIME-ASSOCIATION-READER-R010
OUTPUT: the four complete files in the order listed, ending with the VERIFICATION: line.