| 1166 | } |
| 1167 | |
| 1168 | void MessageParser::parseFile(const std::string& sessionPath, const std::string& sessionAssertsPath, const std::string& src, const std::string& dest, const std::string& fileName, TemplateValues& tv) const |
| 1169 | { |
| 1170 | bool hasFile = false; |
| 1171 | if ((m_options & SPO_IGNORE_FILE) == 0) |
| 1172 | { |
| 1173 | hasFile = m_iTunesDb.copyFile(src, combinePath(sessionPath, sessionAssertsPath), dest); |
| 1174 | } |
| 1175 | |
| 1176 | if (hasFile) |
| 1177 | { |
| 1178 | tv.setName("plainshare"); |
| 1179 | tv["%%SHARINGURL%%"] = sessionAssertsPath + "/" + dest; |
| 1180 | tv["%%SHARINGTITLE%%"] = fileName; |
| 1181 | tv["%%MESSAGE%%"] = ""; |
| 1182 | tv["%%MSGTYPE%%"] = "file"; |
| 1183 | } |
| 1184 | else |
| 1185 | { |
| 1186 | tv.setName("msg"); |
| 1187 | tv["%%MESSAGE%%"] = formatString(getLocaleString("[File: %s]"), fileName.c_str()); |
| 1188 | } |
| 1189 | } |
| 1190 | |
| 1191 | void MessageParser::parseCard(const Session& session, const std::string& sessionPath, const std::string& portraitDir, const std::string& cardMessage, TemplateValues& tv) const |
| 1192 | { |
nothing calls this directly
no test coverage detected