summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-10-30 19:48:58 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-10-30 19:49:56 (GMT)
commitaeae699f47c3f9a148903525943b6876c39a598d (patch)
treed7e21e3a011e1ceef3b6a7b1b8da335fba851144 /Sluift/ElementConvertors/PubSubOwnerSubscriptionConvertor.cpp
parent63bc9a94d2a5f69420de831248786f77c8622feb (diff)
downloadswift-aeae699f47c3f9a148903525943b6876c39a598d.zip
swift-aeae699f47c3f9a148903525943b6876c39a598d.tar.bz2
Implement missing conversion of some PubSub attributes
Change-Id: I51a4249fa84aa40dc2a6e3f2c7e5a9c8fce93f32
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;
}