<div dir="ltr">Yes, i had. But i decided to write my own implementation because:<div>a) my project is forced to use Qt4 only (clients have very old versions of modified Red Hat with XDG_DATA_DIRS undefined);<div>b) Windows support (through reading registry HKCR/.ext keys) is required;</div>
</div><div>c) I'm very curious :)</div><div><br></div><div>You think i'm should look deeply at the qmimedatabase.cpp however?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/13 Jerome Leclanche <span dir="ltr"><<a href="mailto:adys.wh@gmail.com" target="_blank">adys.wh@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have you had a look at the Qt 5 mimetype module?<br>
<br>
<a href="http://qt-project.org/doc/qt-5.0/qtcore/qmimedatabase.html" target="_blank">http://qt-project.org/doc/qt-5.0/qtcore/qmimedatabase.html</a><br>
J. Leclanche<br>
<div><div class="h5"><br>
<br>
On Fri, Dec 13, 2013 at 7:35 PM, Alexander Kamyshnikov<br>
<<a href="mailto:axill777@gmail.com">axill777@gmail.com</a>> wrote:<br>
> Hi all!<br>
> I'm developing the implementation of MIME database in C++/Qt for one<br>
> commercial program (requirement managment tool, if one will be interested).<br>
> So my question is: the format of magic values to compare file header data<br>
> with is not specified exactly in the spec. I mean the magic/match/value<br>
> attribute.<br>
> What exactly mean those magic strings from<br>
> /usr/share/mime/packages/freedesktop.org.xml from my Kubuntu?<br>
> 1) "\1\9"<br>
> 2) "\376\067\0\043"<br>
> 3) "\x8AMNG\x0D\x0A\x1A\x0A"<br>
> Second is looks like octal number in C notation, third - hexadecimal, but<br>
> about first i'm not sure. It is just "usual" decimal value?<br>
> What format exactly should use magic values?<br>
> Thanks for your help. WBR, Alexander<br>
><br>
> P.S. Spec i'm using living here:<br>
> <a href="http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html#id2661973" target="_blank">http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html#id2661973</a><br>
> P.S. <match> items can be nested. But i can't find yet the clear way to<br>
> implement their storage programmatically. Some kind of tree, or reverse<br>
> polish notation should be used here? nevermind<br>
><br>
</div></div>> _______________________________________________<br>
> xdg mailing list<br>
> <a href="mailto:xdg@lists.freedesktop.org">xdg@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/xdg" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xdg</a><br>
><br>
</blockquote></div><br></div>