From c8d40dccabaaa406faed6c0797a92bac811c9d0f Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Tue, 5 Jun 2018 19:07:27 +0300 Subject: Update docs --- docs/_message_8h_source.html | 107 ++++++++++++++++++++++--------------------- 1 file changed, 55 insertions(+), 52 deletions(-) (limited to 'docs/_message_8h_source.html') diff --git a/docs/_message_8h_source.html b/docs/_message_8h_source.html index 75cac4f..5ca2df2 100644 --- a/docs/_message_8h_source.html +++ b/docs/_message_8h_source.html @@ -83,70 +83,73 @@ $(document).ready(function(){initNavTree('_message_8h_source.html','');});
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  std::string forwardSignature;
102 
106  int32_t forwardDate;
107 
112 
116  int32_t editDate;
117 
121  std::string authorSignature;
122 
126  std::string text;
127 
131  std::vector<MessageEntity::Ptr> entities;
132 
136  std::vector<MessageEntity::Ptr> captionEntities;
137 
142 
147 
151  std::vector<PhotoSize::Ptr> photo;
152 
157 
162 
167 
171  std::string caption;
172 
177 
182 
187 
192 
196  std::vector<User::Ptr> newChatMembers;
197 
202 
206  std::string newChatTitle;
207 
211  std::vector<PhotoSize::Ptr> newChatPhoto;
212 
217 
222 
227 
232 
237 
242 
247 
251  std::string connectedWebsite;
252 };
253 
254 }
255 
256 #endif //TGBOT_CPP_MESSAGE_H
bool channelChatCreated
Definition: Message.h:231
-
int64_t migrateToChatId
Definition: Message.h:236
+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/Game.h"
40 #include "tgbot/types/PhotoSize.h"
42 #include "tgbot/types/Venue.h"
43 #include "tgbot/types/Voice.h"
44 
45 namespace TgBot {
46 
52 class Message {
53 public:
54  typedef std::shared_ptr<Message> Ptr;
55 
57  deleteChatPhoto = false;
58  groupChatCreated = false;
59  supergroupChatCreated = false;
60  channelChatCreated = false;
61  migrateToChatId = 0;
63  }
64 
68  int32_t messageId;
69 
74 
78  int32_t date;
79 
84 
89 
94 
99 
103  std::string forwardSignature;
104 
108  int32_t forwardDate;
109 
114 
118  int32_t editDate;
119 
123  std::string authorSignature;
124 
128  std::string text;
129 
133  std::vector<MessageEntity::Ptr> entities;
134 
138  std::vector<MessageEntity::Ptr> captionEntities;
139 
144 
149 
154 
158  std::vector<PhotoSize::Ptr> photo;
159 
164 
169 
174 
178  std::string caption;
179 
184 
189 
194 
199 
203  std::vector<User::Ptr> newChatMembers;
204 
209 
213  std::string newChatTitle;
214 
218  std::vector<PhotoSize::Ptr> newChatPhoto;
219 
224 
229 
234 
239 
244 
249 
254 
258  std::string connectedWebsite;
259 };
260 
261 }
262 
263 #endif //TGBOT_CPP_MESSAGE_H
bool channelChatCreated
Optional. Service message: the channel has been created.
Definition: Message.h:238
+
int64_t migrateToChatId
Optional. The group has been migrated to a supergroup with the specified identifier, not exceeding 1e13 by absolute value.
Definition: Message.h:243
-
std::shared_ptr< Sticker > Ptr
Definition: Sticker.h:41
-
bool supergroupChatCreated
Definition: Message.h:226
+
std::shared_ptr< Sticker > Ptr
Definition: Sticker.h:42
+
bool supergroupChatCreated
Optional. Service message: the supergroup has been created.
Definition: Message.h:233
-
std::shared_ptr< Audio > Ptr
Definition: Audio.h:38
-
User::Ptr forwardFrom
Definition: Message.h:86
-
std::vector< MessageEntity::Ptr > entities
Definition: Message.h:131
-
std::string caption
Definition: Message.h:171
+
std::shared_ptr< Audio > Ptr
Definition: Audio.h:39
+
User::Ptr forwardFrom
Optional. For forwarded messages, sender of the original message.
Definition: Message.h:88
+
std::vector< MessageEntity::Ptr > entities
Optional. For text messages, special entities like usernames, URLs, bot commands, etc...
Definition: Message.h:133
+
std::string caption
Optional. Caption for the document, photo or video, 0-200 characters.
Definition: Message.h:178
-
User::Ptr leftChatMember
Definition: Message.h:201
-
std::string text
Definition: Message.h:126
-
Definition: Api.h:46
-
Video::Ptr video
Definition: Message.h:161
-
Message::Ptr pinnedMessage
Definition: Message.h:246
-
Chat::Ptr chat
Definition: Message.h:81
+
User::Ptr leftChatMember
Optional. A member was removed from the group, information about them (this member may be bot itself)...
Definition: Message.h:208
+
std::string text
Optional. For text messages, the actual UTF-8 text of the message.
Definition: Message.h:128
+
Definition: Api.h:47
+
std::shared_ptr< Game > Ptr
Definition: Game.h:46
+
Video::Ptr video
Optional. Message is a video, information about the video.
Definition: Message.h:168
+
Message::Ptr pinnedMessage
Optional. Specified message was pinned. Note that the Message object in this field will not contain f...
Definition: Message.h:253
+
Chat::Ptr chat
Conversation the message belongs to.
Definition: Message.h:83
-
bool groupChatCreated
Definition: Message.h:221
-
std::vector< PhotoSize::Ptr > newChatPhoto
Definition: Message.h:211
-
std::shared_ptr< Message > Ptr
Definition: Message.h:52
-
std::vector< PhotoSize::Ptr > photo
Definition: Message.h:151
-
std::string forwardSignature
Definition: Message.h:101
-
std::shared_ptr< Location > Ptr
Definition: Location.h:37
-
std::vector< User::Ptr > newChatMembers
Definition: Message.h:196
-
Sticker::Ptr sticker
Definition: Message.h:156
-
int64_t migrateFromChatId
Definition: Message.h:241
-
Document::Ptr document
Definition: Message.h:146
-
int32_t editDate
Definition: Message.h:116
-
Chat::Ptr forwardFromChat
Definition: Message.h:91
-
Venue::Ptr venue
Definition: Message.h:186
-
int32_t forwardFromMessageId
Definition: Message.h:96
+
bool groupChatCreated
Optional. Informs that the group has been created.
Definition: Message.h:228
+
Game::Ptr game
Optional. Message is a game, information about the game.
Definition: Message.h:153
+
std::vector< PhotoSize::Ptr > newChatPhoto
Optional. A group photo was change to this value.
Definition: Message.h:218
+
std::shared_ptr< Message > Ptr
Definition: Message.h:54
+
std::vector< PhotoSize::Ptr > photo
Optional. Message is a photo, available sizes of the photo.
Definition: Message.h:158
+
std::string forwardSignature
Optional. For messages forwarded from channels, signature of the post author if present.
Definition: Message.h:103
+
std::shared_ptr< Location > Ptr
Definition: Location.h:38
+
std::vector< User::Ptr > newChatMembers
Optional. New members that were added to the group or supergroup and information about them (the bot ...
Definition: Message.h:203
+
Sticker::Ptr sticker
Optional. Message is a sticker, information about the sticker.
Definition: Message.h:163
+
int64_t migrateFromChatId
Optional. The supergroup has been migrated from a group with the specified identifier, not exceeding 1e13 by absolute value.
Definition: Message.h:248
+
Document::Ptr document
Optional. Message is a general file, information about the file.
Definition: Message.h:148
+
int32_t editDate
Optional. Date the message was last edited in Unix time.
Definition: Message.h:118
+
Chat::Ptr forwardFromChat
Optional. For messages forwarded from a channel, information about the original channel.
Definition: Message.h:93
+
Venue::Ptr venue
Optional. Message is a venue, information about the venue.
Definition: Message.h:193
+
int32_t forwardFromMessageId
Optional. For forwarded channel posts, identifier of the original message in the channel.
Definition: Message.h:98
-
std::string newChatTitle
Definition: Message.h:206
-
Contact::Ptr contact
Definition: Message.h:176
-
std::vector< MessageEntity::Ptr > captionEntities
Definition: Message.h:136
-
Audio::Ptr audio
Definition: Message.h:141
-
std::shared_ptr< Document > Ptr
Definition: Document.h:40
+
std::string newChatTitle
Optional. A group title was changed to this value.
Definition: Message.h:213
+
Contact::Ptr contact
Optional. Message is a shared contact, information about the contact.
Definition: Message.h:183
+
std::vector< MessageEntity::Ptr > captionEntities
Optional. For messages with a caption, special entities like usernames, URLs, bot commands...
Definition: Message.h:138
+
Audio::Ptr audio
Optional. Message is an audio file, information about the file.
Definition: Message.h:143
+
std::shared_ptr< Document > Ptr
Definition: Document.h:41
std::shared_ptr< Chat > Ptr
Definition: Chat.h:41
-
int32_t forwardDate
Definition: Message.h:106
-
int32_t messageId
Definition: Message.h:66
-
Message::Ptr replyToMessage
Definition: Message.h:111
-
std::shared_ptr< Voice > Ptr
Definition: Voice.h:19
-
User::Ptr from
Definition: Message.h:71
-
bool deleteChatPhoto
Definition: Message.h:216
-
std::string connectedWebsite
Definition: Message.h:251
-
Location::Ptr location
Definition: Message.h:181
+
int32_t forwardDate
Optional. For forwarded messages, date the original message was sent in Unix time.
Definition: Message.h:108
+
int32_t messageId
Unique message identifier.
Definition: Message.h:68
+
Message::Ptr replyToMessage
Optional. For replies, the original message. Note that the Message object in this field will not cont...
Definition: Message.h:113
+
std::shared_ptr< Voice > Ptr
Definition: Voice.h:20
+
User::Ptr from
Optional. Sender, can be empty for messages sent to channels.
Definition: Message.h:73
+
bool deleteChatPhoto
Optional. Informs that the group photo was deleted.
Definition: Message.h:223
+
std::string connectedWebsite
Optional. The domain name of the website on which the user has logged in.
Definition: Message.h:258
+
Location::Ptr location
Optional. Message is a shared location, information about the location.
Definition: Message.h:188
-
std::shared_ptr< Video > Ptr
Definition: Video.h:40
-
std::shared_ptr< Contact > Ptr
Definition: Contact.h:38
- -
std::string authorSignature
Definition: Message.h:121
+
std::shared_ptr< Video > Ptr
Definition: Video.h:41
+
std::shared_ptr< Contact > Ptr
Definition: Contact.h:39
+ +
std::string authorSignature
Optional. Signature of the post author for messages in channels.
Definition: Message.h:123
-
std::shared_ptr< Venue > Ptr
Definition: Venue.h:21
+
std::shared_ptr< Venue > Ptr
Definition: Venue.h:22
-
int32_t date
Definition: Message.h:76
-
User::Ptr newChatMember
Definition: Message.h:191
- -
Voice::Ptr voice
Definition: Message.h:166
-
std::shared_ptr< User > Ptr
Definition: User.h:38
+
int32_t date
Date the message was sent in Unix time.
Definition: Message.h:78
+ +
User::Ptr newChatMember
Optional. A new member was added to the group, information about them (this member may be bot itself)...
Definition: Message.h:198
+
This object represents a message.
Definition: Message.h:52
+
Voice::Ptr voice
Optional. Message is a voice message, information about the file.
Definition: Message.h:173
+
std::shared_ptr< User > Ptr
Definition: User.h:39
@@ -154,7 +157,7 @@ $(document).ready(function(){initNavTree('_message_8h_source.html','');});