void FIFOMultiplexer::distributeContainer(Container &c){ { Lock l(m_fifoMutex); vector<ContainerListener*>::iterator it = m_listOfContainerListeners.begin(); while (it != m_listOfContainerListeners.end()) { ContainerListener *cl = (*it++); if (cl != NULL) { cl->nextContainer(c); } } } }
UT_Error IE_Imp_EPUB::readMetadata() { GsfInput* metaInf = gsf_infile_child_by_name(m_epub, "META-INF"); if (metaInf == NULL) { UT_DEBUGMSG(("Can`t open container META-INF dir\n")); return UT_ERROR; } GsfInput* meta = gsf_infile_child_by_name(GSF_INFILE(metaInf), "container.xml"); if (meta == NULL) { UT_DEBUGMSG(("Can`t open container metadata\n")); return UT_ERROR; } size_t metaSize = gsf_input_size(meta); if (metaSize == 0) { UT_DEBUGMSG(("Container metadata file is empty\n")); return UT_ERROR; } gchar* metaXml = (gchar*) gsf_input_read(meta, metaSize, NULL); std::string rootfilePath; UT_XML metaParser; ContainerListener containerListener; metaParser.setListener(&containerListener); if (metaParser.sniff(metaXml, metaSize, "container")) { UT_DEBUGMSG(("Parsing container.xml file\n")); metaParser.parse(metaXml, metaSize); } else { UT_DEBUGMSG(("Incorrect container.xml file\n")); return UT_ERROR; } m_rootfilePath = containerListener.getRootFilePath(); g_object_unref(G_OBJECT(meta)); g_object_unref(G_OBJECT(metaInf)); return UT_OK; }
void ControlledContainerConferenceFactory::sendToSCC(core::data::Container &c) { Lock l(m_listOfContainerListenersToReceiveContainersFromSystemsUnderTestMutex); clog << "Distributing '" << c.toString() << "' in ControlledContainerConferenceFactory to all SystemParts." << endl; vector<ContainerListener*>::iterator it = m_listOfContainerListenersToReceiveContainersFromSystemsUnderTest.begin(); while (it != m_listOfContainerListenersToReceiveContainersFromSystemsUnderTest.end()) { ContainerListener *cl = (*it++); if (cl != NULL) { cl->nextContainer(c); } } }