bool CPageAntispamSink::OnOk() { if( !TBaseDlg::OnOk() ) return false; if( ValidateRule(m_Settings.CertainSpamRule) || ValidateRule(m_Settings.PossibleSpamRule) ) { MsgBox(*this, "FolderMissing"); return false; } return true; }
void JobManager::SetRule(InternalJob::Pointer job, ISchedulingRule::Pointer sptr_rule) { Poco::ScopedLock<Poco::Mutex> m_managerLock(m_mutex); //cannot change the rule of a job that is already running ( GetRule is set to protected which should be // changed if this assert is needed // assert(job->GetState() == Job.NONE); ValidateRule(sptr_rule); job->InternalSetRule(sptr_rule); }
bool keymagic_driver::StoreRule(const std::list<int>& lhs, const std::list<int>& rhs, yy::location l) { short * lhs_bytes = new short[lhs.size()]; short * rhs_bytes = new short[rhs.size()]; int i; ValidateRule(lhs, rhs, l); i = 0; for (std::list<int>::const_iterator it = lhs.begin(); it != lhs.end(); it++) { lhs_bytes[i++] = *it; } i = 0; for (std::list<int>::const_iterator it = rhs.begin(); it != rhs.end(); it++) { rhs_bytes[i++] = *it; } RULE rule(lhs_bytes, rhs_bytes, lhs.size(), rhs.size()); rules.push_back(rule); return true; }