/**************************************************************************************************
 * Copyright 2018 Qualcomm Technologies International, Ltd.                                       *
 **************************************************************************************************/

{% if "iotsys" in swagger_data.type %}
package com.qualcomm.qti.iotcontrollersdk.iotsys.listeners;
{% endif %}

{% if "allplay" in swagger_data.type %}
package com.qualcomm.qti.iotcontrollersdk.allplay.listeners;
{% endif %}

{% set is_imported = [False] %}
{% for method in swagger_data.crud %}
{% if ('response' in swagger_data.attr_classes_crud[method]) and (not is_imported[0]) %}
{% if "iotsys" in swagger_data.type %}
import com.qualcomm.qti.iotcontrollersdk.iotsys.resource.attributes.{{(swagger_data.attr_classes_crud[method])["response"]|class_name_syntax}}Attr;
{% endif %}
{% if "allplay" in swagger_data.type %}
import com.qualcomm.qti.iotcontrollersdk.allplay.resource.attributes.{{(swagger_data.attr_classes_crud[method])["response"]|class_name_syntax}}Attr;
{% endif %}
{% set _ = is_imported.append(not is_imported.pop()) %}
{% endif %}
{% endfor %}

{% set mybool = [False] %}
public interface {{swagger_data.name|class_name_syntax}}Listener {
{% for method in swagger_data.crud %}
{% if 'param' in swagger_data.attr_classes_crud[method] %}
{% if 'response' in swagger_data.attr_classes_crud[method] %}
{% if (not mybool[0]) %}
{% set _ = mybool.append(not mybool.pop()) %}
{% endif %}
    void On{{(swagger_data.attr_classes_crud[method])["response"]|class_name_syntax}}Completed({{(swagger_data.attr_classes_crud[method])["response"]|class_name_syntax}}Attr attribute, boolean status);
{% else %}
{% if mybool[0] %}
    default void On{{(swagger_data.attr_classes_crud[method])["param"]|class_name_syntax}}Completed(boolean status){}
{% else %}
    void On{{(swagger_data.attr_classes_crud[method])["param"]|class_name_syntax}}Completed(boolean status);
{% endif %}
{% endif %}
{% else %}
{% if 'response' in swagger_data.attr_classes_crud[method] %}

{% if (not mybool[0]) %}
{% set _ = mybool.append(not mybool.pop()) %}
{% endif %}
    void On{{method|variable_syntax(True,True)}}{{swagger_data.name|class_name_syntax}}Completed({{(swagger_data.attr_classes_crud[method])["response"]|class_name_syntax}}Attr attribute, boolean status);
{% else %}
{% if mybool[0] %}
    default void On{{method|variable_syntax(True,True)}}{{swagger_data.name|class_name_syntax}}Completed(boolean status){}
{% else %}
    void On{{method|variable_syntax(True,True)}}{{swagger_data.name|class_name_syntax}}Completed(boolean status);
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
}










