/***************************************************************************
                            qt_QUrl.cpp -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 2001, using kalyptus 0.9.
 ***************************************************************************/

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

extern "C" {
#include "qt_QUrl.h"
}

#include <qurl.h>

class QUrlBridge : public QUrl
{
public:
	QUrlBridge() : QUrl() {}
	QUrlBridge(const QString& url) : QUrl(url) {}
	QUrlBridge(const QUrl& url) : QUrl(url) {}
	QUrlBridge(const QUrl& url, const QString& relUrl, bool checkSlash) : QUrl(url, relUrl, checkSlash) {}
	~QUrlBridge() {}
	void protected_reset() {
		QUrl::reset();
		return;
	}
	 bool  protected_parse(const QString& url) {
		return ( bool ) QUrl::parse(url);
	}
};

qt_QUrl * qt_new_QUrl(){
	return (qt_QUrl *) new QUrlBridge();
}
qt_QUrl * qt_new_QUrl1(qt_QString * url){
	return (qt_QUrl *) new QUrlBridge((QString&)* (QString*)url);
}
qt_QUrl * qt_new_QUrl2(qt_QUrl* url){
	return (qt_QUrl *) new QUrlBridge((QUrl&)* (QUrl*)url);
}
qt_QUrl * qt_new_QUrl3(qt_QUrl* url, qt_QString * relUrl, int checkSlash){
	return (qt_QUrl *) new QUrlBridge((QUrl&)* (QUrl*)url, (QString&)* (QString*)relUrl, (bool)checkSlash);
}
void qt_del_QUrl( qt_QUrl* p ){
	delete (QUrlBridge*) p;
}
qt_QString * qt_QUrl_protocol( qt_QUrl* instPointer){
	return (qt_QString *)new QString(((QUrlBridge*)instPointer)->protocol());
}
void qt_QUrl_setProtocol( qt_QUrl* instPointer,qt_QString * protocol){
	((QUrlBridge*)instPointer)->setProtocol((QString&)* (QString*)protocol);
	return;
}
qt_QString * qt_QUrl_user( qt_QUrl* instPointer){
	return (qt_QString *)new QString(((QUrlBridge*)instPointer)->user());
}
void qt_QUrl_setUser( qt_QUrl* instPointer,qt_QString * user){
	((QUrlBridge*)instPointer)->setUser((QString&)* (QString*)user);
	return;
}
int qt_QUrl_hasUser( qt_QUrl* instPointer){
	return (int) ((QUrlBridge*)instPointer)->hasUser();
}
qt_QString * qt_QUrl_password( qt_QUrl* instPointer){
	return (qt_QString *)new QString(((QUrlBridge*)instPointer)->password());
}
void qt_QUrl_setPassword( qt_QUrl* instPointer,qt_QString * pass){
	((QUrlBridge*)instPointer)->setPassword((QString&)* (QString*)pass);
	return;
}
int qt_QUrl_hasPassword( qt_QUrl* instPointer){
	return (int) ((QUrlBridge*)instPointer)->hasPassword();
}
qt_QString * qt_QUrl_host( qt_QUrl* instPointer){
	return (qt_QString *)new QString(((QUrlBridge*)instPointer)->host());
}
void qt_QUrl_setHost( qt_QUrl* instPointer,qt_QString * user){
	((QUrlBridge*)instPointer)->setHost((QString&)* (QString*)user);
	return;
}
int qt_QUrl_hasHost( qt_QUrl* instPointer){
	return (int) ((QUrlBridge*)instPointer)->hasHost();
}
int qt_QUrl_port( qt_QUrl* instPointer){
	return (int) ((QUrlBridge*)instPointer)->port();
}
void qt_QUrl_setPort( qt_QUrl* instPointer,int port){
	((QUrlBridge*)instPointer)->setPort((int)port);
	return;
}
int qt_QUrl_hasPort( qt_QUrl* instPointer){
	return (int) ((QUrlBridge*)instPointer)->hasPort();
}
qt_QString * qt_QUrl_path( qt_QUrl* instPointer,int correct){
	return (qt_QString *)new QString(((QUrlBridge*)instPointer)->path((bool)correct));
}
void qt_QUrl_setPath( qt_QUrl* instPointer,qt_QString * path){
	((QUrlBridge*)instPointer)->setPath((QString&)* (QString*)path);
	return;
}
int qt_QUrl_hasPath( qt_QUrl* instPointer){
	return (int) ((QUrlBridge*)instPointer)->hasPath();
}
void qt_QUrl_setEncodedPathAndQuery( qt_QUrl* instPointer,qt_QString * enc){
	((QUrlBridge*)instPointer)->setEncodedPathAndQuery((QString&)* (QString*)enc);
	return;
}
qt_QString * qt_QUrl_encodedPathAndQuery( qt_QUrl* instPointer){
	return (qt_QString *)new QString(((QUrlBridge*)instPointer)->encodedPathAndQuery());
}
void qt_QUrl_setQuery( qt_QUrl* instPointer,qt_QString * txt){
	((QUrlBridge*)instPointer)->setQuery((QString&)* (QString*)txt);
	return;
}
qt_QString * qt_QUrl_query( qt_QUrl* instPointer){
	return (qt_QString *)new QString(((QUrlBridge*)instPointer)->query());
}
qt_QString * qt_QUrl_ref( qt_QUrl* instPointer){
	return (qt_QString *)new QString(((QUrlBridge*)instPointer)->ref());
}
void qt_QUrl_setRef( qt_QUrl* instPointer,qt_QString * txt){
	((QUrlBridge*)instPointer)->setRef((QString&)* (QString*)txt);
	return;
}
int qt_QUrl_hasRef( qt_QUrl* instPointer){
	return (int) ((QUrlBridge*)instPointer)->hasRef();
}
int qt_QUrl_isValid( qt_QUrl* instPointer){
	return (int) ((QUrlBridge*)instPointer)->isValid();
}
int qt_QUrl_isLocalFile( qt_QUrl* instPointer){
	return (int) ((QUrlBridge*)instPointer)->isLocalFile();
}
void qt_QUrl_addPath( qt_QUrl* instPointer,qt_QString * path){
	((QUrlBridge*)instPointer)->addPath((QString&)* (QString*)path);
	return;
}
void qt_QUrl_setFileName( qt_QUrl* instPointer,qt_QString * txt){
	((QUrlBridge*)instPointer)->setFileName((QString&)* (QString*)txt);
	return;
}
qt_QString * qt_QUrl_fileName( qt_QUrl* instPointer){
	return (qt_QString *)new QString(((QUrlBridge*)instPointer)->fileName());
}
qt_QString * qt_QUrl_dirPath( qt_QUrl* instPointer){
	return (qt_QString *)new QString(((QUrlBridge*)instPointer)->dirPath());
}
qt_QString * qt_QUrl_toString( qt_QUrl* instPointer,int encodedPath, int forcePrependProtocol){
	return (qt_QString *)new QString(((QUrlBridge*)instPointer)->toString((bool)encodedPath, (bool)forcePrependProtocol));
}
int qt_QUrl_cdUp( qt_QUrl* instPointer){
	return (int) ((QUrlBridge*)instPointer)->cdUp();
}
void qt_QUrl_decode( qt_QString * url){
	QUrlBridge::decode((QString&)* (QString*)url);
	return;
}
void qt_QUrl_encode( qt_QString * url){
	QUrlBridge::encode((QString&)* (QString*)url);
	return;
}
int qt_QUrl_isRelativeUrl( qt_QString * url){
	return (int) QUrlBridge::isRelativeUrl((QString&)* (QString*)url);
}
void qt_QUrl_reset( qt_QUrl* instPointer){
	((QUrlBridge*)instPointer)->protected_reset();
	return;
}
int qt_QUrl_parse( qt_QUrl* instPointer,qt_QString * url){
	return (int) ((QUrlBridge*)instPointer)->protected_parse((QString&)* (QString*)url);
}
