Exemplo n.º 1
0
void GlooxParser::handleTag(Tag *tag) {
	if (m_handleTagCallback)
		// current tag is deleted after this function, so we have to clone it.
		m_handleTagCallback(tag->clone(), m_userdata);
	else
		m_tag = tag->clone();
}
Exemplo n.º 2
0
void GlooxParser::getTag(std::string str, void (*handleTagCallback)(Tag *tag, void *user_data), void *userdata) {
	m_userdata = userdata;
	m_handleTagCallback = handleTagCallback;

	m_parser->cleanup();
	if (m_parser->feed(str) != -1)
		m_handleTagCallback(NULL, m_userdata);
}
Exemplo n.º 3
0
void GlooxParser::handleTag(Tag *tag) {
	m_handleTagCallback(tag->clone(), m_userdata);
}