tgbot-cpp
Message.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Oleg Morozenkov
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in all
12  * copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20  * SOFTWARE.
21  */
22 
23 #ifndef TGBOT_CPP_MESSAGE_H
24 #define TGBOT_CPP_MESSAGE_H
25 
26 #include <string>
27 #include <vector>
28 #include <memory>
29 
30 #include "tgbot/types/Chat.h"
31 #include "tgbot/types/User.h"
32 #include "tgbot/types/Message.h"
33 #include "tgbot/types/Audio.h"
34 #include "tgbot/types/Document.h"
35 #include "tgbot/types/Sticker.h"
36 #include "tgbot/types/Video.h"
37 #include "tgbot/types/Contact.h"
38 #include "tgbot/types/Location.h"
39 #include "tgbot/types/PhotoSize.h"
41 #include "tgbot/types/Venue.h"
42 #include "tgbot/types/Voice.h"
43 
44 namespace TgBot {
45 
50 class Message {
51 public:
52  typedef std::shared_ptr<Message> Ptr;
53 
55  deleteChatPhoto = false;
56  groupChatCreated = false;
57  supergroupChatCreated = false;
58  channelChatCreated = false;
59  migrateToChatId = 0;
61  }
62 
66  int32_t messageId;
67 
72 
76  int32_t date;
77 
82 
87 
92 
97 
101  int32_t forwardDate;
102 
107 
111  int32_t editDate;
112 
116  std::string text;
117 
121  std::vector<MessageEntity::Ptr> entities;
122 
127 
132 
136  std::vector<PhotoSize::Ptr> photo;
137 
142 
147 
152 
156  std::string caption;
157 
162 
167 
172 
177 
182 
186  std::string newChatTitle;
187 
191  std::vector<PhotoSize::Ptr> newChatPhoto;
192 
197 
202 
207 
212 
217 
222 
227 
228 };
229 
230 }
231 
232 #endif //TGBOT_CPP_MESSAGE_H
bool channelChatCreated
Definition: Message.h:211
int64_t migrateToChatId
Definition: Message.h:216
std::shared_ptr< Sticker > Ptr
Definition: Sticker.h:40
bool supergroupChatCreated
Definition: Message.h:206
std::shared_ptr< Audio > Ptr
Definition: Audio.h:38
User::Ptr forwardFrom
Definition: Message.h:86
std::vector< MessageEntity::Ptr > entities
Definition: Message.h:121
std::string caption
Definition: Message.h:156
User::Ptr leftChatMember
Definition: Message.h:181
std::string text
Definition: Message.h:116
Definition: Api.h:44
Video::Ptr video
Definition: Message.h:146
Message::Ptr pinnedMessage
Definition: Message.h:226
Chat::Ptr chat
Definition: Message.h:81
bool groupChatCreated
Definition: Message.h:201
std::vector< PhotoSize::Ptr > newChatPhoto
Definition: Message.h:191
std::shared_ptr< Message > Ptr
Definition: Message.h:52
std::vector< PhotoSize::Ptr > photo
Definition: Message.h:136
std::shared_ptr< Location > Ptr
Definition: Location.h:37
Sticker::Ptr sticker
Definition: Message.h:141
int64_t migrateFromChatId
Definition: Message.h:221
Document::Ptr document
Definition: Message.h:131
int32_t editDate
Definition: Message.h:111
Chat::Ptr forwardFromChat
Definition: Message.h:91
Venue::Ptr venue
Definition: Message.h:171
int32_t forwardFromMessageId
Definition: Message.h:96
std::string newChatTitle
Definition: Message.h:186
Contact::Ptr contact
Definition: Message.h:161
Audio::Ptr audio
Definition: Message.h:126
std::shared_ptr< Document > Ptr
Definition: Document.h:40
std::shared_ptr< Chat > Ptr
Definition: Chat.h:38
int32_t forwardDate
Definition: Message.h:101
int32_t messageId
Definition: Message.h:66
Message::Ptr replyToMessage
Definition: Message.h:106
std::shared_ptr< Voice > Ptr
Definition: Voice.h:19
User::Ptr from
Definition: Message.h:71
bool deleteChatPhoto
Definition: Message.h:196
Location::Ptr location
Definition: Message.h:166
std::shared_ptr< Video > Ptr
Definition: Video.h:40
std::shared_ptr< Contact > Ptr
Definition: Contact.h:38
std::shared_ptr< Venue > Ptr
Definition: Venue.h:21
int32_t date
Definition: Message.h:76
User::Ptr newChatMember
Definition: Message.h:176
Voice::Ptr voice
Definition: Message.h:151
std::shared_ptr< User > Ptr
Definition: User.h:38