Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
message.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 MESSAGE_H
12 #define MESSAGE_H
13 
14 #include <QString>
15 #include <QtXml>
16 #include "core.hpp"
17 #include "history.hpp"
18 #include "apiquery.hpp"
19 #include "wikiuser.hpp"
20 
21 namespace Huggle
22 {
23  class Query;
24 
25  //! This is similar to query, just it's more simple, you can use it to deliver messages to users
26  class Message
27  {
28  public:
29  Message(WikiUser *target, QString Message, QString Summary);
30  ~Message();
31  //! Send a message to user
32  void Send();
33  //! Returns true in case that message was sent
34  bool Finished();
35  //! If this dependency is not a NULL then a message is sent after it is Processed (see Query::Processed())
37  //! Title
38  QString title;
39  //! Token that is needed in order to write to page
40  QString token;
41  //! If edit will be created in new section
42  bool Section;
43  //! User to deliver a message to
45  //! Text of message that will be appended to talk page
46  QString text;
47  QString summary;
48  private:
49  void Fail(QString reason);
50  void Finish();
51  ApiQuery *query;
52  bool Sending;
53  bool Done;
54  };
55 }
56 
57 #endif // MESSAGE_H
QString title
Title.
Definition: message.hpp:38
Message(WikiUser *target, QString Message, QString Summary)
Definition: message.cpp:15
WikiUser * user
User to deliver a message to.
Definition: message.hpp:44
QString token
Token that is needed in order to write to page.
Definition: message.hpp:40
void Fail(QString reason)
Definition: message.cpp:49
This is similar to query, just it&#39;s more simple, you can use it to deliver messages to users...
Definition: message.hpp:26
Query * Dependency
If this dependency is not a NULL then a message is sent after it is Processed (see Query::Processed()...
Definition: message.hpp:36
QString text
Text of message that will be appended to talk page.
Definition: message.hpp:46
bool Finished()
Returns true in case that message was sent.
Definition: message.cpp:59
void Send()
Send a message to user.
Definition: message.cpp:35
void Finish()
Definition: message.cpp:96
This class can be used to execute any kind of api query on any wiki.
Definition: apiquery.hpp:55
bool Section
If edit will be created in new section.
Definition: message.hpp:42
Query base class for all http queries executed by huggle.
Definition: query.hpp:64