Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
wikisite.cpp
1 //This program is free software: you can redistribute it and/or modify
2 //it under the terms of the GNU General Public License as published by
3 //the Free Software Foundation, either version 3 of the License, or
4 //(at your option) any later version.
5 
6 //This program is distributed in the hope that it will be useful,
7 //but WITHOUT ANY WARRANTY; without even the implied warranty of
8 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 //GNU General Public License for more details.
10 
11 #include "wikisite.hpp"
12 using namespace Huggle;
13 
14 WikiSite::WikiSite(const WikiSite &w)
15 {
16  this->LongPath = w.LongPath;
17  this->IRCChannel = w.IRCChannel;
18  this->Name = w.Name;
19  this->OAuthURL = w.OAuthURL;
20  this->ScriptPath = w.ScriptPath;
21  this->SupportHttps = w.SupportHttps;
22  this->SupportOAuth = w.SupportOAuth;
23  this->URL = w.URL;
24  this->WhiteList = w.WhiteList;
25 }
26 
27 WikiSite::WikiSite(WikiSite *w)
28 {
29  this->LongPath = w->LongPath;
30  this->IRCChannel = w->IRCChannel;
31  this->Name = w->Name;
32  this->OAuthURL = w->OAuthURL;
33  this->WhiteList = w->WhiteList;
34  this->URL = w->URL;
35  this->SupportOAuth = w->SupportOAuth;
36  this->SupportHttps = w->SupportHttps;
37  this->ScriptPath = w->ScriptPath;
38 }
39 
40 WikiSite::WikiSite(QString name, QString url)
41 {
42  this->LongPath = "wiki/";
43  this->Name = name;
44  this->URL = url;
45  this->ScriptPath = "w/";
46  this->OAuthURL = url + "w/index.php?title=Special:MWOAuth";
47  this->SupportHttps = true;
48  this->SupportOAuth = true;
49  this->IRCChannel = "#test.wikipedia";
50  this->WhiteList = "test.wikipedia";
51 }
52 
53 WikiSite::WikiSite(QString name, QString url, QString path, QString script, bool https, bool oauth, QString channel, QString wl)
54 {
55  this->IRCChannel = channel;
56  this->LongPath = path;
57  this->Name = name;
58  this->SupportHttps = https;
59  this->OAuthURL = url + "w/index.php?title=Special:MWOAuth";
60  this->ScriptPath = script;
61  this->URL = url;
62  this->SupportOAuth = oauth;
63  this->WhiteList = wl;
64 }
QString WhiteList
Definition: wikisite.hpp:36
QString Name
Name of wiki, used by huggle only.
Definition: wikisite.hpp:23
QString LongPath
long article path (wiki/ for example on english wp)
Definition: wikisite.hpp:27
QString IRCChannel
IRC channel of this site, if it doesn't have a channel leave it empty.
Definition: wikisite.hpp:33
bool SupportHttps
Whether the site supports the ssl.
Definition: wikisite.hpp:38
QString ScriptPath
short path
Definition: wikisite.hpp:29
QString OAuthURL
URL of oauth handler for this site.
Definition: wikisite.hpp:31
QString URL
URL of wiki, no http prefix must be present.
Definition: wikisite.hpp:25