KVIrc  4.9.2
DeveloperAPIs
KviUrl.h
Go to the documentation of this file.
1 #ifndef _KVI_URL_H_
2 #define _KVI_URL_H_
3 //=============================================================================
4 //
5 // File : KviUrl.h
6 // Creation date : Sat Aug 17 14:09:16 2002 GMT by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2002-2010 Szymon Stefanek (pragma at kvirc dot net)
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
27 #include "KviCString.h"
28 #include "KviHeapObject.h"
29 #include "kvi_inttypes.h"
30 
32 {
33 public:
34  KviUrl();
35  KviUrl(const char * szUrl);
36  KviUrl(const QString & szUrl);
37  KviUrl(const KviUrl & u);
38  ~KviUrl();
39 
40 protected:
41  QString m_szUrl;
42 
43  QString m_szProtocol;
44  QString m_szHost;
45  QString m_szPath;
46  QString m_szUser;
47  QString m_szPass;
48  kvi_u32_t m_uPort;
49 
50 protected:
51  void parse();
52 
53 public:
54  const QString & url() const { return m_szUrl; };
55  const QString & protocol() const { return m_szProtocol; };
56  const QString & host() const { return m_szHost; };
57  const QString & path() const { return m_szPath; };
58  const QString & user() const { return m_szUser; };
59  const QString & pass() const { return m_szPass; };
60  kvi_u32_t port() const { return m_uPort; };
61 
62  KviUrl & operator=(const QString & szUrl);
63  KviUrl & operator=(const KviUrl & u);
64 };
65 
66 #endif //_KVI_URL_H_
Definition: KviHeapObject.h:124
QString m_szUrl
Definition: KviUrl.h:41
const QString & host() const
Definition: KviUrl.h:56
QString m_szUser
Definition: KviUrl.h:46
const QString & url() const
Definition: KviUrl.h:54
const QString & pass() const
Definition: KviUrl.h:59
struct _KviUrl KviUrl
QString m_szPath
Definition: KviUrl.h:45
QString m_szHost
Definition: KviUrl.h:44
kvi_u32_t port() const
Definition: KviUrl.h:60
Heap Object.
kvi_u32_t m_uPort
Definition: KviUrl.h:48
const QString & protocol() const
Definition: KviUrl.h:55
const QString & path() const
Definition: KviUrl.h:57
QString m_szProtocol
Definition: KviUrl.h:43
#define u
Definition: detector.cpp:85
QString szUrl
Definition: libkvisetup.cpp:46
const QString & user() const
Definition: KviUrl.h:58
Definition: KviUrl.h:31
KVIRC_API bool parse(const char *url, KviCString &cmdBuffer, int contextSpec=KVI_IRCURL_CONTEXT_FIRSTFREE)
Definition: KviIrcUrl.cpp:46
#define KVILIB_API
Definition: kvi_settings.h:125
QString m_szPass
Definition: KviUrl.h:47