Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
hugglefeedproviderwiki.hpp
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 #ifndef HUGGLEFEEDPROVIDERWIKI_H
12 #define HUGGLEFEEDPROVIDERWIKI_H
13 
14 #include <QList>
15 #include <QStringList>
16 #include <QString>
17 #include <QtXml/QtXml>
18 #include <QDateTime>
19 #include "core.hpp"
20 #include "hugglefeed.hpp"
21 #include "exception.hpp"
22 #include "apiquery.hpp"
23 #include "configuration.hpp"
24 #include "wikiedit.hpp"
25 
26 namespace Huggle
27 {
28  class ApiQuery;
29 
30  //! This is a very simple provider of changes that basically refresh recent changes every 6 seconds
32  {
33  public:
36  bool Start();
37  bool IsWorking();
38  void Stop();
39  bool Restart() { this->Stop(); return this->Start(); }
40  bool ContainsEdit();
41  void Refresh();
43  private:
44  QDateTime LastRefresh;
45  QDateTime LatestTime;
46  void Process(QString data);
47  bool Refreshing;
48  QList<WikiEdit*> *Buffer;
49  ApiQuery *q;
50  void InsertEdit(WikiEdit *edit);
51  };
52 }
53 
54 #endif // HUGGLEFEEDPROVIDERWIKI_H
bool Start()
Start the feed engine.
void Stop()
Stop the feed engine.
Feed provider stub class every provider must be derived from this one.
Definition: hugglefeed.hpp:22
This is a very simple provider of changes that basically refresh recent changes every 6 seconds...
bool IsWorking()
Return true if this feed is operational or not.
bool ContainsEdit()
Check if feed is containing some edits in buffer.
bool Restart()
Restart the feed engine.
Wiki edit.
Definition: wikiedit.hpp:67
This class can be used to execute any kind of api query on any wiki.
Definition: apiquery.hpp:55
WikiEdit * RetrieveEdit()
Return a last edit from cache or NULL.