summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp')
-rw-r--r--Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp
index 0216874..dbba238 100644
--- a/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp
+++ b/Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp
@@ -32,6 +32,20 @@ boost::shared_ptr<PubSubOwnerSubscription> PubSubOwnerSubscriptionConvertor::doC
}
lua_pop(L, 1);
lua_getfield(L, -1, "subscription");
+ if (lua_isstring(L, -1)) {
+ if (std::string(lua_tostring(L, -1)) == "none") {
+ result->setSubscription(PubSubOwnerSubscription::None);
+ }
+ if (std::string(lua_tostring(L, -1)) == "pending") {
+ result->setSubscription(PubSubOwnerSubscription::Pending);
+ }
+ if (std::string(lua_tostring(L, -1)) == "subscribed") {
+ result->setSubscription(PubSubOwnerSubscription::Subscribed);
+ }
+ if (std::string(lua_tostring(L, -1)) == "unconfigured") {
+ result->setSubscription(PubSubOwnerSubscription::Unconfigured);
+ }
+ }
lua_pop(L, 1);
return result;
}