Bogofilter adapter for OpenSMTPD in C++
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

32 lines
814 B

#ifndef _SMTPD_TOKEN_
#define _SMTPD_TOKEN_
#include <smtpd/types.hpp>
#include <sparsevector.hpp>
#include <vector>
#include <map>
#include <string>
#include <iostream>
#include <memory>
namespace smtpd {
class TokenPattern : public sparse_vector<Token> {
public:
TokenPattern();
TokenPattern(const TokenPattern & pattern);
TokenPattern(const std::vector<std::string> & input, bool wildcard = false);
TokenPattern(const std::string & input, bool wildcard = false);
TokenPattern(std::initializer_list<Token> list);
operator std::string() const;
private:
bool wildcard;
};
bool operator<(const TokenPattern & left, const TokenPattern & right);
std::ostream & operator<<(std::ostream & os, const TokenPattern & pattern);
}
#endif