diff options
Diffstat (limited to 'Sluift/ElementConvertors/IQConvertor.h')
-rw-r--r-- | Sluift/ElementConvertors/IQConvertor.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Sluift/ElementConvertors/IQConvertor.h b/Sluift/ElementConvertors/IQConvertor.h new file mode 100644 index 0000000..6ccaa46 --- /dev/null +++ b/Sluift/ElementConvertors/IQConvertor.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2014-2017 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ + +#pragma once + +#include <Swiften/Elements/IQ.h> + +#include <Sluift/ElementConvertors/StanzaConvertor.h> + +namespace Swift { + class LuaElementConvertors; + + class IQConvertor : public StanzaConvertor<IQ> { + public: + IQConvertor(LuaElementConvertors* convertors); + virtual ~IQConvertor() override; + + virtual std::shared_ptr<IQ> doConvertFromLua(lua_State*) override; + virtual void doConvertToLua(lua_State*, std::shared_ptr<IQ>) override; + + virtual boost::optional<Documentation> getDocumentation() const override; + + static std::string convertIQTypeToString(IQ::Type type); + static IQ::Type convertIQTypeFromString(const std::string& type); + + private: + LuaElementConvertors* convertors; + }; +} + |