<?xml version="1.0" encoding="UTF-8"?>
<protocol name="test_protocol_v1" version="1">
  <copyright>
    I eat paint
  </copyright>

  <object name="my_manager_v1" version="1">
    <description summary="manager object">
      This object is an example manager object for the protocol
    </description>

    <s2c name="send_message">
      <description summary="Send a text message">
            Sends a text message to the client
      </description>
      <arg name="message" type="varchar" summary="message"/>
    </s2c>

    <c2s name="send_message">
      <description summary="Send a text message">
            Sends a text message to the server
      </description>
      <arg name="message" type="varchar" summary="message"/>
    </c2s>

    <c2s name="send_message_fd">
      <description summary="Send a text message">
            Sends a fd message to the server
      </description>
      <arg name="message" type="fd" summary="message"/>
    </c2s>

    <c2s name="send_message_array_fd">
      <description summary="Send a text message">
            Sends a fd message to the server
      </description>
      <arg name="message" type="array fd" summary="message"/>
    </c2s>

    <c2s name="send_message_array">
      <description summary="Send a text array message">
            Sends an array message to the server
      </description>
      <arg name="message" type="array varchar" summary="message"/>
    </c2s>

    <c2s name="send_message_array_uint">
      <description summary="Send an uint array message">
            Sends an array message to the server
      </description>
      <arg name="message" type="array uint" summary="message"/>
    </c2s>

    <s2c name="recv_message_array_uint">
      <description summary="Receive an uint array message">
            Receives an array message to the server
      </description>
      <arg name="message" type="array uint" summary="message"/>
    </s2c>

    <c2s name="make_object">
      <description summary="Make a test object">
            Makes a test object
      </description>
      <returns iface="my_object_v1"/>
    </c2s>

  </object>

  <enum name="my_enum">
    <value idx="0" name="hello"/>
    <value idx="4" name="world"/>
  </enum>

  <enum name="my_error_enum">
    <value idx="0" name="oh_no"/>
    <value idx="1" name="error_important" description="important error!!"/>
  </enum>

  <object name="my_object_v1" version="1">
    <description summary="test object">
      This object is an example object for the protocol
    </description>

    <s2c name="send_message">
      <description summary="Send a text message">
            Sends a text message to the client
      </description>
      <arg name="message" type="varchar" summary="message"/>
    </s2c>

    <c2s name="send_message">
      <description summary="Send a text message">
            Sends a text message to the server
      </description>
      <arg name="message" type="varchar" summary="message"/>
    </c2s>

    <c2s name="send_enum">
      <description summary="Send an enum message">
            Sends an enum message to the server
      </description>
      <arg name="message" type="enum" interface="my_enum" summary="message"/>
    </c2s>

    <c2s name="destroy" destructor="true">
      <description summary="Send a text message">
            Sends a text message to the server
      </description>
    </c2s>

    <c2s name="make_object">
      <description summary="Make a test object">
            Makes a test object from a test object
      </description>
      <returns iface="my_object_v1"/>
    </c2s>

  </object>
</protocol>
