~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/qt3support/network/q3url.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
**
 
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
 
4
**
 
5
** This file is part of the Qt 3 compatibility classes of the Qt Toolkit.
 
6
**
 
7
** This file may be distributed under the terms of the Q Public License
 
8
** as defined by Trolltech AS of Norway and appearing in the file
 
9
** LICENSE.QPL included in the packaging of this file.
 
10
**
 
11
** This file may be distributed and/or modified under the terms of the
 
12
** GNU General Public License version 2 as published by the Free Software
 
13
** Foundation and appearing in the file LICENSE.GPL included in the
 
14
** packaging of this file.
 
15
**
 
16
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
 
17
**   information about Qt Commercial License Agreements.
 
18
** See http://www.trolltech.com/qpl/ for QPL licensing information.
 
19
** See http://www.trolltech.com/gpl/ for GPL licensing information.
 
20
**
 
21
** Contact info@trolltech.com if any conditions of this licensing are
 
22
** not clear to you.
 
23
**
 
24
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 
25
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
26
**
 
27
****************************************************************************/
 
28
 
 
29
#ifndef Q3URL_H
 
30
#define Q3URL_H
 
31
 
 
32
#ifndef QT_H
 
33
#include "QtCore/qstring.h"
 
34
#endif // QT_H
 
35
 
 
36
#ifndef QT_NO_URL
 
37
 
 
38
class Q3UrlPrivate;
 
39
 
 
40
class Q_COMPAT_EXPORT Q3Url
 
41
{
 
42
public:
 
43
    Q3Url();
 
44
    Q3Url( const QString& url );
 
45
    Q3Url( const Q3Url& url );
 
46
    Q3Url( const Q3Url& url, const QString& relUrl, bool checkSlash = false );
 
47
    virtual ~Q3Url();
 
48
 
 
49
    QString protocol() const;
 
50
    virtual void setProtocol( const QString& protocol );
 
51
 
 
52
    QString user() const;
 
53
    virtual void setUser( const QString& user );
 
54
    bool hasUser() const;
 
55
 
 
56
    QString password() const;
 
57
    virtual void setPassword( const QString& pass );
 
58
    bool hasPassword() const;
 
59
 
 
60
    QString host() const;
 
61
    virtual void setHost( const QString& user );
 
62
    bool hasHost() const;
 
63
 
 
64
    int port() const;
 
65
    virtual void setPort( int port );
 
66
    bool hasPort() const;
 
67
 
 
68
    QString path( bool correct = true ) const;
 
69
    virtual void setPath( const QString& path );
 
70
    bool hasPath() const;
 
71
 
 
72
    virtual void setEncodedPathAndQuery( const QString& enc );
 
73
    QString encodedPathAndQuery();
 
74
 
 
75
    virtual void setQuery( const QString& txt );
 
76
    QString query() const;
 
77
 
 
78
    QString ref() const;
 
79
    virtual void setRef( const QString& txt );
 
80
    bool hasRef() const;
 
81
 
 
82
    bool isValid() const;
 
83
    bool isLocalFile() const;
 
84
 
 
85
    virtual void addPath( const QString& path );
 
86
    virtual void setFileName( const QString& txt );
 
87
 
 
88
    QString fileName() const;
 
89
    QString dirPath() const;
 
90
 
 
91
    Q3Url& operator=( const Q3Url& url );
 
92
    Q3Url& operator=( const QString& url );
 
93
 
 
94
    bool operator==( const Q3Url& url ) const;
 
95
    bool operator==( const QString& url ) const;
 
96
 
 
97
    static void decode( QString& url );
 
98
    static void encode( QString& url );
 
99
 
 
100
    operator QString() const;
 
101
    virtual QString toString( bool encodedPath = false, bool forcePrependProtocol = true ) const;
 
102
 
 
103
    virtual bool cdUp();
 
104
 
 
105
    static bool isRelativeUrl( const QString &url );
 
106
 
 
107
protected:
 
108
    virtual void reset();
 
109
    virtual bool parse( const QString& url );
 
110
 
 
111
private:
 
112
    Q3UrlPrivate *d;
 
113
 
 
114
};
 
115
 
 
116
#endif //QT_NO_URL
 
117
 
 
118
#endif