diff options
author | Oleg Morozenkov <reo7sp@users.noreply.github.com> | 2017-01-15 02:01:01 +0300 |
---|---|---|
committer | Oleg Morozenkov <reo7sp@users.noreply.github.com> | 2017-01-15 02:01:01 +0300 |
commit | bbf030e1d315d6ba108a75a5ce0113485a2319ba (patch) | |
tree | 7668acf3314a06c6cf485fabb2146220b36ded61 | |
parent | f986328344e1e5a1c7fad3a529f27bb85aed0c83 (diff) |
Editor config
22 files changed, 286 insertions, 280 deletions
diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8c1f22e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,6 @@ +root = true + +[*] +end_of_line = lf +charset = utf-8 +indent_style = tab diff --git a/include/tgbot/types/Chat.h b/include/tgbot/types/Chat.h index 1491fd3..698b95f 100644 --- a/include/tgbot/types/Chat.h +++ b/include/tgbot/types/Chat.h @@ -35,51 +35,51 @@ namespace TgBot { class Chat { public: - typedef std::shared_ptr<Chat> Ptr; + typedef std::shared_ptr<Chat> Ptr; - /** - * Enum of possible types of a chat. - */ - enum class Type { - Private, Group, Supergroup, Channel - }; + /** + * Enum of possible types of a chat. + */ + enum class Type { + Private, Group, Supergroup, Channel + }; - /** - * Unique identifier for this chat, not exceeding 1e13 by absolute value - */ + /** + * Unique identifier for this chat, not exceeding 1e13 by absolute value + */ int64_t id; - /** - * Type of chat: can be either "private", "group", "supergroup, or "channel". - */ - Type type; + /** + * Type of chat: can be either "private", "group", "supergroup, or "channel". + */ + Type type; - /** - * Optional. Title for channels and group chat - */ - std::string title; + /** + * Optional. Title for channels and group chat + */ + std::string title; - /** - * Optional. Username for - * private chats and channels - */ - std::string username; + /** + * Optional. Username for + * private chats and channels + */ + std::string username; - /** - * Optional. First name of the - * other party in private chat - */ - std::string firstName; + /** + * Optional. First name of the + * other party in private chat + */ + std::string firstName; - /** - * Optional. Last name of the - * other party in private chat - */ - std::string lastName; + /** + * Optional. Last name of the + * other party in private chat + */ + std::string lastName; /** * Optional. True if a group - * has ‘All Members Are Admins’ enabled. + * has �All Members Are Admins� enabled. */ bool allMembersAreAdministrators; }; diff --git a/include/tgbot/types/File.h b/include/tgbot/types/File.h index a370dd6..f7c9593 100644 --- a/include/tgbot/types/File.h +++ b/include/tgbot/types/File.h @@ -21,22 +21,22 @@ namespace TgBot { class File { public: - typedef std::shared_ptr<File> Ptr; + typedef std::shared_ptr<File> Ptr; - /** - * Unique identifier for this file - */ + /** + * Unique identifier for this file + */ std::string fileId; - /** - * Optional. File size, if known - */ + /** + * Optional. File size, if known + */ int32_t fileSize; - /** - * Optional. File path. + /** + * Optional. File path. * Use https://api.telegram.org/file/bot<token>/<file_path> to get the file. - */ + */ std::string filePath; }; diff --git a/include/tgbot/types/InlineQuery.h b/include/tgbot/types/InlineQuery.h index f2c22c3..7841f8e 100644 --- a/include/tgbot/types/InlineQuery.h +++ b/include/tgbot/types/InlineQuery.h @@ -19,32 +19,32 @@ namespace TgBot { */ class InlineQuery { public: - typedef std::shared_ptr<InlineQuery> Ptr; + typedef std::shared_ptr<InlineQuery> Ptr; - /** - * Unique query identifier. - */ - std::string id; + /** + * Unique query identifier. + */ + std::string id; - /** - * Sender. - */ - User::Ptr from; + /** + * Sender. + */ + User::Ptr from; /** * Optional. Sender location, only for bots that request user location */ Location::Ptr location; - /** - * Text of the query. - */ - std::string query; + /** + * Text of the query. + */ + std::string query; - /** - * Offset of the results to be returned. - */ - std::string offset; + /** + * Offset of the results to be returned. + */ + std::string offset; }; } diff --git a/include/tgbot/types/InlineQueryResult.h b/include/tgbot/types/InlineQueryResult.h index d06bffd..dc54b57 100644 --- a/include/tgbot/types/InlineQueryResult.h +++ b/include/tgbot/types/InlineQueryResult.h @@ -19,30 +19,30 @@ namespace TgBot { */ class InlineQueryResult { public: - typedef std::shared_ptr<InlineQueryResult> Ptr; + typedef std::shared_ptr<InlineQueryResult> Ptr; - InlineQueryResult() { - - } + InlineQueryResult() { - virtual ~InlineQueryResult() { } + } - /** - * Type of the result. - */ - std::string type; + virtual ~InlineQueryResult() { } - /** - * Unique identifier for this result. (1-64 bytes) - */ - std::string id; + /** + * Type of the result. + */ + std::string type; + + /** + * Unique identifier for this result. (1-64 bytes) + */ + std::string id; - /** - * Requred, optional or missing. See description of derived classes. Title of the result. - */ - std::string title; + /** + * Requred, optional or missing. See description of derived classes. Title of the result. + */ + std::string title; - /** + /** * Optional or missing. See description of derived classes. Caption of the file to be sent, 0-200 characters */ std::string caption; diff --git a/include/tgbot/types/InlineQueryResultArticle.h b/include/tgbot/types/InlineQueryResultArticle.h index 924963c..18d2cc8 100644 --- a/include/tgbot/types/InlineQueryResultArticle.h +++ b/include/tgbot/types/InlineQueryResultArticle.h @@ -18,46 +18,46 @@ namespace TgBot { */ class InlineQueryResultArticle : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; - typedef std::shared_ptr<InlineQueryResultArticle> Ptr; + typedef std::shared_ptr<InlineQueryResultArticle> Ptr; - InlineQueryResultArticle() { - this->type = TYPE; - this->hideUrl = false; - this->thumbHeight = 0; - this->thumbWidth = 0; - } + InlineQueryResultArticle() { + this->type = TYPE; + this->hideUrl = false; + this->thumbHeight = 0; + this->thumbWidth = 0; + } - /** - * Optional. URL of the result. - */ - std::string url; + /** + * Optional. URL of the result. + */ + std::string url; - /** - * Optional. Pass True if you don't want the URL to be shown in the message. - */ - bool hideUrl; + /** + * Optional. Pass True if you don't want the URL to be shown in the message. + */ + bool hideUrl; - /** - * Optional. Short description of the result. - */ - std::string description; + /** + * Optional. Short description of the result. + */ + std::string description; /** * Optional. Url of the thumbnail for the result */ std::string thumbUrl; - /** - * Optional. Thumbnail width. - */ - int32_t thumbWidth; + /** + * Optional. Thumbnail width. + */ + int32_t thumbWidth; - /** - * Optinal. Thumbnail height - */ - int32_t thumbHeight; + /** + * Optinal. Thumbnail height + */ + int32_t thumbHeight; }; } diff --git a/include/tgbot/types/InlineQueryResultAudio.h b/include/tgbot/types/InlineQueryResultAudio.h index 7c02e4e..5c3a76b 100644 --- a/include/tgbot/types/InlineQueryResultAudio.h +++ b/include/tgbot/types/InlineQueryResultAudio.h @@ -18,19 +18,19 @@ namespace TgBot { */ class InlineQueryResultAudio : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; - typedef std::shared_ptr<InlineQueryResultAudio> Ptr; + typedef std::shared_ptr<InlineQueryResultAudio> Ptr; - InlineQueryResultAudio() { - this->type = TYPE; + InlineQueryResultAudio() { + this->type = TYPE; this->audioDuration = 0; - } + } - /** - * A valid URL for the audio file - */ - std::string audioUrl; + /** + * A valid URL for the audio file + */ + std::string audioUrl; /** * Optional. Performer diff --git a/include/tgbot/types/InlineQueryResultCachedAudio.h b/include/tgbot/types/InlineQueryResultCachedAudio.h index db1db2f..bc0f382 100644 --- a/include/tgbot/types/InlineQueryResultCachedAudio.h +++ b/include/tgbot/types/InlineQueryResultCachedAudio.h @@ -18,18 +18,18 @@ namespace TgBot { */ class InlineQueryResultCachedAudio : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; typedef std::shared_ptr<InlineQueryResultCachedAudio> Ptr; InlineQueryResultCachedAudio() { - this->type = TYPE; - } + this->type = TYPE; + } - /** - * A valid file identifier for the audio file - */ - std::string audioFileId; + /** + * A valid file identifier for the audio file + */ + std::string audioFileId; }; } diff --git a/include/tgbot/types/InlineQueryResultCachedDocument.h b/include/tgbot/types/InlineQueryResultCachedDocument.h index 60ad19d..796b967 100644 --- a/include/tgbot/types/InlineQueryResultCachedDocument.h +++ b/include/tgbot/types/InlineQueryResultCachedDocument.h @@ -18,18 +18,18 @@ namespace TgBot { */ class InlineQueryResultCachedDocument : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; typedef std::shared_ptr<InlineQueryResultCachedDocument> Ptr; InlineQueryResultCachedDocument() { - this->type = TYPE; - } + this->type = TYPE; + } - /** - * A valid file identifier for the file - */ - std::string documentFileId; + /** + * A valid file identifier for the file + */ + std::string documentFileId; /** * Optional. Short description of the result diff --git a/include/tgbot/types/InlineQueryResultCachedGif.h b/include/tgbot/types/InlineQueryResultCachedGif.h index e360d4d..c2599ed 100644 --- a/include/tgbot/types/InlineQueryResultCachedGif.h +++ b/include/tgbot/types/InlineQueryResultCachedGif.h @@ -18,18 +18,18 @@ namespace TgBot { */ class InlineQueryResultCachedGif : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; typedef std::shared_ptr<InlineQueryResultCachedGif> Ptr; InlineQueryResultCachedGif() { - this->type = TYPE; - } + this->type = TYPE; + } - /** - * A valid file identifier for the GIF file - */ - std::string gifFileId; + /** + * A valid file identifier for the GIF file + */ + std::string gifFileId; }; } diff --git a/include/tgbot/types/InlineQueryResultCachedMpeg4Gif.h b/include/tgbot/types/InlineQueryResultCachedMpeg4Gif.h index 55c7f92..b6d25e1 100644 --- a/include/tgbot/types/InlineQueryResultCachedMpeg4Gif.h +++ b/include/tgbot/types/InlineQueryResultCachedMpeg4Gif.h @@ -18,18 +18,18 @@ namespace TgBot { */ class InlineQueryResultCachedMpeg4Gif : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; typedef std::shared_ptr<InlineQueryResultCachedMpeg4Gif> Ptr; InlineQueryResultCachedMpeg4Gif() { - this->type = TYPE; - } + this->type = TYPE; + } - /** - * A valid file identifier for the MP4 file - */ - std::string mpeg4FileId; + /** + * A valid file identifier for the MP4 file + */ + std::string mpeg4FileId; }; } diff --git a/include/tgbot/types/InlineQueryResultCachedPhoto.h b/include/tgbot/types/InlineQueryResultCachedPhoto.h index ac21224..0d85dab 100644 --- a/include/tgbot/types/InlineQueryResultCachedPhoto.h +++ b/include/tgbot/types/InlineQueryResultCachedPhoto.h @@ -18,18 +18,18 @@ namespace TgBot { */ class InlineQueryResultCachedPhoto : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; typedef std::shared_ptr<InlineQueryResultCachedPhoto> Ptr; InlineQueryResultCachedPhoto() { - this->type = TYPE; - } + this->type = TYPE; + } - /** - * A valid file identifier of the photo - */ - std::string photoFileId; + /** + * A valid file identifier of the photo + */ + std::string photoFileId; /** * Optional. Short description of the result diff --git a/include/tgbot/types/InlineQueryResultCachedSticker.h b/include/tgbot/types/InlineQueryResultCachedSticker.h index 597479c..84ebdac 100644 --- a/include/tgbot/types/InlineQueryResultCachedSticker.h +++ b/include/tgbot/types/InlineQueryResultCachedSticker.h @@ -18,18 +18,18 @@ namespace TgBot { */ class InlineQueryResultCachedSticker : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; typedef std::shared_ptr<InlineQueryResultCachedSticker> Ptr; InlineQueryResultCachedSticker() { - this->type = TYPE; - } + this->type = TYPE; + } - /** - * A valid file identifier of the sticker - */ - std::string stickerFileId; + /** + * A valid file identifier of the sticker + */ + std::string stickerFileId; }; } diff --git a/include/tgbot/types/InlineQueryResultCachedVideo.h b/include/tgbot/types/InlineQueryResultCachedVideo.h index 48010bf..d4304d6 100644 --- a/include/tgbot/types/InlineQueryResultCachedVideo.h +++ b/include/tgbot/types/InlineQueryResultCachedVideo.h @@ -18,18 +18,18 @@ namespace TgBot { */ class InlineQueryResultCachedVideo : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; typedef std::shared_ptr<InlineQueryResultCachedVideo> Ptr; InlineQueryResultCachedVideo() { - this->type = TYPE; - } + this->type = TYPE; + } - /** - * A valid file identifier of the video - */ - std::string videoFileId; + /** + * A valid file identifier of the video + */ + std::string videoFileId; /** * Optional. Short description of the result diff --git a/include/tgbot/types/InlineQueryResultCachedVoice.h b/include/tgbot/types/InlineQueryResultCachedVoice.h index 1e70ff5..a0d1a9e 100644 --- a/include/tgbot/types/InlineQueryResultCachedVoice.h +++ b/include/tgbot/types/InlineQueryResultCachedVoice.h @@ -18,18 +18,18 @@ namespace TgBot { */ class InlineQueryResultCachedVoice : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; typedef std::shared_ptr<InlineQueryResultCachedVoice> Ptr; InlineQueryResultCachedVoice() { - this->type = TYPE; - } + this->type = TYPE; + } - /** - * A valid file identifier of the voice message - */ - std::string voiceFileId; + /** + * A valid file identifier of the voice message + */ + std::string voiceFileId; }; } diff --git a/include/tgbot/types/InlineQueryResultContact.h b/include/tgbot/types/InlineQueryResultContact.h index 80d04d5..ac9dca7 100644 --- a/include/tgbot/types/InlineQueryResultContact.h +++ b/include/tgbot/types/InlineQueryResultContact.h @@ -18,20 +18,20 @@ namespace TgBot { */ class InlineQueryResultContact : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; - typedef std::shared_ptr<InlineQueryResultContact> Ptr; + typedef std::shared_ptr<InlineQueryResultContact> Ptr; - InlineQueryResultContact() { - this->type = TYPE; + InlineQueryResultContact() { + this->type = TYPE; this->thumbHeight = 0; this->thumbWidth = 0; - } + } - /** - * Contact's phone number - */ - std::string phoneNumber; + /** + * Contact's phone number + */ + std::string phoneNumber; /** * Contact's first name diff --git a/include/tgbot/types/InlineQueryResultDocument.h b/include/tgbot/types/InlineQueryResultDocument.h index 70e0d33..3b5e9ad 100644 --- a/include/tgbot/types/InlineQueryResultDocument.h +++ b/include/tgbot/types/InlineQueryResultDocument.h @@ -18,23 +18,23 @@ namespace TgBot { */ class InlineQueryResultDocument : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; - typedef std::shared_ptr<InlineQueryResultDocument> Ptr; + typedef std::shared_ptr<InlineQueryResultDocument> Ptr; - InlineQueryResultDocument() { - this->type = TYPE; + InlineQueryResultDocument() { + this->type = TYPE; this->thumbHeight = 0; this->thumbWidth = 0; - } + } - /** - * A valid URL for the file - */ - std::string documentUrl; + /** + * A valid URL for the file + */ + std::string documentUrl; /** - * Mime type of the content of the file, either “application/pdf” or “application/zip” + * Mime type of the content of the file, either �application/pdf� or �application/zip� */ std::string mimeType; diff --git a/include/tgbot/types/InlineQueryResultGame.h b/include/tgbot/types/InlineQueryResultGame.h index d06d1bd..da419bd 100644 --- a/include/tgbot/types/InlineQueryResultGame.h +++ b/include/tgbot/types/InlineQueryResultGame.h @@ -18,18 +18,18 @@ namespace TgBot { */ class InlineQueryResultGame : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; - typedef std::shared_ptr<InlineQueryResultGame> Ptr; + typedef std::shared_ptr<InlineQueryResultGame> Ptr; - InlineQueryResultGame() { - this->type = TYPE; - } + InlineQueryResultGame() { + this->type = TYPE; + } - /** - * Short name of the game - */ - std::string gameShortName; + /** + * Short name of the game + */ + std::string gameShortName; }; } diff --git a/include/tgbot/types/InlineQueryResultGif.h b/include/tgbot/types/InlineQueryResultGif.h index 0dc67e8..6159886 100644 --- a/include/tgbot/types/InlineQueryResultGif.h +++ b/include/tgbot/types/InlineQueryResultGif.h @@ -18,35 +18,35 @@ namespace TgBot { */ class InlineQueryResultGif : public InlineQueryResult { public: - static const std::string TYPE; - - typedef std::shared_ptr<InlineQueryResultGif> Ptr; - - InlineQueryResultGif() { - this->type = TYPE; - this->gifWidth = 0; - this->gifHeight = 0; - } - - /** - * A valid URL for the GIF file. - */ - std::string gifUrl; - - /** - * Optional. Width of the GIF. - */ - int32_t gifWidth; - - /** - * Optional. Height of the GIF. - */ - int32_t gifHeight; - - /** - * URL of the static thumbnail for the result (jpeg or gif) - */ - std::string thumbUrl; + static const std::string TYPE; + + typedef std::shared_ptr<InlineQueryResultGif> Ptr; + + InlineQueryResultGif() { + this->type = TYPE; + this->gifWidth = 0; + this->gifHeight = 0; + } + + /** + * A valid URL for the GIF file. + */ + std::string gifUrl; + + /** + * Optional. Width of the GIF. + */ + int32_t gifWidth; + + /** + * Optional. Height of the GIF. + */ + int32_t gifHeight; + + /** + * URL of the static thumbnail for the result (jpeg or gif) + */ + std::string thumbUrl; }; } diff --git a/include/tgbot/types/InlineQueryResultLocation.h b/include/tgbot/types/InlineQueryResultLocation.h index e5cf6ab..446615e 100644 --- a/include/tgbot/types/InlineQueryResultLocation.h +++ b/include/tgbot/types/InlineQueryResultLocation.h @@ -18,15 +18,15 @@ namespace TgBot { */ class InlineQueryResultLocation : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; - typedef std::shared_ptr<InlineQueryResultLocation> Ptr; + typedef std::shared_ptr<InlineQueryResultLocation> Ptr; - InlineQueryResultLocation() { + InlineQueryResultLocation() { this->type = TYPE; - this->thumbHeight = 0; - this->thumbWidth = 0; - } + this->thumbHeight = 0; + this->thumbWidth = 0; + } /** * Location latitude in degrees @@ -43,15 +43,15 @@ public: */ std::string thumbUrl; - /** - * Optional. Thumbnail width. - */ - int32_t thumbWidth; + /** + * Optional. Thumbnail width. + */ + int32_t thumbWidth; - /** - * Optinal. Thumbnail height - */ - int32_t thumbHeight; + /** + * Optinal. Thumbnail height + */ + int32_t thumbHeight; }; } diff --git a/include/tgbot/types/InlineQueryResultPhoto.h b/include/tgbot/types/InlineQueryResultPhoto.h index b689d35..c655d9b 100644 --- a/include/tgbot/types/InlineQueryResultPhoto.h +++ b/include/tgbot/types/InlineQueryResultPhoto.h @@ -18,40 +18,40 @@ namespace TgBot { */ class InlineQueryResultPhoto : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; - typedef std::shared_ptr<InlineQueryResultPhoto> Ptr; + typedef std::shared_ptr<InlineQueryResultPhoto> Ptr; - InlineQueryResultPhoto() { - this->type = TYPE; - this->photoWidth = 0; - this->photoHeight = 0; - } + InlineQueryResultPhoto() { + this->type = TYPE; + this->photoWidth = 0; + this->photoHeight = 0; + } - /** - * A valid URL of the photo. - */ - std::string photoUrl; + /** + * A valid URL of the photo. + */ + std::string photoUrl; /** * URL of the thumbnail for the photo */ std::string thumbUrl; - /** - * Optional. Width of the photo. - */ - int32_t photoWidth; + /** + * Optional. Width of the photo. + */ + int32_t photoWidth; - /** - * Optional. Height of the photo. - */ - int32_t photoHeight; + /** + * Optional. Height of the photo. + */ + int32_t photoHeight; - /** - * Optional. Short description of the result. - */ - std::string description; + /** + * Optional. Short description of the result. + */ + std::string description; }; } diff --git a/include/tgbot/types/InlineQueryResultVenue.h b/include/tgbot/types/InlineQueryResultVenue.h index c2e47c5..6d19b65 100644 --- a/include/tgbot/types/InlineQueryResultVenue.h +++ b/include/tgbot/types/InlineQueryResultVenue.h @@ -18,15 +18,15 @@ namespace TgBot { */ class InlineQueryResultVenue : public InlineQueryResult { public: - static const std::string TYPE; + static const std::string TYPE; - typedef std::shared_ptr<InlineQueryResultVenue> Ptr; + typedef std::shared_ptr<InlineQueryResultVenue> Ptr; - InlineQueryResultVenue() { + InlineQueryResultVenue() { this->type = TYPE; - this->thumbHeight = 0; - this->thumbWidth = 0; - } + this->thumbHeight = 0; + this->thumbWidth = 0; + } /** * Latitude of the venue location in degrees @@ -53,15 +53,15 @@ public: */ std::string thumbUrl; - /** - * Optional. Thumbnail width. - */ - int32_t thumbWidth; + /** + * Optional. Thumbnail width. + */ + int32_t thumbWidth; - /** - * Optinal. Thumbnail height - */ - int32_t thumbHeight; + /** + * Optinal. Thumbnail height + */ + int32_t thumbHeight; }; } |