diff options
author | ymuv <yuramuv@gmail.com> | 2017-01-23 01:29:33 +0200 |
---|---|---|
committer | ymuv <yuramuv@gmail.com> | 2017-01-23 01:29:33 +0200 |
commit | cfd0b398c3a300173339533909732b37503c34ed (patch) | |
tree | fc0ebbd358698f139958785edd68f0d2f3b4b5b8 | |
parent | 605af0c461c26d19611ae7e456b6baddf91c6bc1 (diff) |
Fix working with shared_ptr
-rw-r--r-- | include/tgbot/Api.h | 52 | ||||
-rw-r--r-- | src/Api.cpp | 40 |
2 files changed, 46 insertions, 46 deletions
diff --git a/include/tgbot/Api.h b/include/tgbot/Api.h index ae8bbdb..b2f6911 100644 --- a/include/tgbot/Api.h +++ b/include/tgbot/Api.h @@ -75,7 +75,7 @@ public: * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ - Message::Ptr sendMessage(int64_t chatId, const std::string& text, bool disableWebPagePreview = false, int32_t replyToMessageId = 0, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), const std::string& parseMode = "", bool disableNotification = false) const; + Message::Ptr sendMessage(int64_t chatId, const std::string& text, bool disableWebPagePreview = false, int32_t replyToMessageId = 0, const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), const std::string& parseMode = "", bool disableNotification = false) const; /** * Use this method to forward messages of any kind. @@ -97,8 +97,8 @@ public: * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ - Message::Ptr sendPhoto(int64_t chatId, const InputFile::Ptr& photo, const std::string& caption = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + Message::Ptr sendPhoto(int64_t chatId, const InputFile::Ptr photo, const std::string& caption = "", int32_t replyToMessageId = 0, + const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send photos. @@ -111,7 +111,7 @@ public: * @return On success, the sent message is returned. */ Message::Ptr sendPhoto(int64_t chatId, const std::string& photoId, const std::string& caption = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Document). @@ -126,9 +126,9 @@ public: * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ - Message::Ptr sendAudio(int64_t chatId, const InputFile::Ptr& audio, const std::string &caption = "", int32_t duration = 0, + Message::Ptr sendAudio(int64_t chatId, const InputFile::Ptr audio, const std::string &caption = "", int32_t duration = 0, const std::string& performer = "", const std::string& title = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Document). @@ -145,7 +145,7 @@ public: */ Message::Ptr sendAudio(int64_t chatId, const std::string& audioId, const std::string &caption = "", int32_t duration = 0, const std::string& performer = "", const std::string& title = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send general files. @@ -157,8 +157,8 @@ public: * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ - Message::Ptr sendDocument(int64_t chatId, const InputFile::Ptr& document, const std::string &caption = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + Message::Ptr sendDocument(int64_t chatId, const InputFile::Ptr document, const std::string &caption = "", int32_t replyToMessageId = 0, + const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send general files. @@ -171,7 +171,7 @@ public: * @return On success, the sent message is returned. */ Message::Ptr sendDocument(int64_t chatId, const std::string& documentId, const std::string &caption = "", int32_t replyToMessageId = 0, - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send .webp stickers. @@ -182,8 +182,8 @@ public: * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ - Message::Ptr sendSticker(int64_t chatId, const InputFile::Ptr& sticker, int32_t replyToMessageId = 0, - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + Message::Ptr sendSticker(int64_t chatId, const InputFile::Ptr sticker, int32_t replyToMessageId = 0, + const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send .webp stickers. @@ -195,7 +195,7 @@ public: * @return On success, the sent message is returned. */ Message::Ptr sendSticker(int64_t chatId, const std::string& stickerId, int32_t replyToMessageId = 0, - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). @@ -210,8 +210,8 @@ public: * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ - Message::Ptr sendVideo(int64_t chatId, const InputFile::Ptr& video, int32_t duration = 0, int32_t width = 0, int32_t height = 0, const std::string &caption = "", - int32_t replyToMessageId = 0, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + Message::Ptr sendVideo(int64_t chatId, const InputFile::Ptr video, int32_t duration = 0, int32_t width = 0, int32_t height = 0, const std::string &caption = "", + int32_t replyToMessageId = 0, const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document). @@ -227,7 +227,7 @@ public: * @return On success, the sent message is returned. */ Message::Ptr sendVideo(int64_t chatId, const std::string& videoId, int32_t duration = 0, int32_t width = 0, int32_t height = 0, const std::string &caption = "", - int32_t replyToMessageId = 0, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + int32_t replyToMessageId = 0, const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. @@ -240,8 +240,8 @@ public: * @param disableNotification Optional. Sends the message silenty. * @return On success, the sent message is returned. */ - Message::Ptr sendVoice(int64_t chatId, const InputFile::Ptr& voice, const std::string &caption = "", int duration = 0, int32_t replyToMessageId = 0, - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + Message::Ptr sendVoice(int64_t chatId, const InputFile::Ptr voice, const std::string &caption = "", int duration = 0, int32_t replyToMessageId = 0, + const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. @@ -255,7 +255,7 @@ public: * @return On success, the sent message is returned. */ Message::Ptr sendVoice(int64_t chatId, const std::string& voiceId, const std::string &caption = "", int duration = 0, int32_t replyToMessageId = 0, - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send point on the map. @@ -268,7 +268,7 @@ public: * @return On success, the sent message is returned. */ Message::Ptr sendLocation(int64_t chatId, float latitude, float longitude, int32_t replyToMessageId = 0, - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; + const GenericReply::Ptr replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const; /** * Use this method to send information about a venue. On success, the sent Message is returned. @@ -284,7 +284,7 @@ public: * @return On success, the sent message is returned. */ Message::Ptr sendVenue(int64_t chatId, float latitude, float longitude, std::string title, std::string address, std::string foursquareId = "", - bool disableNotification = false, int32_t replyToMessageId = 0, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr()) const; + bool disableNotification = false, int32_t replyToMessageId = 0, const GenericReply::Ptr replyMarkup = GenericReply::Ptr()) const; /** * Use this method to send phone contacts. On success, the sent Message is returned. @@ -298,7 +298,7 @@ public: * @return On success, the sent message is returned. */ Message::Ptr sendContact(int64_t chatId, std::string phoneNumber, std::string firstName, std::string lastName = "", bool disableNotification = false, - int32_t replyToMessageId = 0, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr()) const; + int32_t replyToMessageId = 0, const GenericReply::Ptr replyMarkup = GenericReply::Ptr()) const; /** * Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). @@ -384,7 +384,7 @@ public: * @return Message object on success, otherwise nullptr */ Message::Ptr editMessageText(const std::string& text, int64_t chatId=0, int32_t messageId=0, const std::string& inlineMessageId="", - const std::string& parseMode = "", bool disableWebPagePreview = false, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr()) const; + const std::string& parseMode = "", bool disableWebPagePreview = false, const GenericReply::Ptr replyMarkup = GenericReply::Ptr()) const; /** * Use this method to edit captions of messages sent by the bot or via the bot (for inline bots). @@ -396,7 +396,7 @@ public: * @return Message object on success, otherwise nullptr */ Message::Ptr editMessageCaption(int64_t chatId = 0, int32_t messageId = 0, const std::string& caption = "", - const std::string& inlineMessageId = "", const GenericReply::Ptr& replyMarkup = GenericReply::Ptr()) const; + const std::string& inlineMessageId = "", const GenericReply::Ptr replyMarkup = GenericReply::Ptr()) const; /** * Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots). @@ -407,7 +407,7 @@ public: * @return Message object on success, otherwise nullptr */ Message::Ptr editMessageReplyMarkup(int64_t chatId = 0, int32_t messageId = 0, const std::string& inlineMessageId = "", - const GenericReply::Ptr& replyMarkup = GenericReply::Ptr()) const; + const GenericReply::Ptr replyMarkup = GenericReply::Ptr()) const; /** * Use this method to receive incoming updates using long polling. @@ -429,7 +429,7 @@ public: * Ports currently supported for Webhooks: 443, 80, 88, 8443. * @param url Optional. HTTPS url to send updates to. Use an empty string to remove webhook integration. */ - void setWebhook(const std::string& url = "", const InputFile::Ptr& certificate = nullptr, int32_t maxConnection = 40, const StringArrayPtr &allowedUpdates = nullptr) const; + void setWebhook(const std::string& url = "", const InputFile::Ptr certificate = nullptr, int32_t maxConnection = 40, const StringArrayPtr &allowedUpdates = nullptr) const; /** * Use this method to remove webhook integration if you decide to switch back to getUpdates. diff --git a/src/Api.cpp b/src/Api.cpp index 55d61c2..984deb5 100644 --- a/src/Api.cpp +++ b/src/Api.cpp @@ -38,7 +38,7 @@ User::Ptr Api::getMe() const { return TgTypeParser::getInstance().parseJsonAndGetUser(sendRequest("getMe")); } -Message::Ptr Api::sendMessage(int64_t chatId, const string& text, bool disableWebPagePreview, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, const string& parseMode, bool disableNotification) const { +Message::Ptr Api::sendMessage(int64_t chatId, const string& text, bool disableWebPagePreview, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, const string& parseMode, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("text", text)); @@ -71,7 +71,7 @@ Message::Ptr Api::forwardMessage(int64_t chatId, int64_t fromChatId, int32_t mes return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("forwardMessage", args)); } -Message::Ptr Api::sendPhoto(int64_t chatId, const InputFile::Ptr& photo, const string& caption, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendPhoto(int64_t chatId, const InputFile::Ptr photo, const string& caption, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("photo", photo->data, true, photo->mimeType, photo->fileName)); @@ -90,7 +90,7 @@ Message::Ptr Api::sendPhoto(int64_t chatId, const InputFile::Ptr& photo, const s return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendPhoto", args)); } -Message::Ptr Api::sendPhoto(int64_t chatId, const string& photoId, const string& caption, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendPhoto(int64_t chatId, const string& photoId, const string& caption, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("photo", photoId)); @@ -109,7 +109,7 @@ Message::Ptr Api::sendPhoto(int64_t chatId, const string& photoId, const string& return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendPhoto", args)); } -Message::Ptr Api::sendAudio(int64_t chatId, const InputFile::Ptr& audio, const std::string &caption, int32_t duration, const string& performer, const string& title, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendAudio(int64_t chatId, const InputFile::Ptr audio, const std::string &caption, int32_t duration, const string& performer, const string& title, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("audio", audio->data, true, audio->mimeType, audio->fileName)); @@ -137,7 +137,7 @@ Message::Ptr Api::sendAudio(int64_t chatId, const InputFile::Ptr& audio, const s return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendAudio", args)); } -Message::Ptr Api::sendAudio(int64_t chatId, const string& audioId, const std::string &caption, int32_t duration, const string& performer, const string& title, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendAudio(int64_t chatId, const string& audioId, const std::string &caption, int32_t duration, const string& performer, const string& title, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("audio", audioId)); @@ -165,7 +165,7 @@ Message::Ptr Api::sendAudio(int64_t chatId, const string& audioId, const std::st return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendAudio", args)); } -Message::Ptr Api::sendDocument(int64_t chatId, const InputFile::Ptr& document, const std::string &caption, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendDocument(int64_t chatId, const InputFile::Ptr document, const std::string &caption, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("document", document->data, true, document->mimeType, document->fileName)); @@ -184,7 +184,7 @@ Message::Ptr Api::sendDocument(int64_t chatId, const InputFile::Ptr& document, c return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendDocument", args)); } -Message::Ptr Api::sendDocument(int64_t chatId, const string& document, const std::string &caption, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendDocument(int64_t chatId, const string& document, const std::string &caption, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("document", document)); @@ -203,7 +203,7 @@ Message::Ptr Api::sendDocument(int64_t chatId, const string& document, const std return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendDocument", args)); } -Message::Ptr Api::sendSticker(int64_t chatId, const InputFile::Ptr& sticker, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendSticker(int64_t chatId, const InputFile::Ptr sticker, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("sticker", sticker->data, true, sticker->mimeType, sticker->fileName)); @@ -219,7 +219,7 @@ Message::Ptr Api::sendSticker(int64_t chatId, const InputFile::Ptr& sticker, int return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendSticker", args)); } -Message::Ptr Api::sendSticker(int64_t chatId, const string& stickerId, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendSticker(int64_t chatId, const string& stickerId, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("sticker", stickerId)); @@ -235,7 +235,7 @@ Message::Ptr Api::sendSticker(int64_t chatId, const string& stickerId, int32_t r return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendSticker", args)); } -Message::Ptr Api::sendVideo(int64_t chatId, const InputFile::Ptr& video, int32_t duration, int32_t width, int32_t height, const std::string &caption, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendVideo(int64_t chatId, const InputFile::Ptr video, int32_t duration, int32_t width, int32_t height, const std::string &caption, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("video", video->data, true, video->mimeType, video->fileName)); @@ -263,7 +263,7 @@ Message::Ptr Api::sendVideo(int64_t chatId, const InputFile::Ptr& video, int32_t return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendVideo", args)); } -Message::Ptr Api::sendVideo(int64_t chatId, const string& videoId, int32_t duration, int32_t width, int32_t height, const std::string &caption, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendVideo(int64_t chatId, const string& videoId, int32_t duration, int32_t width, int32_t height, const std::string &caption, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("video", videoId)); @@ -291,7 +291,7 @@ Message::Ptr Api::sendVideo(int64_t chatId, const string& videoId, int32_t durat return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendVideo", args)); } -Message::Ptr Api::sendVoice(int64_t chatId, const InputFile::Ptr& voice, const std::string &caption, int duration, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendVoice(int64_t chatId, const InputFile::Ptr voice, const std::string &caption, int duration, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("voice", voice->data, true, voice->mimeType, voice->fileName)); @@ -313,7 +313,7 @@ Message::Ptr Api::sendVoice(int64_t chatId, const InputFile::Ptr& voice, const s return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendVideo", args)); } -Message::Ptr Api::sendVoice(int64_t chatId, const std::string& voiceId, const std::string &caption, int duration, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendVoice(int64_t chatId, const std::string& voiceId, const std::string &caption, int duration, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("voice", voiceId)); @@ -335,7 +335,7 @@ Message::Ptr Api::sendVoice(int64_t chatId, const std::string& voiceId, const st return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendVoice", args)); } -Message::Ptr Api::sendLocation(int64_t chatId, float latitude, float longitude, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const { +Message::Ptr Api::sendLocation(int64_t chatId, float latitude, float longitude, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup, bool disableNotification) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("latitude", latitude)); @@ -352,7 +352,7 @@ Message::Ptr Api::sendLocation(int64_t chatId, float latitude, float longitude, return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendLocation", args)); } -Message::Ptr Api::sendVenue(int64_t chatId, float latitude, float longitude, std::string title, std::string address, std::string foursquareId, bool disableNotification, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup) const { +Message::Ptr Api::sendVenue(int64_t chatId, float latitude, float longitude, std::string title, std::string address, std::string foursquareId, bool disableNotification, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("latitude", latitude)); @@ -374,7 +374,7 @@ Message::Ptr Api::sendVenue(int64_t chatId, float latitude, float longitude, std return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendVenue", args)); } -Message::Ptr Api::sendContact(int64_t chatId, std::string phoneNumber, std::string firstName, std::string lastName, bool disableNotification, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup) const { +Message::Ptr Api::sendContact(int64_t chatId, std::string phoneNumber, std::string firstName, std::string lastName, bool disableNotification, int32_t replyToMessageId, const GenericReply::Ptr replyMarkup) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("chat_id", chatId)); args.push_back(HttpReqArg("phone_number", phoneNumber)); @@ -465,7 +465,7 @@ bool Api::answerCallbackQuery(const std::string & callbackQueryId, const std::st } Message::Ptr Api::editMessageText(const std::string& text, int64_t chatId, int32_t messageId, const std::string& inlineMessageId, - const std::string& parseMode, bool disableWebPagePreview, const GenericReply::Ptr& replyMarkup) const { + const std::string& parseMode, bool disableWebPagePreview, const GenericReply::Ptr replyMarkup) const { vector<HttpReqArg> args; args.push_back(HttpReqArg("text", text)); @@ -496,7 +496,7 @@ Message::Ptr Api::editMessageText(const std::string& text, int64_t chatId, int32 } Message::Ptr Api::editMessageCaption(int64_t chatId, int32_t messageId, const std::string& caption, - const std::string& inlineMessageId, const GenericReply::Ptr& replyMarkup) const { + const std::string& inlineMessageId, const GenericReply::Ptr replyMarkup) const { vector<HttpReqArg> args; if (chatId) { @@ -524,7 +524,7 @@ Message::Ptr Api::editMessageCaption(int64_t chatId, int32_t messageId, const st } Message::Ptr Api::editMessageReplyMarkup(int64_t chatId, int32_t messageId, const std::string& inlineMessageId, - const GenericReply::Ptr& replyMarkup) const { + const GenericReply::Ptr replyMarkup) const { vector<HttpReqArg> args; if (chatId) { @@ -575,7 +575,7 @@ vector<Update::Ptr> Api::getUpdates(int32_t offset, int32_t limit, int32_t timeo return TgTypeParser::getInstance().parseJsonAndGetArray<Update>(&TgTypeParser::parseJsonAndGetUpdate, sendRequest("getUpdates", args)); } -void Api::setWebhook(const string& url, const InputFile::Ptr& certificate, int32_t maxConnection, const StringArrayPtr &allowedUpdates) const { +void Api::setWebhook(const string& url, const InputFile::Ptr certificate, int32_t maxConnection, const StringArrayPtr &allowedUpdates) const { vector<HttpReqArg> args; if (!url.empty()) args.push_back(HttpReqArg("url", url)); |