KVIrc  4.9.2
DeveloperAPIs
KviIrcUrl.h
Go to the documentation of this file.
1 #ifndef _KVI_IRCURL_H_
2 #define _KVI_IRCURL_H_
3 //=============================================================================
4 //
5 // File : KviIrcUrl.h
6 // Creation date : Sun Mar 04 2001 14:22:55 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2001-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 "kvi_settings.h"
28 #include "KviCString.h"
29 #include "kvi_inttypes.h"
30 
31 class KviIrcServer;
32 class KviConsoleWindow;
33 
34 #include <QStringList>
35 
36 // Create /server -u <server> commands (first free context)
37 #define KVI_IRCURL_CONTEXT_FIRSTFREE 0
38 // Create /server -n <server> commands (new irc context)
39 #define KVI_IRCURL_CONTEXT_NEW 1
40 // Create /server <server> commands (this irc context)
41 #define KVI_IRCURL_CONTEXT_THIS 2
42 
43 typedef struct _KviIrcUrlParts
44 {
45  QString szHost;
46  kvi_u32_t iPort;
47  bool bIPv6;
48  bool bSsl;
49  QStringList chanList;
50  int iError;
52 
53 namespace KviIrcUrl
54 {
55 
57  {
62  };
63 
65  {
71 
73  };
74 
75  extern KVIRC_API bool parse(const char * url, KviCString & cmdBuffer, int contextSpec = KVI_IRCURL_CONTEXT_FIRSTFREE);
76 
77  extern KVIRC_API int run(const QString & url, int contextSpec = FirstFreeContext, KviConsoleWindow * pConsole = 0);
78 
79  extern KVIRC_API void split(QString url, KviIrcUrlParts & parts);
80  extern KVIRC_API void join(QString & url, KviIrcServer * server);
81  extern KVIRC_API void makeJoinCmd(const QStringList & chans, QString & szJoinCommand);
82 }
83 
84 #endif // _KVI_IRCURL_H_
Definition: KviIrcUrl.h:67
int iError
Definition: KviIrcUrl.h:50
Definition: KviIrcUrl.h:59
KVIRC_API int run(const QString &url, int contextSpec=FirstFreeContext, KviConsoleWindow *pConsole=0)
Definition: KviIrcUrl.cpp:212
Definition: KviCString.h:105
Definition: KviConsoleWindow.h:75
The class which manages the irc servers.
Definition: KviIrcServer.h:51
#define KVIRC_API
Definition: kvi_settings.h:128
bool bIPv6
Definition: KviIrcUrl.h:47
KVIRC_API void split(QString url, KviIrcUrlParts &parts)
Definition: KviIrcUrl.cpp:104
Definition: KviIrcUrl.h:72
KviIrcUrlParserError
Definition: KviIrcUrl.h:56
KviIrcUrlContextSpec
Definition: KviIrcUrl.h:64
QString szHost
Definition: KviIrcUrl.h:45
#define KVI_IRCURL_CONTEXT_FIRSTFREE
Definition: KviIrcUrl.h:37
KVIRC_API void join(QString &url, KviIrcServer *server)
Definition: KviIrcUrl.cpp:147
struct _KviIrcUrlParts KviIrcUrlParts
Definition: KviIrcUrl.h:58
kvi_u32_t iPort
Definition: KviIrcUrl.h:46
Definition: KviIrcUrl.h:61
KVIRC_API void makeJoinCmd(const QStringList &chans, QString &szJoinCommand)
Definition: KviIrcUrl.cpp:170
Definition: KviIrcUrl.h:66
bool bSsl
Definition: KviIrcUrl.h:48
Definition: KviIrcUrl.h:68
Definition: KviIrcUrl.h:70
This file contains compile time settings.
Definition: KviIrcUrl.h:60
Definition: KviIrcUrl.h:43
KVIRC_API bool parse(const char *url, KviCString &cmdBuffer, int contextSpec=KVI_IRCURL_CONTEXT_FIRSTFREE)
Definition: KviIrcUrl.cpp:46
Definition: KviIrcUrl.h:69
QStringList chanList
Definition: KviIrcUrl.h:49