diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-05-08 17:18:21 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-05-08 17:22:18 (GMT) |
commit | 09de88ddd4377a53a880b98d63bbe391eba982b9 (patch) | |
tree | baa45c64b17eff11c22be25ba52271ee822268fd /Swiften/Serializer | |
parent | fc7c2dd9140b38df288450a4732297b53188e87a (diff) | |
download | swift-09de88ddd4377a53a880b98d63bbe391eba982b9.zip swift-09de88ddd4377a53a880b98d63bbe391eba982b9.tar.bz2 |
Renamed Conference->Room.
Diffstat (limited to 'Swiften/Serializer')
3 files changed, 25 insertions, 25 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp b/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp index b4a2a49..0de75e5 100644 --- a/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp +++ b/Swiften/Serializer/PayloadSerializers/StorageSerializer.cpp @@ -20,19 +20,19 @@ StorageSerializer::StorageSerializer() : GenericPayloadSerializer<Storage>() { String StorageSerializer::serializePayload(boost::shared_ptr<Storage> storage) const { XMLElement storageElement("storage", "storage:bookmarks"); - foreach(const Storage::Conference& conference, storage->getConferences()) { + foreach(const Storage::Room& room, storage->getRooms()) { boost::shared_ptr<XMLElement> conferenceElement(new XMLElement("conference")); - conferenceElement->setAttribute("name", conference.name); - conferenceElement->setAttribute("jid", conference.jid); - conferenceElement->setAttribute("autojoin", conference.autoJoin ? "1" : "0"); - if (!conference.nick.isEmpty()) { + conferenceElement->setAttribute("name", room.name); + conferenceElement->setAttribute("jid", room.jid); + conferenceElement->setAttribute("autojoin", room.autoJoin ? "1" : "0"); + if (!room.nick.isEmpty()) { boost::shared_ptr<XMLElement> nickElement(new XMLElement("nick")); - nickElement->addNode(boost::shared_ptr<XMLTextNode>(new XMLTextNode(conference.nick))); + nickElement->addNode(boost::shared_ptr<XMLTextNode>(new XMLTextNode(room.nick))); conferenceElement->addNode(nickElement); } - if (!conference.password.isEmpty()) { + if (!room.password.isEmpty()) { boost::shared_ptr<XMLElement> passwordElement(new XMLElement("password")); - passwordElement->addNode(boost::shared_ptr<XMLTextNode>(new XMLTextNode(conference.password))); + passwordElement->addNode(boost::shared_ptr<XMLTextNode>(new XMLTextNode(room.password))); conferenceElement->addNode(passwordElement); } storageElement.addNode(conferenceElement); diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/PrivateStorageSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/PrivateStorageSerializerTest.cpp index 97a4655..59df665 100644 --- a/Swiften/Serializer/PayloadSerializers/UnitTest/PrivateStorageSerializerTest.cpp +++ b/Swiften/Serializer/PayloadSerializers/UnitTest/PrivateStorageSerializerTest.cpp @@ -26,11 +26,11 @@ class PrivateStorageSerializerTest : public CppUnit::TestFixture { boost::shared_ptr<PrivateStorage> privateStorage(new PrivateStorage()); boost::shared_ptr<Storage> storage(new Storage()); - Storage::Conference conference; - conference.name = "Swift"; - conference.jid = JID("swift@rooms.swift.im"); - conference.nick = "Alice"; - storage->addConference(conference); + Storage::Room room; + room.name = "Swift"; + room.jid = JID("swift@rooms.swift.im"); + room.nick = "Alice"; + storage->addRoom(room); privateStorage->setPayload(storage); CPPUNIT_ASSERT_EQUAL(String( diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/StorageSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/StorageSerializerTest.cpp index 5888731..8add953 100644 --- a/Swiften/Serializer/PayloadSerializers/UnitTest/StorageSerializerTest.cpp +++ b/Swiften/Serializer/PayloadSerializers/UnitTest/StorageSerializerTest.cpp @@ -24,13 +24,13 @@ class StorageSerializerTest : public CppUnit::TestFixture { void testSerialize() { PayloadsSerializer serializer; boost::shared_ptr<Storage> storage(new Storage()); - Storage::Conference conference; - conference.name = "Council of Oberon"; - conference.autoJoin = true; - conference.jid = JID("council@conference.underhill.org"); - conference.nick = "Puck"; - conference.password = "MyPass"; - storage->addConference(conference); + Storage::Room room; + room.name = "Council of Oberon"; + room.autoJoin = true; + room.jid = JID("council@conference.underhill.org"); + room.nick = "Puck"; + room.password = "MyPass"; + storage->addRoom(room); Storage::URL url; url.name = "Complete Works of Shakespeare"; url.url = "http://the-tech.mit.edu/Shakespeare/"; @@ -52,11 +52,11 @@ class StorageSerializerTest : public CppUnit::TestFixture { void testSerialize_NoNickOrPassword() { PayloadsSerializer serializer; boost::shared_ptr<Storage> storage(new Storage()); - Storage::Conference conference; - conference.name = "Council of Oberon"; - conference.autoJoin = true; - conference.jid = JID("council@conference.underhill.org"); - storage->addConference(conference); + Storage::Room room; + room.name = "Council of Oberon"; + room.autoJoin = true; + room.jid = JID("council@conference.underhill.org"); + storage->addRoom(room); CPPUNIT_ASSERT_EQUAL(String( "<storage xmlns=\"storage:bookmarks\">" |