<commit_before>/*
 * Copyright (C) 2008-2009 <NAME>
 *
 * Author:
 *	<NAME>
 *
 * Source:
 *	http://code.google.com/p/qxmpp
 *
 * This file is a part of QXmpp library.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 */


#include "QXmppBind.h"
#include "QXmppUtils.h"
#include "QXmppConstants.h"

#include <QTextStream>
#include <QXmlStreamWriter>

QXmppBind::QXmppBind(QXmppIq::Type type)
    : QXmppIq(type)
{
}
QXmppBind::QXmppBind(const QString& type)
    : QXmppIq(type)
{
}

QXmppBind::~QXmppBind()
{
}

QString QXmppBind::jid() const
{
    return m_jid;
}

QString QXmppBind::resource() const
{
    return m_resource;
}

void QXmppBind::setJid(const QString& str)
{
    m_jid = str;
}

void QXmppBind::setResource(const QString& str)
{
    m_resource = str;
}

void QXmppBind::toXmlElementFromChild(QXmlStreamWriter *writer) const
{
    writer->writeStartElement("bind");
    helperToXmlAddAttribute(writer, "xmlns", ns_bind);
    helperToXmlAddTextElement(writer, "jid", getJid() );
    helperToXmlAddTextElement(writer, "resource", getResource());
    writer->writeEndElement();
}

QString QXmppBind::getJid() const
{<commit_msg>remove deprecated functions<commit_after>/*
 * Copyright (C) 2008-2009 <NAME>
 *
 * Author:
 *	<NAME>
 *
 * Source:
 *	http://code.google.com/p/qxmpp
 *
 * This file is a part of QXmpp library.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 */


#include "QXmppBind.h"
#include "QXmppUtils.h"
#include "QXmppConstants.h"

#include <QTextStream>
#include <QXmlStreamWriter>

QXmppBind::QXmppBind(QXmppIq::Type type)
    : QXmppIq(type)
{
}
QXmppBind::QXmppBind(const QString& type)
    : QXmppIq(type)
{
}

QXmppBind::~QXmppBind()
{
}

QString QXmppBind::jid() const
{
    return m_jid;
}

QString QXmppBind::resource() const
{
    return m_resource;
}

void QXmppBind::setJid(const QString& str)
{
    m_jid = str;
}

void QXmppBind::setResource(const QString& str)
{
    m_resource = str;
}

void QXmppBind::toXmlElementFromChild(QXmlStreamWriter *writer) const
{
    writer->writeStartElement("bind");
    helperToXmlAddAttribute(writer, "xmlns", ns_bind);
    helperToXmlAddTextElement(writer, "jid", jid() );
    helperToXmlAddTextElement(writer, "resource", resource());
    writer->writeEndElement();
}

QString QXmppBind::getJid() const
{
{'fraction_non_alphanumeric': 0.11310259579728059, 'fraction_numerical': 0.006180469715698393, 'mean_word_length': 4.458684654300169, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1737363', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1134, 'n_words': 314}