diff options
author | Roger Planas <roger.planas@isode.com> | 2016-10-27 12:54:40 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-11-07 10:27:34 (GMT) |
commit | 41c771ec02682c2b344263d29f68eb6452c42dbe (patch) | |
tree | 34aa3b366e56f0e529454a8d7f9d53a136062383 /Sluift/ElementConvertors/CarbonsReceivedConvertor.h | |
parent | 7eab2eb9de931236b7bbc10265b963a9948492f0 (diff) | |
download | swift-41c771ec02682c2b344263d29f68eb6452c42dbe.zip swift-41c771ec02682c2b344263d29f68eb6452c42dbe.tar.bz2 |
Sluift: Added Carbons element convertors
Sluift was showing payloads coming from a carbon copied message as
a series of dom payloads, which was not really usable.
With these ElementConvertors, the payload is translated into a
much more sensible table
Also a minor update to both presence/message events, which now
will report the 'to' as well. Seemed handy to have.
Test-information:
Carbons sent/received messages are formated into a meaningful table
now.
Change-Id: I5b8943636e09e5377bde76d16970c01df29164d6
Diffstat (limited to 'Sluift/ElementConvertors/CarbonsReceivedConvertor.h')
-rw-r--r-- | Sluift/ElementConvertors/CarbonsReceivedConvertor.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Sluift/ElementConvertors/CarbonsReceivedConvertor.h b/Sluift/ElementConvertors/CarbonsReceivedConvertor.h new file mode 100644 index 0000000..f18f699 --- /dev/null +++ b/Sluift/ElementConvertors/CarbonsReceivedConvertor.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2016 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ + +#pragma once + +#include <Swiften/Base/Override.h> +#include <Swiften/Elements/CarbonsReceived.h> + +#include <Sluift/GenericLuaElementConvertor.h> + +namespace Swift { + class LuaElementConvertors; + + class CarbonsReceivedConvertor : public GenericLuaElementConvertor<CarbonsReceived> { + public: + CarbonsReceivedConvertor(LuaElementConvertors* convertors); + virtual ~CarbonsReceivedConvertor(); + + virtual std::shared_ptr<CarbonsReceived> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE; + virtual void doConvertToLua(lua_State*, std::shared_ptr<CarbonsReceived>) SWIFTEN_OVERRIDE; + virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE; + + private: + LuaElementConvertors* convertors; + }; +} + |