<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
    <mime-type type="text/x-csrc">
        <sub-class-of type="text/plain"/>
        <comment>C Source file</comment>
        <glob pattern="*.c"/>
    </mime-type>

    <!-- A C Header file is virtually undistinguishable from the C++ header  -->
    <mime-type type="text/x-chdr">
        <sub-class-of type="text/x-csrc"/>
        <comment>C Header file</comment>
        <glob pattern="*.h"/>
    </mime-type>

    <!-- Those are used to find matching headers by the CppTools plugin,
         so, they should match -->
    <mime-type type="text/x-c++hdr">
        <sub-class-of type="text/x-chdr"/>
        <comment>C++ Header file</comment>
        <comment>C++ header</comment>
        <glob pattern="*.h"/>
        <glob pattern="*.hh"/>
        <glob pattern="*.hxx"/>
        <glob pattern="*.h++"/>
        <glob pattern="*.H"/>
        <glob pattern="*.hpp"/>
        <glob pattern="*.hp"/>
        <!-- Find include guards of header files without extension, for
             example, STL ones like <string> -->
        <magic priority="50">
           <match value="#ifndef" type="string" offset="0:1000"/>
        </magic>
    </mime-type>

    <mime-type type="text/x-c++src">
        <comment>C++ Source file</comment>
        <sub-class-of type="text/x-csrc"/>
        <comment>C++ source code</comment>
        <glob pattern="*.cpp"/>
        <glob pattern="*.cc"/>
        <glob pattern="*.cxx"/>
        <glob pattern="*.c++"/>
        <glob pattern="*.C"/>
        <glob pattern="*.inl"/>
        <glob pattern="*.moc"/>
        <glob pattern="*.qdoc"/>
    </mime-type>

    <mime-type type="text/x-objcsrc">
         <comment>Objective-C source code</comment>
         <sub-class-of type="text/x-csrc"/>
         <magic priority="30">
         <match value="#import" type="string" offset="0"/>
         </magic>
         <glob pattern="*.m"/>
         <glob pattern="*.mm"/>
    </mime-type>

</mime-info>
