I want to find the default handling application in my C program. Is there a C API with same functionality as xdg-mime query default mime-type on Linux?
|
|
||||
|
|
|
|
||||
|
I don't believe there's a C API for querying mime-types in the same way that xdg-mime works. xdg-mime is just a shell script that queries your desktop environment (Gnome, KDE, or other), and runs the appropriate command to get the MIME type from that DE's internal configuration. You could replicate the behaviour of the shell script, or just call the shell script directly from C. The XDG Utils web page doesn't seem to show anything about a C API. |
|||
|
|