OPTION(DPL_LOG "DPL logs status" ON)
OPTION(WITH_TESTS "Build tests" OFF)
OPTION(MULTIPROCESS_SERVICE_SUPPORT "Process per service" OFF)
+OPTION(MULTIPROCESS_SERVICE_SUPPORT_INLINE "Process per service - inline mode support" OFF)
IF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
MESSAGE(STATUS "Logging enabled for DPL")
ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
MESSAGE(STATUS "WITH_TESTS: " ${WITH_TESTS})
IF(MULTIPROCESS_SERVICE_SUPPORT)
ADD_DEFINITIONS("-DMULTIPROCESS_SERVICE_SUPPORT")
+ IF (MULTIPROCESS_SERVICE_SUPPORT_INLINE)
+ ADD_DEFINITIONS("-DMULTIPROCESS_SERVICE_SUPPORT_INLINE")
+ ENDIF(MULTIPROCESS_SERVICE_SUPPORT_INLINE)
ENDIF(MULTIPROCESS_SERVICE_SUPPORT)
# If supported for the target machine, emit position-independent code,suitable
ConfigParserData::AppControlInfo& m_data;
};
+ struct DispositionParser : public ElementParser
+ {
+ public:
+ virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
+ const DPL::String& /*name*/)
+ {
+ return &IgnoringParser::Create;
+ }
+
+ virtual void Accept(const Text& /*text*/)
+ {}
+
+ virtual void Accept(const Element& /*element*/)
+ {}
+
+ virtual void Accept(const XmlAttribute& attribute)
+ {
+ if (attribute.name == L"disposition") {
+ if (attribute.value.size() > 0) {
+ m_value = attribute.value;
+ NormalizeString(m_value);
+ }
+ }
+ }
+
+ virtual void Verify()
+ {
+ if (m_value.IsNull() || *m_value != L"inline") {
+ m_data.m_disposition = ConfigParserData::AppControlInfo::Disposition::WINDOW;
+ }
+ else {
+ m_data.m_disposition = ConfigParserData::AppControlInfo::Disposition::INLINE;
+ }
+ }
+
+ DispositionParser(ConfigParserData::AppControlInfo& data) :
+ ElementParser(),
+ m_properNamespace(false),
+ m_data(data)
+ {}
+
+ private:
+ bool m_properNamespace;
+ DPL::OptionalString m_value;
+ ConfigParserData::AppControlInfo& m_data;
+ };
+
virtual ActionFunc GetElementParser(const DPL::String& /*ns*/,
const DPL::String& name)
{
return DPL::MakeDelegate(this, &AppControlParser::OnUriElement);
} else if (name == L"mime") {
return DPL::MakeDelegate(this, &AppControlParser::OnMimeElement);
+ } else if (name == L"disposition") {
+ return DPL::MakeDelegate(this,
+ &AppControlParser::OnDispositionElement);
} else {
return &IgnoringParser::Create;
}
return ElementParserPtr(new MimeParser(m_appControl));
}
+ ElementParserPtr OnDispositionElement()
+ {
+ return ElementParserPtr(new DispositionParser(m_appControl));
+ }
+
AppControlParser(ConfigParserData& data) :
ElementParser(),
m_data(data),
uiApp.setTaskmanage(true);
uiApp.setNodisplay(true);
-
+#ifdef MULTIPROCESS_SERVICE_SUPPORT_INLINE
+ uiApp.setTaskmanage(ConfigParserData::AppControlInfo::Disposition::INLINE != it->m_disposition);
+ uiApp.setMultiple(ConfigParserData::AppControlInfo::Disposition::INLINE == it->m_disposition);
+#endif
std::stringstream postfix;
postfix << "-__SERVICE_PROCESS__" << count++;
uiApp.setTaskmanage(true);
uiApp.setNodisplay(true);
+#ifdef MULTIPROCESS_SERVICE_SUPPORT_INLINE
+ uiApp.setTaskmanage(ConfigParserData::ServiceInfo::Disposition::INLINE != it->m_disposition);
+ uiApp.setMultiple(ConfigParserData::ServiceInfo::Disposition::INLINE == it->m_disposition);
+#endif
std::stringstream postfix;
postfix << "-__SERVICE_PROCESS__" << count++;