Changeset - 17f3dabe1419
[Not reviewed]
0 5 0
Jan Kaluza - 10 years ago 2016-02-06 07:57:48
jkaluza@redhat.com
Libtransport: Fix and enable rawXML tests
5 files changed with 6 insertions and 9 deletions:
0 comments (0 inline, 0 general)
include/transport/Frontend.h
Show inline comments
 
@@ -96,6 +96,8 @@ class Frontend {
 
		virtual std::string getRegistrationFields() { return "Jabber ID\n3rd-party network username\n3rd-party network password"; }
 
		virtual bool handleAdminMessage(Swift::Message::ref /*message*/) { return false; }
 

	
 
		virtual bool isRawXMLEnabled() { return false; }
 

	
 
		boost::signal<void (User *, const std::string &name, unsigned int id)> onVCardRequired;
 
		boost::signal<void (User *, boost::shared_ptr<Swift::VCard> vcard)> onVCardUpdated;
 
		boost::signal<void (Buddy *, const Swift::RosterItemPayload &item)> onBuddyUpdated;
include/transport/Transport.h
Show inline comments
 
@@ -101,10 +101,6 @@ namespace Transport {
 

	
 
			Config *getConfig() { return m_config; }
 

	
 
			bool isRawXMLEnabled() {
 
				return m_rawXML;
 
			}
 

	
 
			/// It's emitted only for presences addressed to transport itself
 
			/// (for example to="j2j.domain.tld") and for presences comming to
 
			/// MUC (for example to="#chat%irc.freenode.org@irc.domain.tld")
 
@@ -142,7 +138,6 @@ namespace Transport {
 
			Swift::JID m_jid;
 
			Factory *m_factory;
 
			Swift::EventLoop *m_loop;
 
			bool m_rawXML;
 
			Frontend *m_frontend;
 

	
 
		friend class User;
libtransport/LocalBuddy.cpp
Show inline comments
 
@@ -22,6 +22,7 @@
 
#include "transport/User.h"
 
#include "transport/RosterManager.h"
 
#include "transport/Transport.h"
 
#include "transport/Frontend.h"
 

	
 
namespace Transport {
 

	
 
@@ -101,7 +102,7 @@ void LocalBuddy::setGroups(const std::vector<std::string> &groups) {
 
}
 

	
 
bool LocalBuddy::getStatus(Swift::StatusShow &status, std::string &statusMessage) {
 
	if (getRosterManager()->getUser()->getComponent()->isRawXMLEnabled()) {
 
	if (getRosterManager()->getUser()->getComponent()->getFrontend()->isRawXMLEnabled()) {
 
		return false;
 
	}
 
	status = m_status;
libtransport/Transport.cpp
Show inline comments
 
@@ -43,7 +43,6 @@ Component::Component(Frontend *frontend, Swift::EventLoop *loop, Swift::NetworkF
 
	m_factory = factory;
 
	m_loop = loop;
 
	m_userRegistry = userRegistry;
 
	m_rawXML = false;
 
	m_jid = Swift::JID(CONFIG_STRING(m_config, "service.jid"));
 

	
 
	m_factories = factories;
tests/libtransport/networkpluginserver.cpp
Show inline comments
 
@@ -42,8 +42,8 @@ class NetworkPluginServerTest : public CPPUNIT_NS :: TestFixture, public BasicTe
 
	CPPUNIT_TEST(handleBuddyChangedPayloadUserContactInRoster);
 
	CPPUNIT_TEST(handleMessageHeadline);
 
	CPPUNIT_TEST(handleConvMessageAckPayload);
 
// 	CPPUNIT_TEST(handleRawXML);
 
// 	CPPUNIT_TEST(handleRawXMLSplit);
 
	CPPUNIT_TEST(handleRawXML);
 
	CPPUNIT_TEST(handleRawXMLSplit);
 

	
 
	CPPUNIT_TEST(benchmarkHandleBuddyChangedPayload);
 
	CPPUNIT_TEST(benchmarkSendUnavailablePresence);
0 comments (0 inline, 0 general)