<?xml version="1.0" encoding="UTF-8"?>
<!--
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial
-->
<typesystem package="PySide6.QtMqtt">
    <load-typesystem name="QtCore/typesystem_core.xml" generate="no"/>
    <load-typesystem name="QtNetwork/typesystem_network.xml" generate="no"/>

    <namespace-type name="QMqtt">
        <enum-type name="MessageStatus"/>
        <enum-type name="PayloadFormatIndicator"/>
        <enum-type name="ReasonCode"/>
    </namespace-type>
    <value-type name="QMqttAuthenticationProperties"/>
    <object-type name="QMqttClient">
        <enum-type name="ClientError"/>
        <enum-type name="ClientState"/>
        <enum-type name="ProtocolVersion"/>
        <enum-type name="TransportType"/>
    </object-type>
    <value-type name="QMqttConnectionProperties"/>
    <value-type name="QMqttLastWillProperties"/>
    <object-type name="QMqttMessage">
        <!-- TODO: needs special treatment -->
        <modify-function signature="operator!=(QMqttMessage const&amp;)const" remove="all"/>
    </object-type>
    <value-type name="QMqttMessageStatusProperties"/>
    <value-type name="QMqttPublishProperties">
        <enum-type name="PublishPropertyDetail" flags="PublishPropertyDetails"/>
    </value-type>
    <value-type name="QMqttServerConnectionProperties">
        <enum-type name="ServerPropertyDetail" flags="ServerPropertyDetails"/>
    </value-type>
    <object-type name="QMqttStringPair">
        <enum-type name="SubscriptionState"/>
    </object-type>
    <object-type name="QMqttSubscription">
        <enum-type name="SubscriptionState"/>
    </object-type>
    <value-type name="QMqttSubscriptionProperties"/>
    <value-type name="QMqttTopicFilter">
        <enum-type name="MatchOption" flags="MatchOptions"/>
    </value-type>
    <value-type name="QMqttTopicName"/>
    <value-type name="QMqttUnsubscriptionProperties"/>
    <!-- TODO: generate compilation errors.
        This is a list of QMqttStringPair elements, so we are adding it
        as a primitive-type in case another function uses it, and we are transforming
        it into a Python list of the same element.
    <value-type name="QMqttUserProperties"/>-->
    <primitive-type name="QMqttUserProperties">
      <include file-name="QMqttUserProperties" location="global"/>
      <conversion-rule>
          <native-to-target>
              <insert-template name="shiboken_conversion_cppsequence_to_pylist">
                  <replace from="%INTYPE_0" to="QMqttStringPair"/>
              </insert-template>
          </native-to-target>
          <target-to-native>
              <add-conversion type="PySequence">
                  <insert-template name="shiboken_conversion_pyiterable_to_cppsequentialcontainer_reserve">
                      <replace from="%OUTTYPE_0" to="QMqttStringPair"/>
                  </insert-template>
              </add-conversion>
          </target-to-native>
      </conversion-rule>
    </primitive-type>
</typesystem>
