diff options
Diffstat (limited to 'src/types')
-rw-r--r-- | src/types/ChatBoostSource.cpp | 11 | ||||
-rw-r--r-- | src/types/InputFile.cpp | 6 | ||||
-rw-r--r-- | src/types/MessageOrigin.cpp | 13 | ||||
-rw-r--r-- | src/types/ReactionType.cpp | 9 |
4 files changed, 35 insertions, 4 deletions
diff --git a/src/types/ChatBoostSource.cpp b/src/types/ChatBoostSource.cpp new file mode 100644 index 0000000..84417b6 --- /dev/null +++ b/src/types/ChatBoostSource.cpp @@ -0,0 +1,11 @@ +#include "tgbot/types/ChatBoostSourcePremium.h" +#include "tgbot/types/ChatBoostSourceGiftCode.h" +#include "tgbot/types/ChatBoostSourceGiveaway.h" + +#include <string> + +using namespace TgBot; + +const std::string ChatBoostSourcePremium::SOURCE = "premium"; +const std::string ChatBoostSourceGiftCode::SOURCE = "gift_code"; +const std::string ChatBoostSourceGiveaway::SOURCE = "giveaway"; diff --git a/src/types/InputFile.cpp b/src/types/InputFile.cpp index c4d804d..2deb082 100644 --- a/src/types/InputFile.cpp +++ b/src/types/InputFile.cpp @@ -5,12 +5,10 @@ #include <memory> #include <string> -using namespace std; - namespace TgBot { -InputFile::Ptr InputFile::fromFile(const string& filePath, const string& mimeType) { - auto result(make_shared<InputFile>()); +InputFile::Ptr InputFile::fromFile(const std::string& filePath, const std::string& mimeType) { + auto result(std::make_shared<InputFile>()); result->data = FileTools::read(filePath); result->mimeType = mimeType; result->fileName = std::filesystem::path(filePath).filename().string(); diff --git a/src/types/MessageOrigin.cpp b/src/types/MessageOrigin.cpp new file mode 100644 index 0000000..c2471d9 --- /dev/null +++ b/src/types/MessageOrigin.cpp @@ -0,0 +1,13 @@ +#include "tgbot/types/MessageOriginUser.h" +#include "tgbot/types/MessageOriginHiddenUser.h" +#include "tgbot/types/MessageOriginChat.h" +#include "tgbot/types/MessageOriginChannel.h" + +#include <string> + +using namespace TgBot; + +const std::string MessageOriginUser::TYPE = "user"; +const std::string MessageOriginHiddenUser::TYPE = "hidden_user"; +const std::string MessageOriginChat::TYPE = "chat"; +const std::string MessageOriginChannel::TYPE = "channel"; diff --git a/src/types/ReactionType.cpp b/src/types/ReactionType.cpp new file mode 100644 index 0000000..3dd984b --- /dev/null +++ b/src/types/ReactionType.cpp @@ -0,0 +1,9 @@ +#include "tgbot/types/ReactionTypeEmoji.h" +#include "tgbot/types/ReactionTypeCustomEmoji.h" + +#include <string> + +using namespace TgBot; + +const std::string ReactionTypeEmoji::TYPE = "emoji"; +const std::string ReactionTypeCustomEmoji::TYPE = "custom_emoji"; |