void Templateiser::processInclude ( std::string &code, std::string::const_iterator &inItr, const std::string &str ) { std::string key; inItr = readKey(key,inItr,str); // check the search paths for the include file if (!processTemplateFile(code,key.c_str())) code += "[!" + key + "]"; }
bool generateSymbian(Data data) { const QString outputFile = QLatin1String("ndefhandler_") + data.applicationName + QLatin1String(".xml"); if (data.matchString.isEmpty()) data.matchString = data.dataType; return processTemplateFile(QLatin1String("/templates/symbian/symbian.xml"), outputFile, data); }
bool generateHarmattan(Data data) { const QString outputFile = QLatin1String("ndefhandler_") + data.applicationName; if (data.matchString.isEmpty()) data.matchString = QLatin1Char('\'') + data.dataType + QLatin1String("'[1:*];"); bool success = false; success |= processTemplateFile(QLatin1String("/templates/harmattan/harmattan.conf"), outputFile + QLatin1String(".conf"), data); success |= processTemplateFile(QLatin1String("/templates/harmattan/harmattan.service"), outputFile + QLatin1String(".service"), data); success |= processTemplateFile(QLatin1String("/templates/harmattan/harmattan.postinst"), outputFile + QLatin1String(".postinst"), data); success |= processTemplateFile(QLatin1String("/templates/harmattan/harmattan.prerm"), outputFile + QLatin1String(".prerm"), data); return success; }
int main() { processTemplateFile("/Users/lei/.safejumper/linux.tpl", "/Users/lei/.safejumper/ca-file", "tcp", "127.0.0.1", "443"); }