/***************************************************************************
                            QUrl.h -  description
                             -------------------
    begin                : Wed Nov 21 12:08:37 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 12:08:37 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.                       *
 *                                                                         *
 ***************************************************************************/

#ifndef QURL_H
#define QURL_H

#include <Foundation/NSObject.h>
#include <Foundation/NSString.h>
#include <qtobjc/QtSupport.h>

@class QUrl;

@protocol QUrlInterface
- (NSString *) protocol;
- setProtocol: (NSString *)protocol;
- (NSString *) user;
- setUser: (NSString *)user;
- (BOOL) hasUser;
- (NSString *) password;
- setPassword: (NSString *)pass;
- (BOOL) hasPassword;
- (NSString *) host;
- setHost: (NSString *)user;
- (BOOL) hasHost;
- (int) port;
- setPort: (int)port;
//- (BOOL) hasPort;
- (NSString *) path: (BOOL)correct;
- setPath: (NSString *)path;
- (BOOL) hasPath;
- setEncodedPathAndQuery: (NSString *)enc;
- (NSString *) encodedPathAndQuery;
- setQuery: (NSString *)txt;
- (NSString *) query;
- (NSString *) ref;
- setRef: (NSString *)txt;
- (BOOL) hasRef;
- (BOOL) isValid;
- (BOOL) isLocalFile;
- addPath: (NSString *)path;
- setFileName: (NSString *)txt;
- (NSString *) fileName;
- (NSString *) dirPath;
- (NSString *) toString: (BOOL)encodedPath forcePrependProtocol: (BOOL)forcePrependProtocol;
- (BOOL) cdUp;
+ decode: (NSString *)url;
+ encode: (NSString *)url;
+ (BOOL) isRelativeUrl: (NSString *)url;
- reset;
- (BOOL) parseURL: (NSString *)url;
@end

@interface QUrl : NSObject <QtSupport,QUrlInterface>
{
@private
	void * _qt;
	BOOL  _allocatedInObjcWorld;
}
- init;
- initWithText: (NSString *)url;
- copyWithZone: (NSZone *) zone;
- initWithUrl: (QUrl*)url relUrl: (NSString *)relUrl checkSlash: (BOOL)checkSlash;
- initWithUrl: (QUrl*)url relUrl: (NSString *)relUrl ;
- (void) dealloc;
@end

#endif
