示例#1
0
void XMPPFrontend::handleBackendConfigChanged() {
	if (!m_rawXML && CONFIG_BOOL_DEFAULTED(m_config, "features.rawxml", false)) {
		LOG4CXX_INFO(logger, "Enabled Raw XML mode");
		m_rawXML = true;
		m_iqRouter->addHandler(this);
	}
}
void DiscoInfoResponder::updateBuddyFeatures() {
	std::list<std::string> features;
	features.push_back("http://jabber.org/protocol/disco#items");
	features.push_back("http://jabber.org/protocol/disco#info");
	features.push_back("http://jabber.org/protocol/chatstates");
	features.push_back("http://jabber.org/protocol/xhtml-im");
	if (CONFIG_BOOL_DEFAULTED(m_config, "features.receipts", false)) {
		features.push_back("urn:xmpp:receipts");
	}
	setBuddyFeatures(features);
}
示例#3
0
void DiscoInfoResponder::updateFeatures() {
	std::list<std::string> features2;
	features2.push_back("jabber:iq:register");
	features2.push_back("jabber:iq:gateway");
	features2.push_back("jabber:iq:private");
	features2.push_back("http://jabber.org/protocol/disco#info");
	features2.push_back("http://jabber.org/protocol/commands");
	if (CONFIG_BOOL_DEFAULTED(m_config, "features.muc", false)) {
		features2.push_back("http://jabber.org/protocol/muc");
	}
	setTransportFeatures(features2);

	std::list<std::string> features;
	features.push_back("http://jabber.org/protocol/disco#items");
	features.push_back("http://jabber.org/protocol/disco#info");
	features.push_back("http://jabber.org/protocol/chatstates");
	features.push_back("http://jabber.org/protocol/xhtml-im");
	if (CONFIG_BOOL_DEFAULTED(m_config, "features.receipts", false)) {
		features.push_back("urn:xmpp:receipts");
	}
	setBuddyFeatures(features);
}
示例#4
0
void UsersReconnecter::handleConnected() {
	if (m_started)
		return;

	LOG4CXX_INFO(logger, "Starting UserReconnecter.");
	m_started = true;

	if (CONFIG_BOOL_DEFAULTED(m_component->getConfig(), "service.reconnect_all_users", false)) {
		m_storageBackend->getUsers(m_users);
	}
	else {
		m_storageBackend->getOnlineUsers(m_users);
	}

	reconnectNextUser();
}
示例#5
0
void Component::handleBackendConfigChanged() {
	if (!m_rawXML && CONFIG_BOOL_DEFAULTED(m_config, "features.rawxml", false)) {
		m_rawXML = true;
		m_iqRouter->addHandler(this);
	}
}