LibTgBotPP
 All Classes Namespaces Files Functions Variables Typedefs Macros
Message.h
Go to the documentation of this file.
1 #ifndef _TG_MESSAGE_H_
2 #define _TG_MESSAGE_H_
3 
4 #include <json/json.h>
5 
6 #include <string>
7 #include <vector>
8 
9 #include <Telegram/Audio.h>
10 #include <Telegram/Chat.h>
11 #include <Telegram/Contact.h>
12 #include <Telegram/Document.h>
13 #include <Telegram/Location.h>
14 #include <Telegram/MessageEntity.h>
15 #include <Telegram/PhotoSize.h>
16 #include <Telegram/Sticker.h>
17 #include <Telegram/User.h>
18 #include <Telegram/Venue.h>
19 #include <Telegram/Video.h>
20 #include <Telegram/Voice.h>
21 
22 namespace Telegram {
23 
27  class Message {
28  public:
29  // Constructors
30  Message(void);
31  Message(Json::Value);
32  Message(std::string);
33 
34  void setEntities(Json::Value);
35  std::vector<PhotoSize*> setPhotos(Json::Value);
36 
38  std::string getText();
40 
41  private:
42  Json::UInt64 message_id;
44  Json::Int64 date;
47  Json::Int64 forward_date;
49  std::string text;
53  std::vector<PhotoSize*> photo;
57  std::string caption;
63  std::string new_chat_title;
64  std::vector<PhotoSize*> new_chat_photo;
68  Json::Int64 migrate_to_chat_id;
69  Json::Int64 migrate_from_chat_id;
71 
72  // Methods
73  void init(void);
74  void init(Json::Value);
75  };
76 }
77 
78 #endif
User * forward_from
Definition: Message.h:46
User * left_chat_member
Definition: Message.h:62
Venue * venue
Definition: Message.h:60
Video * video
Definition: Message.h:55
Location * location
Definition: Message.h:59
Document * document
Definition: Message.h:52
Json::UInt64 message_id
Definition: Message.h:42
int group_chat_created
Definition: Message.h:66
Contact * contact
Definition: Message.h:58
Json::Int64 migrate_from_chat_id
Definition: Message.h:69
void setEntities(Json::Value)
Definition: Message.cc:99
User * new_chat_member
Definition: Message.h:61
Json::Int64 forward_date
Definition: Message.h:47
std::vector< PhotoSize * > new_chat_photo
Definition: Message.h:64
Message * reply_to_message
Definition: Message.h:48
void init(void)
Definition: Message.cc:31
Telegram::Chat * getChat()
Definition: Message.cc:122
Message * pinned_message
Definition: Message.h:70
std::vector< PhotoSize * > photo
Definition: Message.h:53
Telegram::TMessageEntities entities
Definition: Message.h:50
std::string text
Definition: Message.h:49
std::string caption
Definition: Message.h:57
Sticker * sticker
Definition: Message.h:54
Json::Int64 migrate_to_chat_id
Definition: Message.h:68
Voice * voice
Definition: Message.h:56
Telegram::TMessageEntities getEntities()
Definition: Message.cc:132
int delete_chat_photo
Definition: Message.h:65
std::vector< PhotoSize * > setPhotos(Json::Value)
Definition: Message.cc:108
std::vector< Telegram::MessageEntity * > TMessageEntities
Definition: MessageEntity.h:23
std::string getText()
Definition: Message.cc:127
Audio * audio
Definition: Message.h:51
std::string new_chat_title
Definition: Message.h:63
int supergroup_chat_created
Definition: Message.h:67
Json::Int64 date
Definition: Message.h:44