summaryrefslogtreecommitdiffstats
path: root/Sluift
diff options
context:
space:
mode:
Diffstat (limited to 'Sluift')
-rw-r--r--Sluift/Console.h8
-rw-r--r--Sluift/EditlineTerminal.h12
-rw-r--r--Sluift/ElementConvertors/BodyConvertor.h9
-rw-r--r--Sluift/ElementConvertors/CarbonsReceivedConvertor.h11
-rw-r--r--Sluift/ElementConvertors/CarbonsSentConvertor.h11
-rw-r--r--Sluift/ElementConvertors/CommandConvertor.h9
-rw-r--r--Sluift/ElementConvertors/DOMElementConvertor.cpp8
-rw-r--r--Sluift/ElementConvertors/DOMElementConvertor.h9
-rw-r--r--Sluift/ElementConvertors/DefaultElementConvertor.h10
-rw-r--r--Sluift/ElementConvertors/DelayConvertor.h9
-rw-r--r--Sluift/ElementConvertors/DiscoInfoConvertor.h9
-rw-r--r--Sluift/ElementConvertors/DiscoItemsConvertor.h9
-rw-r--r--Sluift/ElementConvertors/FormConvertor.cpp4
-rw-r--r--Sluift/ElementConvertors/FormConvertor.h9
-rw-r--r--Sluift/ElementConvertors/ForwardedConvertor.h12
-rw-r--r--Sluift/ElementConvertors/IQConvertor.h11
-rw-r--r--Sluift/ElementConvertors/IsodeIQDelegationConvertor.h11
-rw-r--r--Sluift/ElementConvertors/MAMFinConvertor.h11
-rw-r--r--Sluift/ElementConvertors/MAMQueryConvertor.h11
-rw-r--r--Sluift/ElementConvertors/MAMResultConvertor.h11
-rw-r--r--Sluift/ElementConvertors/MessageConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PresenceConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubAffiliationConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubAffiliationsConvertor.cpp2
-rw-r--r--Sluift/ElementConvertors/PubSubAffiliationsConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubConfigureConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubCreateConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubDefaultConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubEventAssociateConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubEventCollectionConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubEventConfigurationConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubEventConvertor.h9
-rw-r--r--Sluift/ElementConvertors/PubSubEventDeleteConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubEventDisassociateConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubEventItemConvertor.cpp2
-rw-r--r--Sluift/ElementConvertors/PubSubEventItemConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubEventItemsConvertor.cpp4
-rw-r--r--Sluift/ElementConvertors/PubSubEventItemsConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubEventPurgeConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubEventRedirectConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubEventRetractConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubItemConvertor.cpp2
-rw-r--r--Sluift/ElementConvertors/PubSubItemConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubItemsConvertor.cpp2
-rw-r--r--Sluift/ElementConvertors/PubSubItemsConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubOptionsConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.cpp2
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.cpp2
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubPublishConvertor.cpp2
-rw-r--r--Sluift/ElementConvertors/PubSubPublishConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubRetractConvertor.cpp2
-rw-r--r--Sluift/ElementConvertors/PubSubRetractConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubSubscribeConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubSubscriptionConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubSubscriptionsConvertor.cpp2
-rw-r--r--Sluift/ElementConvertors/PubSubSubscriptionsConvertor.h11
-rw-r--r--Sluift/ElementConvertors/PubSubUnsubscribeConvertor.h11
-rw-r--r--Sluift/ElementConvertors/RawXMLElementConvertor.h9
-rw-r--r--Sluift/ElementConvertors/ResultSetConvertor.h11
-rw-r--r--Sluift/ElementConvertors/SecurityLabelConvertor.cpp2
-rw-r--r--Sluift/ElementConvertors/SecurityLabelConvertor.h11
-rw-r--r--Sluift/ElementConvertors/SoftwareVersionConvertor.h9
-rw-r--r--Sluift/ElementConvertors/StanzaConvertor.h2
-rw-r--r--Sluift/ElementConvertors/StatusConvertor.h9
-rw-r--r--Sluift/ElementConvertors/StatusShowConvertor.h9
-rw-r--r--Sluift/ElementConvertors/SubjectConvertor.h9
-rw-r--r--Sluift/ElementConvertors/UserLocationConvertor.h11
-rw-r--r--Sluift/ElementConvertors/UserTuneConvertor.h11
-rw-r--r--Sluift/ElementConvertors/VCardConvertor.h9
-rw-r--r--Sluift/ElementConvertors/VCardUpdateConvertor.h9
-rw-r--r--Sluift/Examples/SendReference.lua70
-rw-r--r--Sluift/GenericLuaElementConvertor.h10
-rw-r--r--Sluift/Helpers.h3
-rw-r--r--Sluift/Lua/FunctionRegistration.h3
-rw-r--r--Sluift/Lua/FunctionRegistry.h4
-rw-r--r--Sluift/Lua/LuaUtils.h17
-rw-r--r--Sluift/LuaElementConvertor.h4
-rw-r--r--Sluift/LuaElementConvertors.h4
-rw-r--r--Sluift/StandardTerminal.h12
-rw-r--r--Sluift/client.cpp2
-rw-r--r--Sluift/core.lua5
92 files changed, 440 insertions, 437 deletions
diff --git a/Sluift/Console.h b/Sluift/Console.h
index 6ed6f58..0d5ceb0 100644
--- a/Sluift/Console.h
+++ b/Sluift/Console.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -10,8 +10,6 @@
#include <boost/optional/optional.hpp>
-#include <Swiften/Base/Override.h>
-
#include <Sluift/Completer.h>
struct lua_State;
@@ -22,7 +20,7 @@ namespace Swift {
class Console : public Completer {
public:
Console(lua_State* L, Terminal* terminal);
- virtual ~Console();
+ virtual ~Console() override;
void run();
@@ -34,7 +32,7 @@ namespace Swift {
bool readCommand();
int tryLoadCommand(const std::string& command);
- virtual std::vector<std::string> getCompletions(const std::string&, int start, int end) SWIFTEN_OVERRIDE;
+ virtual std::vector<std::string> getCompletions(const std::string&, int start, int end) override;
private:
lua_State* L;
diff --git a/Sluift/EditlineTerminal.h b/Sluift/EditlineTerminal.h
index ec4cf63..8f4624b 100644
--- a/Sluift/EditlineTerminal.h
+++ b/Sluift/EditlineTerminal.h
@@ -1,13 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
-
#include <Sluift/Terminal.h>
namespace Swift {
@@ -17,10 +15,10 @@ namespace Swift {
private:
EditlineTerminal();
- virtual ~EditlineTerminal();
+ virtual ~EditlineTerminal() override;
- virtual boost::optional<std::string> readLine(const std::string& prompt) SWIFTEN_OVERRIDE;
- virtual void printError(const std::string& message) SWIFTEN_OVERRIDE;
- virtual void addToHistory(const std::string& command) SWIFTEN_OVERRIDE;
+ virtual boost::optional<std::string> readLine(const std::string& prompt) override;
+ virtual void printError(const std::string& message) override;
+ virtual void addToHistory(const std::string& command) override;
};
}
diff --git a/Sluift/ElementConvertors/BodyConvertor.h b/Sluift/ElementConvertors/BodyConvertor.h
index 64ff4d0..574fca9 100644
--- a/Sluift/ElementConvertors/BodyConvertor.h
+++ b/Sluift/ElementConvertors/BodyConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/Body.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,9 +16,9 @@ namespace Swift {
class BodyConvertor : public GenericLuaElementConvertor<Body> {
public:
BodyConvertor();
- virtual ~BodyConvertor();
+ virtual ~BodyConvertor() override;
- virtual std::shared_ptr<Body> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<Body>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Body> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Body>) override;
};
}
diff --git a/Sluift/ElementConvertors/CarbonsReceivedConvertor.h b/Sluift/ElementConvertors/CarbonsReceivedConvertor.h
index f18f699..cc4e6dc 100644
--- a/Sluift/ElementConvertors/CarbonsReceivedConvertor.h
+++ b/Sluift/ElementConvertors/CarbonsReceivedConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2016 Isode Limited.
+ * Copyright (c) 2016-2017 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>
@@ -17,11 +16,11 @@ namespace Swift {
class CarbonsReceivedConvertor : public GenericLuaElementConvertor<CarbonsReceived> {
public:
CarbonsReceivedConvertor(LuaElementConvertors* convertors);
- virtual ~CarbonsReceivedConvertor();
+ virtual ~CarbonsReceivedConvertor() override;
- 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;
+ virtual std::shared_ptr<CarbonsReceived> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<CarbonsReceived>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/CarbonsSentConvertor.h b/Sluift/ElementConvertors/CarbonsSentConvertor.h
index a36a6a8..794e0ed 100644
--- a/Sluift/ElementConvertors/CarbonsSentConvertor.h
+++ b/Sluift/ElementConvertors/CarbonsSentConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2016 Isode Limited.
+ * Copyright (c) 2016-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/CarbonsSent.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class CarbonsSentConvertor : public GenericLuaElementConvertor<CarbonsSent> {
public:
CarbonsSentConvertor(LuaElementConvertors* convertors);
- virtual ~CarbonsSentConvertor();
+ virtual ~CarbonsSentConvertor() override;
- virtual std::shared_ptr<CarbonsSent> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<CarbonsSent>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<CarbonsSent> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<CarbonsSent>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/CommandConvertor.h b/Sluift/ElementConvertors/CommandConvertor.h
index 1b0d481..274eaa6 100644
--- a/Sluift/ElementConvertors/CommandConvertor.h
+++ b/Sluift/ElementConvertors/CommandConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/Command.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class CommandConvertor : public GenericLuaElementConvertor<Command> {
public:
CommandConvertor(LuaElementConvertors* convertors);
- virtual ~CommandConvertor();
+ virtual ~CommandConvertor() override;
- virtual std::shared_ptr<Command> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<Command>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Command> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Command>) override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/DOMElementConvertor.cpp b/Sluift/ElementConvertors/DOMElementConvertor.cpp
index b957686..56b45aa 100644
--- a/Sluift/ElementConvertors/DOMElementConvertor.cpp
+++ b/Sluift/ElementConvertors/DOMElementConvertor.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -34,7 +34,7 @@ namespace {
virtual void handleStartElement(
const std::string& element, const std::string& ns,
- const AttributeMap& attributes) SWIFTEN_OVERRIDE {
+ const AttributeMap& attributes) override {
lua_checkstack(L, 6);
lua_pushnumber(L, currentIndex);
lua_newtable(L);
@@ -70,7 +70,7 @@ namespace {
}
virtual void handleEndElement(
- const std::string&, const std::string&) SWIFTEN_OVERRIDE {
+ const std::string&, const std::string&) override {
lua_setfield(L, -2, "children");
lua_settable(L, -3);
currentIndex = indexStack.back();
@@ -78,7 +78,7 @@ namespace {
currentIndex++;
}
- virtual void handleCharacterData(const std::string& data) SWIFTEN_OVERRIDE {
+ virtual void handleCharacterData(const std::string& data) override {
lua_checkstack(L, 2);
lua_pushnumber(L, currentIndex);
lua_pushstring(L, data.c_str());
diff --git a/Sluift/ElementConvertors/DOMElementConvertor.h b/Sluift/ElementConvertors/DOMElementConvertor.h
index 7b1ba58..dd8d79b 100644
--- a/Sluift/ElementConvertors/DOMElementConvertor.h
+++ b/Sluift/ElementConvertors/DOMElementConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Parser/PlatformXMLParserFactory.h>
#include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h>
@@ -16,10 +15,10 @@ namespace Swift {
class DOMElementConvertor : public LuaElementConvertor {
public:
DOMElementConvertor();
- virtual ~DOMElementConvertor();
+ virtual ~DOMElementConvertor() override;
- virtual std::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) SWIFTEN_OVERRIDE;
- virtual boost::optional<std::string> convertToLua(lua_State*, std::shared_ptr<Element>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) override;
+ virtual boost::optional<std::string> convertToLua(lua_State*, std::shared_ptr<Element>) override;
private:
PlatformXMLParserFactory parsers;
diff --git a/Sluift/ElementConvertors/DefaultElementConvertor.h b/Sluift/ElementConvertors/DefaultElementConvertor.h
index 4aec300..dfef3e8 100644
--- a/Sluift/ElementConvertors/DefaultElementConvertor.h
+++ b/Sluift/ElementConvertors/DefaultElementConvertor.h
@@ -1,22 +1,20 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
-
#include <Sluift/LuaElementConvertor.h>
namespace Swift {
class DefaultElementConvertor : public LuaElementConvertor {
public:
DefaultElementConvertor();
- virtual ~DefaultElementConvertor();
+ virtual ~DefaultElementConvertor() override;
- virtual std::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) SWIFTEN_OVERRIDE;
- virtual boost::optional<std::string> convertToLua(lua_State*, std::shared_ptr<Element>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) override;
+ virtual boost::optional<std::string> convertToLua(lua_State*, std::shared_ptr<Element>) override;
};
}
diff --git a/Sluift/ElementConvertors/DelayConvertor.h b/Sluift/ElementConvertors/DelayConvertor.h
index b9f72f2..ad340da 100644
--- a/Sluift/ElementConvertors/DelayConvertor.h
+++ b/Sluift/ElementConvertors/DelayConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/Delay.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -15,9 +14,9 @@ namespace Swift {
class DelayConvertor : public GenericLuaElementConvertor<Delay> {
public:
DelayConvertor();
- virtual ~DelayConvertor();
+ virtual ~DelayConvertor() override;
- virtual std::shared_ptr<Delay> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<Delay>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Delay> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Delay>) override;
};
}
diff --git a/Sluift/ElementConvertors/DiscoInfoConvertor.h b/Sluift/ElementConvertors/DiscoInfoConvertor.h
index c1b2910..b0e0849 100644
--- a/Sluift/ElementConvertors/DiscoInfoConvertor.h
+++ b/Sluift/ElementConvertors/DiscoInfoConvertor.h
@@ -6,7 +6,6 @@
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/DiscoInfo.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class DiscoInfoConvertor : public GenericLuaElementConvertor<DiscoInfo> {
public:
DiscoInfoConvertor(LuaElementConvertors* convertors);
- virtual ~DiscoInfoConvertor();
+ virtual ~DiscoInfoConvertor() override;
- virtual std::shared_ptr<DiscoInfo> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<DiscoInfo>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<DiscoInfo> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<DiscoInfo>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/DiscoItemsConvertor.h b/Sluift/ElementConvertors/DiscoItemsConvertor.h
index a77b948..98dcb5c 100644
--- a/Sluift/ElementConvertors/DiscoItemsConvertor.h
+++ b/Sluift/ElementConvertors/DiscoItemsConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/DiscoItems.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -15,9 +14,9 @@ namespace Swift {
class DiscoItemsConvertor : public GenericLuaElementConvertor<DiscoItems> {
public:
DiscoItemsConvertor();
- virtual ~DiscoItemsConvertor();
+ virtual ~DiscoItemsConvertor() override;
- virtual std::shared_ptr<DiscoItems> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<DiscoItems>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<DiscoItems> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<DiscoItems>) override;
};
}
diff --git a/Sluift/ElementConvertors/FormConvertor.cpp b/Sluift/ElementConvertors/FormConvertor.cpp
index 90fd9fe..245e0f9 100644
--- a/Sluift/ElementConvertors/FormConvertor.cpp
+++ b/Sluift/ElementConvertors/FormConvertor.cpp
@@ -29,7 +29,7 @@ namespace {
lua_pushnil(L);
for (lua_pushnil(L); lua_next(L, index) != 0; ) {
lua_getfield(L, -1, "name");
- if (lua_equal(L, -1, 2)) {
+ if (lua_compare(L, -1, 2, LUA_OPEQ)) {
lua_pop(L, 1);
return 1;
}
@@ -44,7 +44,7 @@ namespace {
if (lua_type(L, -1) == LUA_TTABLE) {
for (lua_pushnil(L); lua_next(L, -2) != 0; ) {
lua_getfield(L, -1, "name");
- if (lua_equal(L, -1, 2)) {
+ if (lua_compare(L, -1, 2, LUA_OPEQ)) {
lua_pushvalue(L, 3);
lua_setfield(L, -3, "value");
foundField = true;
diff --git a/Sluift/ElementConvertors/FormConvertor.h b/Sluift/ElementConvertors/FormConvertor.h
index b32a940..8ca20cc 100644
--- a/Sluift/ElementConvertors/FormConvertor.h
+++ b/Sluift/ElementConvertors/FormConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/Form.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -15,9 +14,9 @@ namespace Swift {
class FormConvertor : public GenericLuaElementConvertor<Form> {
public:
FormConvertor();
- virtual ~FormConvertor();
+ virtual ~FormConvertor() override;
- virtual std::shared_ptr<Form> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<Form>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Form> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Form>) override;
};
}
diff --git a/Sluift/ElementConvertors/ForwardedConvertor.h b/Sluift/ElementConvertors/ForwardedConvertor.h
index a83b5f4..32d29e6 100644
--- a/Sluift/ElementConvertors/ForwardedConvertor.h
+++ b/Sluift/ElementConvertors/ForwardedConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/Forwarded.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,14 +16,13 @@ namespace Swift {
class ForwardedConvertor : public GenericLuaElementConvertor<Forwarded> {
public:
ForwardedConvertor(LuaElementConvertors* convertors);
- virtual ~ForwardedConvertor();
+ virtual ~ForwardedConvertor() override;
- virtual std::shared_ptr<Forwarded> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<Forwarded>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Forwarded> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Forwarded>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
- private:
LuaElementConvertors* convertors;
};
}
diff --git a/Sluift/ElementConvertors/IQConvertor.h b/Sluift/ElementConvertors/IQConvertor.h
index 859900a..6ccaa46 100644
--- a/Sluift/ElementConvertors/IQConvertor.h
+++ b/Sluift/ElementConvertors/IQConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/IQ.h>
#include <Sluift/ElementConvertors/StanzaConvertor.h>
@@ -17,12 +16,12 @@ namespace Swift {
class IQConvertor : public StanzaConvertor<IQ> {
public:
IQConvertor(LuaElementConvertors* convertors);
- virtual ~IQConvertor();
+ virtual ~IQConvertor() override;
- virtual std::shared_ptr<IQ> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<IQ>) SWIFTEN_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 SWIFTEN_OVERRIDE;
+ virtual boost::optional<Documentation> getDocumentation() const override;
static std::string convertIQTypeToString(IQ::Type type);
static IQ::Type convertIQTypeFromString(const std::string& type);
diff --git a/Sluift/ElementConvertors/IsodeIQDelegationConvertor.h b/Sluift/ElementConvertors/IsodeIQDelegationConvertor.h
index f8b8c4a..f573b13 100644
--- a/Sluift/ElementConvertors/IsodeIQDelegationConvertor.h
+++ b/Sluift/ElementConvertors/IsodeIQDelegationConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/IsodeIQDelegation.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class IsodeIQDelegationConvertor : public GenericLuaElementConvertor<IsodeIQDelegation> {
public:
IsodeIQDelegationConvertor(LuaElementConvertors* convertors);
- virtual ~IsodeIQDelegationConvertor();
+ virtual ~IsodeIQDelegationConvertor() override;
- virtual std::shared_ptr<IsodeIQDelegation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<IsodeIQDelegation>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<IsodeIQDelegation> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<IsodeIQDelegation>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/MAMFinConvertor.h b/Sluift/ElementConvertors/MAMFinConvertor.h
index 371076a..6e5d58c 100644
--- a/Sluift/ElementConvertors/MAMFinConvertor.h
+++ b/Sluift/ElementConvertors/MAMFinConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MAMFin.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class MAMFinConvertor : public GenericLuaElementConvertor<MAMFin> {
public:
MAMFinConvertor(LuaElementConvertors* convertors);
- virtual ~MAMFinConvertor();
+ virtual ~MAMFinConvertor() override;
- virtual std::shared_ptr<MAMFin> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<MAMFin>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<MAMFin> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<MAMFin>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/MAMQueryConvertor.h b/Sluift/ElementConvertors/MAMQueryConvertor.h
index 4ee119e..3e9d387 100644
--- a/Sluift/ElementConvertors/MAMQueryConvertor.h
+++ b/Sluift/ElementConvertors/MAMQueryConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MAMQuery.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class MAMQueryConvertor : public GenericLuaElementConvertor<MAMQuery> {
public:
MAMQueryConvertor(LuaElementConvertors* convertors);
- virtual ~MAMQueryConvertor();
+ virtual ~MAMQueryConvertor() override;
- virtual std::shared_ptr<MAMQuery> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<MAMQuery>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<MAMQuery> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<MAMQuery>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/MAMResultConvertor.h b/Sluift/ElementConvertors/MAMResultConvertor.h
index a1b2564..cd1d27d 100644
--- a/Sluift/ElementConvertors/MAMResultConvertor.h
+++ b/Sluift/ElementConvertors/MAMResultConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/MAMResult.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class MAMResultConvertor : public GenericLuaElementConvertor<MAMResult> {
public:
MAMResultConvertor(LuaElementConvertors* convertors);
- virtual ~MAMResultConvertor();
+ virtual ~MAMResultConvertor() override;
- virtual std::shared_ptr<MAMResult> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<MAMResult>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<MAMResult> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<MAMResult>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/MessageConvertor.h b/Sluift/ElementConvertors/MessageConvertor.h
index 2031552..723e1b1 100644
--- a/Sluift/ElementConvertors/MessageConvertor.h
+++ b/Sluift/ElementConvertors/MessageConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/Message.h>
#include <Sluift/ElementConvertors/StanzaConvertor.h>
@@ -17,12 +16,12 @@ namespace Swift {
class MessageConvertor : public StanzaConvertor<Message> {
public:
MessageConvertor(LuaElementConvertors* convertors);
- virtual ~MessageConvertor();
+ virtual ~MessageConvertor() override;
- virtual std::shared_ptr<Message> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<Message>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Message> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Message>) override;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual boost::optional<Documentation> getDocumentation() const override;
static std::string convertMessageTypeToString(Message::Type type);
static Message::Type convertMessageTypeFromString(const std::string& type);
diff --git a/Sluift/ElementConvertors/PresenceConvertor.h b/Sluift/ElementConvertors/PresenceConvertor.h
index 11ec547..b13398d 100644
--- a/Sluift/ElementConvertors/PresenceConvertor.h
+++ b/Sluift/ElementConvertors/PresenceConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/Presence.h>
#include <Sluift/ElementConvertors/StanzaConvertor.h>
@@ -17,12 +16,12 @@ namespace Swift {
class PresenceConvertor : public StanzaConvertor<Presence> {
public:
PresenceConvertor(LuaElementConvertors* convertors);
- virtual ~PresenceConvertor();
+ virtual ~PresenceConvertor() override;
- virtual std::shared_ptr<Presence> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<Presence>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Presence> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Presence>) override;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual boost::optional<Documentation> getDocumentation() const override;
static std::string convertPresenceTypeToString(Presence::Type type);
static Presence::Type convertPresenceTypeFromString(const std::string& type);
diff --git a/Sluift/ElementConvertors/PubSubAffiliationConvertor.h b/Sluift/ElementConvertors/PubSubAffiliationConvertor.h
index 456ef4e..1b5cd60 100644
--- a/Sluift/ElementConvertors/PubSubAffiliationConvertor.h
+++ b/Sluift/ElementConvertors/PubSubAffiliationConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubAffiliation.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubAffiliationConvertor : public GenericLuaElementConvertor<PubSubAffiliation> {
public:
PubSubAffiliationConvertor();
- virtual ~PubSubAffiliationConvertor();
+ virtual ~PubSubAffiliationConvertor() override;
- virtual std::shared_ptr<PubSubAffiliation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubAffiliation>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubAffiliation> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubAffiliation>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubAffiliationsConvertor.cpp b/Sluift/ElementConvertors/PubSubAffiliationsConvertor.cpp
index c6ba09e..8f8a660 100644
--- a/Sluift/ElementConvertors/PubSubAffiliationsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubAffiliationsConvertor.cpp
@@ -33,7 +33,7 @@ std::shared_ptr<PubSubAffiliations> PubSubAffiliationsConvertor::doConvertFromLu
lua_pop(L, 1);
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::shared_ptr<PubSubAffiliation> > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
diff --git a/Sluift/ElementConvertors/PubSubAffiliationsConvertor.h b/Sluift/ElementConvertors/PubSubAffiliationsConvertor.h
index 8ad38b2..eda218b 100644
--- a/Sluift/ElementConvertors/PubSubAffiliationsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubAffiliationsConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubAffiliations.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubAffiliationsConvertor : public GenericLuaElementConvertor<PubSubAffiliations> {
public:
PubSubAffiliationsConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubAffiliationsConvertor();
+ virtual ~PubSubAffiliationsConvertor() override;
- virtual std::shared_ptr<PubSubAffiliations> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubAffiliations>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubAffiliations> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubAffiliations>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubConfigureConvertor.h b/Sluift/ElementConvertors/PubSubConfigureConvertor.h
index e41bb68..f1848c2 100644
--- a/Sluift/ElementConvertors/PubSubConfigureConvertor.h
+++ b/Sluift/ElementConvertors/PubSubConfigureConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubConfigure.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubConfigureConvertor : public GenericLuaElementConvertor<PubSubConfigure> {
public:
PubSubConfigureConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubConfigureConvertor();
+ virtual ~PubSubConfigureConvertor() override;
- virtual std::shared_ptr<PubSubConfigure> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubConfigure>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubConfigure> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubConfigure>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubCreateConvertor.h b/Sluift/ElementConvertors/PubSubCreateConvertor.h
index 12c47da..f3b11bd 100644
--- a/Sluift/ElementConvertors/PubSubCreateConvertor.h
+++ b/Sluift/ElementConvertors/PubSubCreateConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubCreate.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubCreateConvertor : public GenericLuaElementConvertor<PubSubCreate> {
public:
PubSubCreateConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubCreateConvertor();
+ virtual ~PubSubCreateConvertor() override;
- virtual std::shared_ptr<PubSubCreate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubCreate>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubCreate> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubCreate>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubDefaultConvertor.h b/Sluift/ElementConvertors/PubSubDefaultConvertor.h
index fbdbf95..1049cd4 100644
--- a/Sluift/ElementConvertors/PubSubDefaultConvertor.h
+++ b/Sluift/ElementConvertors/PubSubDefaultConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubDefault.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubDefaultConvertor : public GenericLuaElementConvertor<PubSubDefault> {
public:
PubSubDefaultConvertor();
- virtual ~PubSubDefaultConvertor();
+ virtual ~PubSubDefaultConvertor() override;
- virtual std::shared_ptr<PubSubDefault> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubDefault>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubDefault> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubDefault>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventAssociateConvertor.h b/Sluift/ElementConvertors/PubSubEventAssociateConvertor.h
index 975aa60..e84460f 100644
--- a/Sluift/ElementConvertors/PubSubEventAssociateConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventAssociateConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventAssociate.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubEventAssociateConvertor : public GenericLuaElementConvertor<PubSubEventAssociate> {
public:
PubSubEventAssociateConvertor();
- virtual ~PubSubEventAssociateConvertor();
+ virtual ~PubSubEventAssociateConvertor() override;
- virtual std::shared_ptr<PubSubEventAssociate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventAssociate>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventAssociate> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventAssociate>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventCollectionConvertor.h b/Sluift/ElementConvertors/PubSubEventCollectionConvertor.h
index e8feada..cab3b97 100644
--- a/Sluift/ElementConvertors/PubSubEventCollectionConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventCollectionConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventCollection.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubEventCollectionConvertor : public GenericLuaElementConvertor<PubSubEventCollection> {
public:
PubSubEventCollectionConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubEventCollectionConvertor();
+ virtual ~PubSubEventCollectionConvertor() override;
- virtual std::shared_ptr<PubSubEventCollection> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventCollection>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventCollection> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventCollection>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.h b/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.h
index dd327d4..c2d82a5 100644
--- a/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventConfigurationConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventConfiguration.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubEventConfigurationConvertor : public GenericLuaElementConvertor<PubSubEventConfiguration> {
public:
PubSubEventConfigurationConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubEventConfigurationConvertor();
+ virtual ~PubSubEventConfigurationConvertor() override;
- virtual std::shared_ptr<PubSubEventConfiguration> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventConfiguration>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventConfiguration> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventConfiguration>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubEventConvertor.h b/Sluift/ElementConvertors/PubSubEventConvertor.h
index 8b0cbec..b116c68 100644
--- a/Sluift/ElementConvertors/PubSubEventConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEvent.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubEventConvertor : public GenericLuaElementConvertor<PubSubEvent> {
public:
PubSubEventConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubEventConvertor();
+ virtual ~PubSubEventConvertor() override;
- virtual std::shared_ptr<PubSubEvent> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEvent>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEvent> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEvent>) override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubEventDeleteConvertor.h b/Sluift/ElementConvertors/PubSubEventDeleteConvertor.h
index ba2b0b8..66c706f 100644
--- a/Sluift/ElementConvertors/PubSubEventDeleteConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventDeleteConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventDelete.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubEventDeleteConvertor : public GenericLuaElementConvertor<PubSubEventDelete> {
public:
PubSubEventDeleteConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubEventDeleteConvertor();
+ virtual ~PubSubEventDeleteConvertor() override;
- virtual std::shared_ptr<PubSubEventDelete> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventDelete>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventDelete> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventDelete>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.h b/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.h
index 0a1d678..17f9ae9 100644
--- a/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventDisassociateConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventDisassociate.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubEventDisassociateConvertor : public GenericLuaElementConvertor<PubSubEventDisassociate> {
public:
PubSubEventDisassociateConvertor();
- virtual ~PubSubEventDisassociateConvertor();
+ virtual ~PubSubEventDisassociateConvertor() override;
- virtual std::shared_ptr<PubSubEventDisassociate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventDisassociate>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventDisassociate> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventDisassociate>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventItemConvertor.cpp b/Sluift/ElementConvertors/PubSubEventItemConvertor.cpp
index ac86024..19ab09a 100644
--- a/Sluift/ElementConvertors/PubSubEventItemConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventItemConvertor.cpp
@@ -39,7 +39,7 @@ std::shared_ptr<PubSubEventItem> PubSubEventItemConvertor::doConvertFromLua(lua_
lua_getfield(L, -1, "data");
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::shared_ptr<Payload> > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
diff --git a/Sluift/ElementConvertors/PubSubEventItemConvertor.h b/Sluift/ElementConvertors/PubSubEventItemConvertor.h
index 6239b14..9e29ce8 100644
--- a/Sluift/ElementConvertors/PubSubEventItemConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventItemConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventItem.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubEventItemConvertor : public GenericLuaElementConvertor<PubSubEventItem> {
public:
PubSubEventItemConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubEventItemConvertor();
+ virtual ~PubSubEventItemConvertor() override;
- virtual std::shared_ptr<PubSubEventItem> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventItem>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventItem> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventItem>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubEventItemsConvertor.cpp b/Sluift/ElementConvertors/PubSubEventItemsConvertor.cpp
index 7a3cde1..66f798e 100644
--- a/Sluift/ElementConvertors/PubSubEventItemsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubEventItemsConvertor.cpp
@@ -34,7 +34,7 @@ std::shared_ptr<PubSubEventItems> PubSubEventItemsConvertor::doConvertFromLua(lu
lua_getfield(L, -1, "items");
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::shared_ptr<PubSubEventItem> > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
@@ -51,7 +51,7 @@ std::shared_ptr<PubSubEventItems> PubSubEventItemsConvertor::doConvertFromLua(lu
lua_getfield(L, -1, "retracts");
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::shared_ptr<PubSubEventRetract> > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
diff --git a/Sluift/ElementConvertors/PubSubEventItemsConvertor.h b/Sluift/ElementConvertors/PubSubEventItemsConvertor.h
index ea8942b..8f7e3fe 100644
--- a/Sluift/ElementConvertors/PubSubEventItemsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventItemsConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventItems.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubEventItemsConvertor : public GenericLuaElementConvertor<PubSubEventItems> {
public:
PubSubEventItemsConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubEventItemsConvertor();
+ virtual ~PubSubEventItemsConvertor() override;
- virtual std::shared_ptr<PubSubEventItems> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventItems>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventItems> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventItems>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubEventPurgeConvertor.h b/Sluift/ElementConvertors/PubSubEventPurgeConvertor.h
index e3321b1..1c2cdbb 100644
--- a/Sluift/ElementConvertors/PubSubEventPurgeConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventPurgeConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventPurge.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubEventPurgeConvertor : public GenericLuaElementConvertor<PubSubEventPurge> {
public:
PubSubEventPurgeConvertor();
- virtual ~PubSubEventPurgeConvertor();
+ virtual ~PubSubEventPurgeConvertor() override;
- virtual std::shared_ptr<PubSubEventPurge> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventPurge>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventPurge> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventPurge>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventRedirectConvertor.h b/Sluift/ElementConvertors/PubSubEventRedirectConvertor.h
index b1f33d2..a61cb79 100644
--- a/Sluift/ElementConvertors/PubSubEventRedirectConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventRedirectConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventRedirect.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubEventRedirectConvertor : public GenericLuaElementConvertor<PubSubEventRedirect> {
public:
PubSubEventRedirectConvertor();
- virtual ~PubSubEventRedirectConvertor();
+ virtual ~PubSubEventRedirectConvertor() override;
- virtual std::shared_ptr<PubSubEventRedirect> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventRedirect>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventRedirect> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventRedirect>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventRetractConvertor.h b/Sluift/ElementConvertors/PubSubEventRetractConvertor.h
index 65aac36..f437ad5 100644
--- a/Sluift/ElementConvertors/PubSubEventRetractConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventRetractConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventRetract.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubEventRetractConvertor : public GenericLuaElementConvertor<PubSubEventRetract> {
public:
PubSubEventRetractConvertor();
- virtual ~PubSubEventRetractConvertor();
+ virtual ~PubSubEventRetractConvertor() override;
- virtual std::shared_ptr<PubSubEventRetract> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventRetract>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventRetract> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventRetract>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.h b/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.h
index 0b3181b..61d1f21 100644
--- a/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.h
+++ b/Sluift/ElementConvertors/PubSubEventSubscriptionConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubEventSubscription.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubEventSubscriptionConvertor : public GenericLuaElementConvertor<PubSubEventSubscription> {
public:
PubSubEventSubscriptionConvertor();
- virtual ~PubSubEventSubscriptionConvertor();
+ virtual ~PubSubEventSubscriptionConvertor() override;
- virtual std::shared_ptr<PubSubEventSubscription> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventSubscription>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubEventSubscription> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubEventSubscription>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubItemConvertor.cpp b/Sluift/ElementConvertors/PubSubItemConvertor.cpp
index 27fd4a3..b46419a 100644
--- a/Sluift/ElementConvertors/PubSubItemConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubItemConvertor.cpp
@@ -29,7 +29,7 @@ std::shared_ptr<PubSubItem> PubSubItemConvertor::doConvertFromLua(lua_State* L)
lua_getfield(L, -1, "data");
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::shared_ptr<Payload> > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
diff --git a/Sluift/ElementConvertors/PubSubItemConvertor.h b/Sluift/ElementConvertors/PubSubItemConvertor.h
index 2772932..87c3809 100644
--- a/Sluift/ElementConvertors/PubSubItemConvertor.h
+++ b/Sluift/ElementConvertors/PubSubItemConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubItem.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubItemConvertor : public GenericLuaElementConvertor<PubSubItem> {
public:
PubSubItemConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubItemConvertor();
+ virtual ~PubSubItemConvertor() override;
- virtual std::shared_ptr<PubSubItem> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubItem>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubItem> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubItem>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubItemsConvertor.cpp b/Sluift/ElementConvertors/PubSubItemsConvertor.cpp
index 5fa1bd3..0bb8eb9 100644
--- a/Sluift/ElementConvertors/PubSubItemsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubItemsConvertor.cpp
@@ -33,7 +33,7 @@ std::shared_ptr<PubSubItems> PubSubItemsConvertor::doConvertFromLua(lua_State* L
lua_pop(L, 1);
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::shared_ptr<PubSubItem> > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
diff --git a/Sluift/ElementConvertors/PubSubItemsConvertor.h b/Sluift/ElementConvertors/PubSubItemsConvertor.h
index 56348b0..9e0f73a 100644
--- a/Sluift/ElementConvertors/PubSubItemsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubItemsConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubItems.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubItemsConvertor : public GenericLuaElementConvertor<PubSubItems> {
public:
PubSubItemsConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubItemsConvertor();
+ virtual ~PubSubItemsConvertor() override;
- virtual std::shared_ptr<PubSubItems> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubItems>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubItems> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubItems>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubOptionsConvertor.h b/Sluift/ElementConvertors/PubSubOptionsConvertor.h
index 60d11cc..add661a 100644
--- a/Sluift/ElementConvertors/PubSubOptionsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOptionsConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOptions.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubOptionsConvertor : public GenericLuaElementConvertor<PubSubOptions> {
public:
PubSubOptionsConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubOptionsConvertor();
+ virtual ~PubSubOptionsConvertor() override;
- virtual std::shared_ptr<PubSubOptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOptions>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOptions> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOptions>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.h b/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.h
index 9020482..92b001b 100644
--- a/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerAffiliationConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerAffiliation.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubOwnerAffiliationConvertor : public GenericLuaElementConvertor<PubSubOwnerAffiliation> {
public:
PubSubOwnerAffiliationConvertor();
- virtual ~PubSubOwnerAffiliationConvertor();
+ virtual ~PubSubOwnerAffiliationConvertor() override;
- virtual std::shared_ptr<PubSubOwnerAffiliation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerAffiliation>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerAffiliation> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerAffiliation>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.cpp
index ee8a8cb..9ca76fc 100644
--- a/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.cpp
@@ -33,7 +33,7 @@ std::shared_ptr<PubSubOwnerAffiliations> PubSubOwnerAffiliationsConvertor::doCon
lua_pop(L, 1);
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::shared_ptr<PubSubOwnerAffiliation> > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
diff --git a/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.h b/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.h
index 3026e2c..f0c45a3 100644
--- a/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerAffiliationsConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerAffiliations.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubOwnerAffiliationsConvertor : public GenericLuaElementConvertor<PubSubOwnerAffiliations> {
public:
PubSubOwnerAffiliationsConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubOwnerAffiliationsConvertor();
+ virtual ~PubSubOwnerAffiliationsConvertor() override;
- virtual std::shared_ptr<PubSubOwnerAffiliations> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerAffiliations>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerAffiliations> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerAffiliations>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.h b/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.h
index 4b39fdf..9f0ed9f 100644
--- a/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerConfigureConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerConfigure.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubOwnerConfigureConvertor : public GenericLuaElementConvertor<PubSubOwnerConfigure> {
public:
PubSubOwnerConfigureConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubOwnerConfigureConvertor();
+ virtual ~PubSubOwnerConfigureConvertor() override;
- virtual std::shared_ptr<PubSubOwnerConfigure> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerConfigure>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerConfigure> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerConfigure>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.h b/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.h
index ae0f018..ab4a25b 100644
--- a/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerDefaultConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerDefault.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubOwnerDefaultConvertor : public GenericLuaElementConvertor<PubSubOwnerDefault> {
public:
PubSubOwnerDefaultConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubOwnerDefaultConvertor();
+ virtual ~PubSubOwnerDefaultConvertor() override;
- virtual std::shared_ptr<PubSubOwnerDefault> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerDefault>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerDefault> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerDefault>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.h b/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.h
index 54a2cf9..8c44b5c 100644
--- a/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerDeleteConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerDelete.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubOwnerDeleteConvertor : public GenericLuaElementConvertor<PubSubOwnerDelete> {
public:
PubSubOwnerDeleteConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubOwnerDeleteConvertor();
+ virtual ~PubSubOwnerDeleteConvertor() override;
- virtual std::shared_ptr<PubSubOwnerDelete> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerDelete>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerDelete> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerDelete>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.h b/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.h
index 4696f45..b2cb565 100644
--- a/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerPurgeConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerPurge.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubOwnerPurgeConvertor : public GenericLuaElementConvertor<PubSubOwnerPurge> {
public:
PubSubOwnerPurgeConvertor();
- virtual ~PubSubOwnerPurgeConvertor();
+ virtual ~PubSubOwnerPurgeConvertor() override;
- virtual std::shared_ptr<PubSubOwnerPurge> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerPurge>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerPurge> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerPurge>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.h b/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.h
index 3517a49..433303f 100644
--- a/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerRedirect.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubOwnerRedirectConvertor : public GenericLuaElementConvertor<PubSubOwnerRedirect> {
public:
PubSubOwnerRedirectConvertor();
- virtual ~PubSubOwnerRedirectConvertor();
+ virtual ~PubSubOwnerRedirectConvertor() override;
- virtual std::shared_ptr<PubSubOwnerRedirect> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerRedirect>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerRedirect> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerRedirect>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.h b/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.h
index 2908654..bf054b3 100644
--- a/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerSubscription.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubOwnerSubscriptionConvertor : public GenericLuaElementConvertor<PubSubOwnerSubscription> {
public:
PubSubOwnerSubscriptionConvertor();
- virtual ~PubSubOwnerSubscriptionConvertor();
+ virtual ~PubSubOwnerSubscriptionConvertor() override;
- virtual std::shared_ptr<PubSubOwnerSubscription> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerSubscription>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerSubscription> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerSubscription>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.cpp
index 88085b5..3530efe 100644
--- a/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.cpp
@@ -33,7 +33,7 @@ std::shared_ptr<PubSubOwnerSubscriptions> PubSubOwnerSubscriptionsConvertor::doC
lua_pop(L, 1);
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::shared_ptr<PubSubOwnerSubscription> > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
diff --git a/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.h b/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.h
index c89b814..2e3f9be 100644
--- a/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubOwnerSubscriptionsConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubOwnerSubscriptions.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubOwnerSubscriptionsConvertor : public GenericLuaElementConvertor<PubSubOwnerSubscriptions> {
public:
PubSubOwnerSubscriptionsConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubOwnerSubscriptionsConvertor();
+ virtual ~PubSubOwnerSubscriptionsConvertor() override;
- virtual std::shared_ptr<PubSubOwnerSubscriptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerSubscriptions>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubOwnerSubscriptions> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubOwnerSubscriptions>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubPublishConvertor.cpp b/Sluift/ElementConvertors/PubSubPublishConvertor.cpp
index 63c97bc..d8a2742 100644
--- a/Sluift/ElementConvertors/PubSubPublishConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubPublishConvertor.cpp
@@ -34,7 +34,7 @@ std::shared_ptr<PubSubPublish> PubSubPublishConvertor::doConvertFromLua(lua_Stat
lua_getfield(L, -1, "items");
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::shared_ptr<PubSubItem> > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
diff --git a/Sluift/ElementConvertors/PubSubPublishConvertor.h b/Sluift/ElementConvertors/PubSubPublishConvertor.h
index 1765caf..ae28f14 100644
--- a/Sluift/ElementConvertors/PubSubPublishConvertor.h
+++ b/Sluift/ElementConvertors/PubSubPublishConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubPublish.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubPublishConvertor : public GenericLuaElementConvertor<PubSubPublish> {
public:
PubSubPublishConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubPublishConvertor();
+ virtual ~PubSubPublishConvertor() override;
- virtual std::shared_ptr<PubSubPublish> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubPublish>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubPublish> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubPublish>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubRetractConvertor.cpp b/Sluift/ElementConvertors/PubSubRetractConvertor.cpp
index c070ad6..c27ad7d 100644
--- a/Sluift/ElementConvertors/PubSubRetractConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubRetractConvertor.cpp
@@ -34,7 +34,7 @@ std::shared_ptr<PubSubRetract> PubSubRetractConvertor::doConvertFromLua(lua_Stat
lua_getfield(L, -1, "items");
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::shared_ptr<PubSubItem> > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
diff --git a/Sluift/ElementConvertors/PubSubRetractConvertor.h b/Sluift/ElementConvertors/PubSubRetractConvertor.h
index 13f7d0d..ca15ca7 100644
--- a/Sluift/ElementConvertors/PubSubRetractConvertor.h
+++ b/Sluift/ElementConvertors/PubSubRetractConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubRetract.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubRetractConvertor : public GenericLuaElementConvertor<PubSubRetract> {
public:
PubSubRetractConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubRetractConvertor();
+ virtual ~PubSubRetractConvertor() override;
- virtual std::shared_ptr<PubSubRetract> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubRetract>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubRetract> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubRetract>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubSubscribeConvertor.h b/Sluift/ElementConvertors/PubSubSubscribeConvertor.h
index 238f677..5f9d224 100644
--- a/Sluift/ElementConvertors/PubSubSubscribeConvertor.h
+++ b/Sluift/ElementConvertors/PubSubSubscribeConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubSubscribe.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubSubscribeConvertor : public GenericLuaElementConvertor<PubSubSubscribe> {
public:
PubSubSubscribeConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubSubscribeConvertor();
+ virtual ~PubSubSubscribeConvertor() override;
- virtual std::shared_ptr<PubSubSubscribe> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscribe>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubSubscribe> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscribe>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.h b/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.h
index fed8779..d853989 100644
--- a/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubSubscribeOptionsConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubSubscribeOptions.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubSubscribeOptionsConvertor : public GenericLuaElementConvertor<PubSubSubscribeOptions> {
public:
PubSubSubscribeOptionsConvertor();
- virtual ~PubSubSubscribeOptionsConvertor();
+ virtual ~PubSubSubscribeOptionsConvertor() override;
- virtual std::shared_ptr<PubSubSubscribeOptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscribeOptions>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubSubscribeOptions> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscribeOptions>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/PubSubSubscriptionConvertor.h b/Sluift/ElementConvertors/PubSubSubscriptionConvertor.h
index 5635181..9cad963 100644
--- a/Sluift/ElementConvertors/PubSubSubscriptionConvertor.h
+++ b/Sluift/ElementConvertors/PubSubSubscriptionConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubSubscription.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubSubscriptionConvertor : public GenericLuaElementConvertor<PubSubSubscription> {
public:
PubSubSubscriptionConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubSubscriptionConvertor();
+ virtual ~PubSubSubscriptionConvertor() override;
- virtual std::shared_ptr<PubSubSubscription> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscription>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubSubscription> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscription>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.cpp b/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.cpp
index 3712192..2325181 100644
--- a/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.cpp
@@ -33,7 +33,7 @@ std::shared_ptr<PubSubSubscriptions> PubSubSubscriptionsConvertor::doConvertFrom
lua_pop(L, 1);
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::shared_ptr<PubSubSubscription> > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
diff --git a/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.h b/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.h
index 2c941e6..94b4533 100644
--- a/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.h
+++ b/Sluift/ElementConvertors/PubSubSubscriptionsConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubSubscriptions.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class PubSubSubscriptionsConvertor : public GenericLuaElementConvertor<PubSubSubscriptions> {
public:
PubSubSubscriptionsConvertor(LuaElementConvertors* convertors);
- virtual ~PubSubSubscriptionsConvertor();
+ virtual ~PubSubSubscriptionsConvertor() override;
- virtual std::shared_ptr<PubSubSubscriptions> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscriptions>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubSubscriptions> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubSubscriptions>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
private:
LuaElementConvertors* convertors;
diff --git a/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.h b/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.h
index 7270917..f76f2b1 100644
--- a/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.h
+++ b/Sluift/ElementConvertors/PubSubUnsubscribeConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/PubSubUnsubscribe.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class PubSubUnsubscribeConvertor : public GenericLuaElementConvertor<PubSubUnsubscribe> {
public:
PubSubUnsubscribeConvertor();
- virtual ~PubSubUnsubscribeConvertor();
+ virtual ~PubSubUnsubscribeConvertor() override;
- virtual std::shared_ptr<PubSubUnsubscribe> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubUnsubscribe>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<PubSubUnsubscribe> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<PubSubUnsubscribe>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/RawXMLElementConvertor.h b/Sluift/ElementConvertors/RawXMLElementConvertor.h
index 79f648f..af3625b 100644
--- a/Sluift/ElementConvertors/RawXMLElementConvertor.h
+++ b/Sluift/ElementConvertors/RawXMLElementConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h>
#include <Sluift/LuaElementConvertor.h>
@@ -15,10 +14,10 @@ namespace Swift {
class RawXMLElementConvertor : public LuaElementConvertor {
public:
RawXMLElementConvertor();
- virtual ~RawXMLElementConvertor();
+ virtual ~RawXMLElementConvertor() override;
- virtual std::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) SWIFTEN_OVERRIDE;
- virtual boost::optional<std::string> convertToLua(lua_State*, std::shared_ptr<Element>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Element> convertFromLua(lua_State*, int index, const std::string& type) override;
+ virtual boost::optional<std::string> convertToLua(lua_State*, std::shared_ptr<Element>) override;
private:
FullPayloadSerializerCollection serializers;
diff --git a/Sluift/ElementConvertors/ResultSetConvertor.h b/Sluift/ElementConvertors/ResultSetConvertor.h
index e1b826c..e098605 100644
--- a/Sluift/ElementConvertors/ResultSetConvertor.h
+++ b/Sluift/ElementConvertors/ResultSetConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/ResultSet.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,11 +16,11 @@ namespace Swift {
class ResultSetConvertor : public GenericLuaElementConvertor<ResultSet> {
public:
ResultSetConvertor();
- virtual ~ResultSetConvertor();
+ virtual ~ResultSetConvertor() override;
- virtual std::shared_ptr<ResultSet> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<ResultSet>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<ResultSet> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<ResultSet>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/SecurityLabelConvertor.cpp b/Sluift/ElementConvertors/SecurityLabelConvertor.cpp
index 21d9a8f..8bc323a 100644
--- a/Sluift/ElementConvertors/SecurityLabelConvertor.cpp
+++ b/Sluift/ElementConvertors/SecurityLabelConvertor.cpp
@@ -26,7 +26,7 @@ std::shared_ptr<SecurityLabel> SecurityLabelConvertor::doConvertFromLua(lua_Stat
lua_getfield(L, -1, "equivalent_labels");
if (lua_type(L, -1) == LUA_TTABLE) {
std::vector< std::string > items;
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (lua_isstring(L, -1)) {
diff --git a/Sluift/ElementConvertors/SecurityLabelConvertor.h b/Sluift/ElementConvertors/SecurityLabelConvertor.h
index a0e7fea..22d11ca 100644
--- a/Sluift/ElementConvertors/SecurityLabelConvertor.h
+++ b/Sluift/ElementConvertors/SecurityLabelConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/SecurityLabel.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class SecurityLabelConvertor : public GenericLuaElementConvertor<SecurityLabel> {
public:
SecurityLabelConvertor();
- virtual ~SecurityLabelConvertor();
+ virtual ~SecurityLabelConvertor() override;
- virtual std::shared_ptr<SecurityLabel> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<SecurityLabel>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<SecurityLabel> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<SecurityLabel>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/SoftwareVersionConvertor.h b/Sluift/ElementConvertors/SoftwareVersionConvertor.h
index 29b1483..791aede 100644
--- a/Sluift/ElementConvertors/SoftwareVersionConvertor.h
+++ b/Sluift/ElementConvertors/SoftwareVersionConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/SoftwareVersion.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -15,9 +14,9 @@ namespace Swift {
class SoftwareVersionConvertor : public GenericLuaElementConvertor<SoftwareVersion> {
public:
SoftwareVersionConvertor();
- virtual ~SoftwareVersionConvertor();
+ virtual ~SoftwareVersionConvertor() override;
- virtual std::shared_ptr<SoftwareVersion> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<SoftwareVersion>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<SoftwareVersion> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<SoftwareVersion>) override;
};
}
diff --git a/Sluift/ElementConvertors/StanzaConvertor.h b/Sluift/ElementConvertors/StanzaConvertor.h
index bdaaad3..a7b4e4e 100644
--- a/Sluift/ElementConvertors/StanzaConvertor.h
+++ b/Sluift/ElementConvertors/StanzaConvertor.h
@@ -46,7 +46,7 @@ namespace Swift {
lua_pop(L, 1);
lua_getfield(L, -1, "payloads");
if (lua_type(L, -1) == LUA_TTABLE) {
- for(size_t i = 0; i < lua_objlen(L, -1); ++i) {
+ for(size_t i = 0; i < lua_rawlen(L, -1); ++i) {
lua_pushnumber(L, i + 1);
lua_gettable(L, -2);
if (!lua_isnil(L, -1)) {
diff --git a/Sluift/ElementConvertors/StatusConvertor.h b/Sluift/ElementConvertors/StatusConvertor.h
index 53da0ad..994cee5 100644
--- a/Sluift/ElementConvertors/StatusConvertor.h
+++ b/Sluift/ElementConvertors/StatusConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/Status.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -15,9 +14,9 @@ namespace Swift {
class StatusConvertor : public GenericLuaElementConvertor<Status> {
public:
StatusConvertor();
- virtual ~StatusConvertor();
+ virtual ~StatusConvertor() override;
- virtual std::shared_ptr<Status> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<Status>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Status> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Status>) override;
};
}
diff --git a/Sluift/ElementConvertors/StatusShowConvertor.h b/Sluift/ElementConvertors/StatusShowConvertor.h
index 1521ca3..41be6b3 100644
--- a/Sluift/ElementConvertors/StatusShowConvertor.h
+++ b/Sluift/ElementConvertors/StatusShowConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/StatusShow.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -15,10 +14,10 @@ namespace Swift {
class StatusShowConvertor : public GenericLuaElementConvertor<StatusShow> {
public:
StatusShowConvertor();
- virtual ~StatusShowConvertor();
+ virtual ~StatusShowConvertor() override;
- virtual std::shared_ptr<StatusShow> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<StatusShow>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<StatusShow> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<StatusShow>) override;
static std::string convertStatusShowTypeToString(const StatusShow::Type &show);
static StatusShow::Type convertStatusShowTypeFromString(const std::string& show);
diff --git a/Sluift/ElementConvertors/SubjectConvertor.h b/Sluift/ElementConvertors/SubjectConvertor.h
index 1520004..f8eb152 100644
--- a/Sluift/ElementConvertors/SubjectConvertor.h
+++ b/Sluift/ElementConvertors/SubjectConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/Subject.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,9 +16,9 @@ namespace Swift {
class SubjectConvertor : public GenericLuaElementConvertor<Subject> {
public:
SubjectConvertor();
- virtual ~SubjectConvertor();
+ virtual ~SubjectConvertor() override;
- virtual std::shared_ptr<Subject> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<Subject>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<Subject> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<Subject>) override;
};
}
diff --git a/Sluift/ElementConvertors/UserLocationConvertor.h b/Sluift/ElementConvertors/UserLocationConvertor.h
index 36e3a0b..b667d2a 100644
--- a/Sluift/ElementConvertors/UserLocationConvertor.h
+++ b/Sluift/ElementConvertors/UserLocationConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/UserLocation.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class UserLocationConvertor : public GenericLuaElementConvertor<UserLocation> {
public:
UserLocationConvertor();
- virtual ~UserLocationConvertor();
+ virtual ~UserLocationConvertor() override;
- virtual std::shared_ptr<UserLocation> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<UserLocation>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<UserLocation> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<UserLocation>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/UserTuneConvertor.h b/Sluift/ElementConvertors/UserTuneConvertor.h
index ba57747..90bda41 100644
--- a/Sluift/ElementConvertors/UserTuneConvertor.h
+++ b/Sluift/ElementConvertors/UserTuneConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2014-2016 Isode Limited.
+ * Copyright (c) 2014-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/UserTune.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -17,10 +16,10 @@ namespace Swift {
class UserTuneConvertor : public GenericLuaElementConvertor<UserTune> {
public:
UserTuneConvertor();
- virtual ~UserTuneConvertor();
+ virtual ~UserTuneConvertor() override;
- virtual std::shared_ptr<UserTune> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<UserTune>) SWIFTEN_OVERRIDE;
- virtual boost::optional<Documentation> getDocumentation() const SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<UserTune> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<UserTune>) override;
+ virtual boost::optional<Documentation> getDocumentation() const override;
};
}
diff --git a/Sluift/ElementConvertors/VCardConvertor.h b/Sluift/ElementConvertors/VCardConvertor.h
index d63ef10..1d59c69 100644
--- a/Sluift/ElementConvertors/VCardConvertor.h
+++ b/Sluift/ElementConvertors/VCardConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/VCard.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -15,9 +14,9 @@ namespace Swift {
class VCardConvertor : public GenericLuaElementConvertor<VCard> {
public:
VCardConvertor();
- virtual ~VCardConvertor();
+ virtual ~VCardConvertor() override;
- virtual std::shared_ptr<VCard> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<VCard>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<VCard> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<VCard>) override;
};
}
diff --git a/Sluift/ElementConvertors/VCardUpdateConvertor.h b/Sluift/ElementConvertors/VCardUpdateConvertor.h
index 851f3b1..19e42c6 100644
--- a/Sluift/ElementConvertors/VCardUpdateConvertor.h
+++ b/Sluift/ElementConvertors/VCardUpdateConvertor.h
@@ -1,12 +1,11 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
#include <Swiften/Elements/VCardUpdate.h>
#include <Sluift/GenericLuaElementConvertor.h>
@@ -15,9 +14,9 @@ namespace Swift {
class VCardUpdateConvertor : public GenericLuaElementConvertor<VCardUpdate> {
public:
VCardUpdateConvertor();
- virtual ~VCardUpdateConvertor();
+ virtual ~VCardUpdateConvertor() override;
- virtual std::shared_ptr<VCardUpdate> doConvertFromLua(lua_State*) SWIFTEN_OVERRIDE;
- virtual void doConvertToLua(lua_State*, std::shared_ptr<VCardUpdate>) SWIFTEN_OVERRIDE;
+ virtual std::shared_ptr<VCardUpdate> doConvertFromLua(lua_State*) override;
+ virtual void doConvertToLua(lua_State*, std::shared_ptr<VCardUpdate>) override;
};
}
diff --git a/Sluift/Examples/SendReference.lua b/Sluift/Examples/SendReference.lua
new file mode 100644
index 0000000..b705172
--- /dev/null
+++ b/Sluift/Examples/SendReference.lua
@@ -0,0 +1,70 @@
+#!/usr/bin/env sluift --
+
+-- This is an example of sending a custom payload, a XEP-0372 reference in this
+-- case.
+--
+-- Running this requires a sluift binary somewhere in the PATH. Alternatively,
+-- you can feed this to sluift, or to a Lua that has sluift.so in its library
+-- path.
+
+require("sluift")
+
+DEFAULT_URI = "http://example.com/kitten.jpg"
+
+function usage(err)
+ print("Usage: SendReference.lua jid [tojid] [datauri]")
+ print()
+ print("This tool will log in as jid, and send a reference to tojid. If no tojid")
+ print("is provided, a message to itself is sent. The datauri defaults to")
+ print(DEFAULT_URI .. ", but can be overridden.")
+
+ if err then
+ print("")
+ print("Error: " .. err)
+ end
+ os.exit(1)
+end
+
+function get_password(prompt)
+ if prompt then
+ io.write(prompt)
+ end
+ local stty_ret = os.execute("stty -echo 2>/dev/null")
+ if stty_ret then
+ io.write("\027[8m")
+ end
+ local ok, pass = pcall(io.read, "*l")
+ if stty_ret then
+ io.write("\027[m")
+ else
+ os.execute("stty sane")
+ end
+ io.write("\n");
+ if ok then
+ return pass
+ end
+end
+
+if #arg < 1 then
+ usage("no jid specified")
+end
+jid = arg[1]
+password = os.getenv("XMPP_PASSWORD") or get_password("Password: ")
+tojid = #arg > 1 and arg[2] or jid
+datauri = #arg > 2 and arg[3] or DEFAULT_URI
+
+sluift.debug = 1
+sluift.with(sluift.new_client(jid, password), function()
+ connect(options)
+ reference = {
+ ['_type'] = 'dom',
+ ['tag'] = 'reference',
+ ['ns'] = 'urn:xmpp:reference:0',
+ ['attributes'] = {
+ { ['name'] = 'type', ['value'] = 'data' },
+ { ['name'] = 'uri', ['value'] = datauri },
+ },
+ }
+ send_message{to=tojid, body="Check out this data!", payloads={reference}}
+ disconnect()
+end)
diff --git a/Sluift/GenericLuaElementConvertor.h b/Sluift/GenericLuaElementConvertor.h
index d94a324..4e52d9e 100644
--- a/Sluift/GenericLuaElementConvertor.h
+++ b/Sluift/GenericLuaElementConvertor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -10,8 +10,6 @@
#include <lua.hpp>
-#include <Swiften/Base/Override.h>
-
#include <Sluift/Lua/Check.h>
#include <Sluift/Lua/LuaUtils.h>
#include <Sluift/LuaElementConvertor.h>
@@ -23,9 +21,9 @@ namespace Swift {
GenericLuaElementConvertor(const std::string& type) : type(type) {
}
- virtual ~GenericLuaElementConvertor() {}
+ virtual ~GenericLuaElementConvertor() override {}
- virtual std::shared_ptr<Element> convertFromLua(lua_State* L, int index, const std::string& payloadType) SWIFTEN_OVERRIDE {
+ virtual std::shared_ptr<Element> convertFromLua(lua_State* L, int index, const std::string& payloadType) override {
if (payloadType == type) {
Lua::checkType(L, index, LUA_TTABLE);
lua_pushvalue(L, index);
@@ -37,7 +35,7 @@ namespace Swift {
}
virtual boost::optional<std::string> convertToLua(
- lua_State* L, std::shared_ptr<Element> payload) SWIFTEN_OVERRIDE {
+ lua_State* L, std::shared_ptr<Element> payload) override {
if (std::shared_ptr<T> actualPayload = std::dynamic_pointer_cast<T>(payload)) {
doConvertToLua(L, actualPayload);
assert(lua_type(L, -1) == LUA_TTABLE);
diff --git a/Sluift/Helpers.h b/Sluift/Helpers.h
index 6af3906..41bfc97 100644
--- a/Sluift/Helpers.h
+++ b/Sluift/Helpers.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,7 +9,6 @@
#include <string>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
namespace Swift {
class ClientError;
diff --git a/Sluift/Lua/FunctionRegistration.h b/Sluift/Lua/FunctionRegistration.h
index 8e1410d..285c3d0 100644
--- a/Sluift/Lua/FunctionRegistration.h
+++ b/Sluift/Lua/FunctionRegistration.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -11,7 +11,6 @@
#include <lua.hpp>
#include <Swiften/Base/API.h>
-#include <Swiften/Base/Override.h>
#include <Sluift/Lua/FunctionRegistry.h>
diff --git a/Sluift/Lua/FunctionRegistry.h b/Sluift/Lua/FunctionRegistry.h
index acab3aa..88e15d5 100644
--- a/Sluift/Lua/FunctionRegistry.h
+++ b/Sluift/Lua/FunctionRegistry.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -11,8 +11,6 @@
#include <lua.hpp>
-#include <Swiften/Base/Override.h>
-
namespace Swift {
namespace Lua {
class FunctionRegistry {
diff --git a/Sluift/Lua/LuaUtils.h b/Sluift/Lua/LuaUtils.h
index b87eb38..b9f5bff 100644
--- a/Sluift/Lua/LuaUtils.h
+++ b/Sluift/Lua/LuaUtils.h
@@ -12,7 +12,22 @@
#include <vector>
#if LUA_VERSION_NUM < 502
-#define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
+#define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
+#define lua_compare(L,idx1,idx2,LUA_OPEQ) lua_equal(L,(idx1),(idx2))
+#define lua_rawlen(L, i) lua_objlen(L,(i))
+#endif
+#if LUA_VERSION_NUM >= 503
+#undef luaL_register
+#define luaL_register(L, n, l) \
+ lua_getglobal( L, n ); \
+ if( lua_isnil( L, -1 ) ) \
+ { \
+ lua_pop( L, 1 ); \
+ lua_newtable( L ); \
+ } \
+ luaL_setfuncs( L, (l), 0 ); \
+ lua_pushvalue( L, -1 ); \
+ lua_setglobal( L, n );
#endif
namespace Swift {
diff --git a/Sluift/LuaElementConvertor.h b/Sluift/LuaElementConvertor.h
index 2cf98e7..eb3a24f 100644
--- a/Sluift/LuaElementConvertor.h
+++ b/Sluift/LuaElementConvertor.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -11,8 +11,6 @@
#include <boost/optional.hpp>
-#include <Swiften/Base/Override.h>
-
struct lua_State;
namespace Swift {
diff --git a/Sluift/LuaElementConvertors.h b/Sluift/LuaElementConvertors.h
index 8e1d10b..bfcffdd 100644
--- a/Sluift/LuaElementConvertors.h
+++ b/Sluift/LuaElementConvertors.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -11,8 +11,6 @@
#include <boost/optional.hpp>
-#include <Swiften/Base/Override.h>
-
struct lua_State;
namespace Swift {
diff --git a/Sluift/StandardTerminal.h b/Sluift/StandardTerminal.h
index 2109878..f32bd1c 100644
--- a/Sluift/StandardTerminal.h
+++ b/Sluift/StandardTerminal.h
@@ -1,23 +1,21 @@
/*
- * Copyright (c) 2013-2016 Isode Limited.
+ * Copyright (c) 2013-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
-#include <Swiften/Base/Override.h>
-
#include <Sluift/Terminal.h>
namespace Swift {
class StandardTerminal : public Terminal {
public:
StandardTerminal();
- virtual ~StandardTerminal();
+ virtual ~StandardTerminal() override;
- virtual boost::optional<std::string> readLine(const std::string& prompt) SWIFTEN_OVERRIDE;
- virtual void printError(const std::string& message) SWIFTEN_OVERRIDE;
- virtual void addToHistory(const std::string& command) SWIFTEN_OVERRIDE;
+ virtual boost::optional<std::string> readLine(const std::string& prompt) override;
+ virtual void printError(const std::string& message) override;
+ virtual void addToHistory(const std::string& command) override;
};
}
diff --git a/Sluift/client.cpp b/Sluift/client.cpp
index 75f675d..ae2f610 100644
--- a/Sluift/client.cpp
+++ b/Sluift/client.cpp
@@ -701,7 +701,7 @@ SLUIFT_LUA_FUNCTION_WITH_HELP(
lua_getfield(L, 2, "groups");
if (!lua_isnil(L, -1)) {
if (lua_type(L, -1) == LUA_TTABLE) {
- for (size_t i = 1; i <= lua_objlen(L, -1); ++i) {
+ for (size_t i = 1; i <= lua_rawlen(L, -1); ++i) {
lua_rawgeti(L, -1, boost::numeric_cast<int>(i));
const char* rawGroup = lua_tostring(L, -1);
if (rawGroup) {
diff --git a/Sluift/core.lua b/Sluift/core.lua
index 89c96ba..f35a603 100644
--- a/Sluift/core.lua
+++ b/Sluift/core.lua
@@ -6,7 +6,8 @@
local sluift = select(1, ...)
local _G = _G
-local pairs, ipairs, print, tostring, type, error, assert, next, rawset, xpcall, unpack, io = pairs, ipairs, print, tostring, type, error, assert, next, rawset, xpcall, unpack, io
+local pairs, ipairs, print, tostring, type, error, assert, next, rawset, xpcall, io = pairs, ipairs, print, tostring, type, error, assert, next, rawset, xpcall, io
+local unpack = table.unpack or unpack
local setmetatable, getmetatable = setmetatable, getmetatable
local string = require "string"
local table = require "table"
@@ -961,7 +962,7 @@ register_help(Component.process_events)
-- component:set_command{to = 'alice@wonderland.lit', command = { type = 'execute', node = 'uptime' }}
--
local get_set_shortcuts = {
- get = {'software_version', 'disco_items', 'xml', 'dom', 'vcard'},
+ get = {'software_version', 'disco_items', 'disco_info', 'xml', 'dom', 'vcard'},
set = {'command', 'vcard'}
}
for query_action, query_types in pairs(get_set_shortcuts) do