+bool ExchangePlugin_ImportFormatValidator::parseFormats(const std::list<std::string>& theArguments,
+ std::list<std::string>& outFormats)
+{
+ std::list<std::string>::const_iterator it = theArguments.begin();
+ bool result = true;
+ for (; it != theArguments.end(); ++it) {
+ std::string anArg = *it;
+ int aSepPos = anArg.find(":");
+ if (aSepPos == std::string::npos) {
+ result = false;
+ continue;
+ }
+ std::string aFormat = anArg.substr(0, aSepPos);
+ std::transform(aFormat.begin(), aFormat.end(), aFormat.begin(), toupper);
+ outFormats.push_back(aFormat);
+ }
+ return result;
+}
+
+bool ExchangePlugin_ImportFormatValidator::parsePlugins(const std::list<std::string>& theArguments,
+ std::list<std::string>& outPlugins)
+{
+ std::list<std::string>::const_iterator it = theArguments.begin();
+ bool result = true;
+ for (; it != theArguments.end(); ++it) {
+ std::string anArg = *it;
+ int aSepPos = anArg.find(":");
+ if (aSepPos == std::string::npos) {
+ result = false;
+ continue;
+ }
+ outPlugins.push_back(anArg.substr(aSepPos + 1));
+ }
+ return result;
+}