/***************************************************************************
                            KProtocolManager.cpp -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
***************************************************************************/

#define _BOOL_H_
#include <kprotocolmanager.h>
#include <qstring.h>
#include <qcstring.h>

#include <qtjava/QtSupport.h>
#include <kdejava/KDESupport.h>
#include <kdejava/KProtocolManager.h>

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolManager_defaultUserAgent__(JNIEnv *env, jclass obj)
{
	QString  _qstring;
	_qstring = KProtocolManager::defaultUserAgent();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolManager_defaultUserAgent__Ljava_lang_String_2(JNIEnv *env, jclass obj, jstring keys)
{
	QString  _qstring;
static QString * _qstring_keys = 0;
	_qstring = KProtocolManager::defaultUserAgent((QString&) * (QString *) QtSupport::toQString(env, keys, &_qstring_keys));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolManager_userAgentForHost(JNIEnv *env, jclass obj, jstring arg1)
{
	QString  _qstring;
static QString * _qstring_arg1 = 0;
	_qstring = KProtocolManager::userAgentForHost((QString&) * (QString *) QtSupport::toQString(env, arg1, &_qstring_arg1));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolManager_readTimeout(JNIEnv *env, jclass obj)
{
	return (jint) KProtocolManager::readTimeout();
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolManager_connectTimeout(JNIEnv *env, jclass obj)
{
	return (jint) KProtocolManager::connectTimeout();
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolManager_proxyConnectTimeout(JNIEnv *env, jclass obj)
{
	return (jint) KProtocolManager::proxyConnectTimeout();
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolManager_responseTimeout(JNIEnv *env, jclass obj)
{
	return (jint) KProtocolManager::responseTimeout();
}

//JNIEXPORT jint JNICALL
//Java_org_kde_koala_KProtocolManager_defaultConnectTimeout(JNIEnv *env, jclass obj)
//{
//	return (jint) KProtocolManager::defaultConnectTimeout();
//}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolManager_useProxy(JNIEnv *env, jclass obj)
{
	return (jboolean) KProtocolManager::useProxy();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolManager_useReverseProxy(JNIEnv *env, jclass obj)
{
	return (jboolean) KProtocolManager::useReverseProxy();
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolManager_proxyType(JNIEnv *env, jclass obj)
{
	return (jint) KProtocolManager::proxyType();
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolManager_proxyAuthMode(JNIEnv *env, jclass obj)
{
	return (jint) KProtocolManager::proxyAuthMode();
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolManager_noProxyFor(JNIEnv *env, jclass obj)
{
	QString  _qstring;
	_qstring = KProtocolManager::noProxyFor();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolManager_proxyFor(JNIEnv *env, jclass obj, jstring arg1)
{
	QString  _qstring;
static QString * _qstring_arg1 = 0;
	_qstring = KProtocolManager::proxyFor((QString&) * (QString *) QtSupport::toQString(env, arg1, &_qstring_arg1));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolManager_proxyForURL(JNIEnv *env, jclass obj, jobject arg1)
{
	QString  _qstring;
	_qstring = KProtocolManager::proxyForURL((KURL&) *(KURL *) QtSupport::getQt(env, arg1));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KProtocolManager_badProxy(JNIEnv *env, jclass obj, jstring arg1)
{
static QString * _qstring_arg1 = 0;
	KProtocolManager::badProxy((QString&) * (QString *) QtSupport::toQString(env, arg1, &_qstring_arg1));
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolManager_proxyConfigScript(JNIEnv *env, jclass obj)
{
	QString  _qstring;
	_qstring = KProtocolManager::proxyConfigScript();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolManager_useCache(JNIEnv *env, jclass obj)
{
	return (jboolean) KProtocolManager::useCache();
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolManager_maxCacheAge(JNIEnv *env, jclass obj)
{
	return (jint) KProtocolManager::maxCacheAge();
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolManager_maxCacheSize(JNIEnv *env, jclass obj)
{
	return (jint) KProtocolManager::maxCacheSize();
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolManager_cacheDir(JNIEnv *env, jclass obj)
{
	QString  _qstring;
	_qstring = KProtocolManager::cacheDir();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolManager_cacheControl(JNIEnv *env, jclass obj)
{
	return (jint) KProtocolManager::cacheControl();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolManager_autoResume(JNIEnv *env, jclass obj)
{
	return (jboolean) KProtocolManager::autoResume();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolManager_markPartial(JNIEnv *env, jclass obj)
{
	return (jboolean) KProtocolManager::markPartial();
}

JNIEXPORT jint JNICALL
Java_org_kde_koala_KProtocolManager_minimumKeepSize(JNIEnv *env, jclass obj)
{
	return (jint) KProtocolManager::minimumKeepSize();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_koala_KProtocolManager_persistentConnections(JNIEnv *env, jclass obj)
{
	return (jboolean) KProtocolManager::persistentConnections();
}

JNIEXPORT void JNICALL
Java_org_kde_koala_KProtocolManager_reparseConfiguration(JNIEnv *env, jclass obj)
{
	KProtocolManager::reparseConfiguration();
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_koala_KProtocolManager_slaveProtocol(JNIEnv *env, jclass obj, jobject url, jstring proxy)
{
	QString  _qstring;
static QString * _qstring_proxy = 0;
	_qstring = KProtocolManager::slaveProtocol((KURL&) *(KURL *) QtSupport::getQt(env, url), (QString&) * (QString *) QtSupport::toQString(env, proxy, &_qstring_proxy));
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT jobject JNICALL
Java_org_kde_koala_KProtocolManager_config(JNIEnv *env, jclass obj)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)KProtocolManager::config(), "org.kde.koala.KConfig");
}

