<commit_before>{#-
 #  Jinja2 template for generating C prototypes for Legato APIs.
 #
 #  Note: C/C++ comments apply to the generated code.  For example this template itself is not
 #  autogenerated, but the comment is copied verbatim into the generated file when the template is
 #  expanded.
 #
 #  Copyright (C) Sierra Wireless Inc.
 #}
/*
 * ====================== WARNING ======================
 *
 * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
 * DO NOT MODIFY IN ANY WAY.
 *
 * ====================== WARNING ======================
 */
{% block HeaderComments %}
{% endblock %}
#ifndef {{apiName|upper}}_INTERFACE_H_INCLUDE_GUARD
#define {{apiName|upper}}_INTERFACE_H_INCLUDE_GUARD


#include "legato.h"
{%- block InterfaceHeader %}{%- if imports %}

// Interface specific includes
{%- for import in imports %}
#include "{{import}}.h"
{%- endfor %}
{%- endif %}
{%- endblock %}


{% block GenericFunctions %}{% endblock %}
{% for define in definitions %}

//--------------------------------------------------------------------------------------------------
{{define.comment|FormatHeaderComment}}
//--------------------------------------------------------------------------------------------------
#define {{apiName|upper}}_{{define.name}} {{define.value}}
{%- endfor %}
{%- for type in types if type is not HandlerType %}

//--------------------------------------------------------------------------------------------------
{{type.comment|FormatHeaderComment}}
//--------------------------------------------------------------------------------------------------
{%- if type is EnumType %}
typedef enum
{
    {%- for element in type.elements %}
    {{apiName|upper}}_{{element.name}} = {{element.value}}{%if not loop.last%},{%endif%}
        ///<{{element.comments|join("\n///<")|indent(8)}}
    {%- endfor %}
}
{{type|FormatType}};
{%- elif type is BitMaskType %}
typedef enum
{
    {%- for element in type.elements %}
    {{apiName|upper}}_{{element.name}} = {{"0x%x" % element.value}}{%if not loop.last%},{%endif%}
    {%- if element.comments %}        ///<{{element.comments|join("\n///<")|indent(8)}}{%endif%}
    {%- endfor %}
}
{{type|FormatType}};
{%- elif type is ReferenceType %}
typedef struct {{apiName}}_{{type.name}}* {{type|FormatType}};
{%- endif %}<commit_msg>Enclose string definitions in quotes in generated code<commit_after>{#-
 #  Jinja2 template for generating C prototypes for Legato APIs.
 #
 #  Note: C/C++ comments apply to the generated code.  For example this template itself is not
 #  autogenerated, but the comment is copied verbatim into the generated file when the template is
 #  expanded.
 #
 #  Copyright (C) Sierra Wireless Inc.
 #}
/*
 * ====================== WARNING ======================
 *
 * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
 * DO NOT MODIFY IN ANY WAY.
 *
 * ====================== WARNING ======================
 */
{% block HeaderComments %}
{% endblock %}
#ifndef {{apiName|upper}}_INTERFACE_H_INCLUDE_GUARD
#define {{apiName|upper}}_INTERFACE_H_INCLUDE_GUARD


#include "legato.h"
{%- block InterfaceHeader %}{%- if imports %}

// Interface specific includes
{%- for import in imports %}
#include "{{import}}.h"
{%- endfor %}
{%- endif %}
{%- endblock %}


{% block GenericFunctions %}{% endblock %}
{% for define in definitions %}

//--------------------------------------------------------------------------------------------------
{{define.comment|FormatHeaderComment}}
//--------------------------------------------------------------------------------------------------
{%- if define.value is string %}
#define {{apiName|upper}}_{{define.name}} "{{define.value}}"
{%- else %}
#define {{apiName|upper}}_{{define.name}} {{define.value}}
{%- endif %}
{%- endfor %}
{%- for type in types if type is not HandlerType %}

//--------------------------------------------------------------------------------------------------
{{type.comment|FormatHeaderComment}}
//--------------------------------------------------------------------------------------------------
{%- if type is EnumType %}
typedef enum
{
    {%- for element in type.elements %}
    {{apiName|upper}}_{{element.name}} = {{element.value}}{%if not loop.last%},{%endif%}
        ///<{{element.comments|join("\n///<")|indent(8)}}
    {%- endfor %}
}
{{type|FormatType}};
{%- elif type is BitMaskType %}
typedef enum
{
    {%- for element in type.elements %}
    {{apiName|upper}}_{{element.name}} = {{"0x%x" % element.value}}{%if not loop.last%},{%endif%}
    {%- if element.comments %}        ///<{{element.comments|join("\n///<")|indent(8)}}{%endif%}
    {%- endfor %}
}
{{type|FormatType}};
{%- elif type is ReferenceType %}
typedef struct {{apiName}}_{{type.name}}* {{type|FormatType}};
{%- endif %}
{'fraction_non_alphanumeric': 0.35497470489038785, 'fraction_numerical': 0.0016863406408094434, 'mean_word_length': 2.0593165699548677, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5103717', 'n_tokens_mistral': 1387, 'n_tokens_neox': 1227, 'n_words': 326}