<commit_before>
/***************************************************************************
                jabberclient.cpp - Generic Jabber Client Class
                             -------------------
    begin                : Sat May 25 2005
    copyright            : (C) 2005 by <NAME> <<EMAIL>>
                           (C) 2006 by <NAME> <<EMAIL>>

			   Kopete (C) 2001-2006 Kopete developers
			   <<EMAIL>>.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include "jabberclient.h"

#include <qtimer.h>
#include <qregexp.h>

#include <QtCrypto>
//Added by qt3to4:
#include <Q3PtrList>
#include <bsocket.h>
#include <filetransfer.h>
#include <xmpp_tasks.h>

#include "jabberconnector.h"

#define JABBER_PENALTY_TIME	2

class JabberClient::Private
{
public:
	Private()
	 : jabberClient(0L), jabberClientStream(0L), jabberClientConnector(0L), jabberTLS(0L), jabberTLSHandler(0L)
	{}
	~Private()
	{
		if ( jabberClient )
		{
			jabberClient->close ();
		}
		
		delete jabberClient;
		delete jabberClientStream;
		delete jabberClientConnector;
		delete jabberTLSHandler;
		delete jabberTLS;
	}

	// connection details
	XMPP::Jid jid;
	QString password;

	// XMPP backend
	XMPP::Client *jabberClient;
	XMPP::ClientStream *jabberClientStream;
	JabberConnector *jabberClientConnector;
	QCA::TLS *jabberTLS;
	XMPP::QCATLSHandler *jabberTLSHandler;

	// ignore TLS warnings
	bool ignoreTLSWarnings;

	// current S5B server instance
	static XMPP::S5BServer *s5bServer;
	// address list being handled by the S5B server instance
	static QStringList s5bAddressList;
	// port of S5B server
	static int s5bServerPort;

	// local IP address
	QString localAddress;

	// whether TLS (or direct SSL in case of the old protocol) should be used
	bool forceTLS;

	// whether direct SSL connections should be used
	bool useSSL;

	// use XMPP 1.0 or the older protocol version
	bool useXMPP09;

	// whether SSL support should be probed in case the old protocol is used
	bool probeSSL;

	// override the default server name and port (only pre-XMPP 1.0)
	bool overrideHost;
	QString server;<commit_msg>Use QCA::Initializer that init/deinit QCA automaticly.<commit_after>
/***************************************************************************
                jabberclient.cpp - Generic Jabber Client Class
                             -------------------
    begin                : Sat May 25 2005
    copyright            : (C) 2005 by <NAME> <<EMAIL>>
                           (C) 2006 by <NAME> <<EMAIL>>

			   Kopete (C) 2001-2006 Kopete developers
			   <<EMAIL>>.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include "jabberclient.h"

#include <qtimer.h>
#include <qregexp.h>

#include <QtCrypto>
//Added by qt3to4:
#include <Q3PtrList>
#include <bsocket.h>
#include <filetransfer.h>
#include <xmpp_tasks.h>

#include "jabberconnector.h"

#define JABBER_PENALTY_TIME	2

class JabberClient::Private
{
public:
	Private()
	 : jabberClient(0L), jabberClientStream(0L), jabberClientConnector(0L), jabberTLS(0L), jabberTLSHandler(0L)
	{}
	~Private()
	{
		if ( jabberClient )
		{
			jabberClient->close ();
		}
		
		delete jabberClient;
		delete jabberClientStream;
		delete jabberClientConnector;
		delete jabberTLSHandler;
		delete jabberTLS;
	}

	// connection details
	XMPP::Jid jid;
	QString password;

	// XMPP backend
	XMPP::Client *jabberClient;
	XMPP::ClientStream *jabberClientStream;
	JabberConnector *jabberClientConnector;
	QCA::TLS *jabberTLS;
	XMPP::QCATLSHandler *jabberTLSHandler;
	QCA::Initializer qcaInit;

	// ignore TLS warnings
	bool ignoreTLSWarnings;

	// current S5B server instance
	static XMPP::S5BServer *s5bServer;
	// address list being handled by the S5B server instance
	static QStringList s5bAddressList;
	// port of S5B server
	static int s5bServerPort;

	// local IP address
	QString localAddress;

	// whether TLS (or direct SSL in case of the old protocol) should be used
	bool forceTLS;

	// whether direct SSL connections should be used
	bool useSSL;

	// use XMPP 1.0 or the older protocol version
	bool useXMPP09;

	// whether SSL support should be probed in case the old protocol is used
	bool probeSSL;

	// override the default server name and port (only pre-XMPP 1.0)
	bool overrideHost;
	QString server;
{'fraction_non_alphanumeric': 0.18878470970068517, 'fraction_numerical': 0.016227912008654886, 'mean_word_length': 2.7403910991233986, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6867313', 'n_tokens_mistral': 1708, 'n_tokens_neox': 1556, 'n_words': 474}