20BrokerFactory::BrokerFactory(
void)
30 for (map<int, Broker *>::iterator i = brokers.begin();
31 i != brokers.end(); ++i)
45 for (map<int, Broker *>::iterator i = brokers.begin();
46 i != brokers.end(); ++i) {
60 for (map<int, Broker *>::iterator i = brokers.begin();
61 i != brokers.end(); ++i)
63 i->second->assign(fname, o, deletable);
71 if (brokers.find(state) == brokers.end())
74 return brokers.find(state)->second->get(name);
80 if (brokers.find(state) == brokers.end()) {
85 return brokers[state];
101 deletables[fname] = deletable;
102 operators[fname] = o;
108 if (operators.find(name) == operators.end())
return 0;
110 return operators.find(name)->second;
125 session.
setLastError(
"Syntax error; first token must be a tag");
136 session.
setLastError(
"Syntax error; second token must be a SPACE");
147 session.
setLastError(
"Syntax error; third token must be a command");
164 " must come a SPACE");
176 "SPACE there must come a command");
Declaration of the Broker class.
Broker * getBroker(int state)
void assign(const std::string &fname, Operator *o)
void setLastError(const std::string &error) const
Operator * getOperator(int state, const std::string &name) const
void addCapability(const std::string &c)
static BrokerFactory & getInstance(void)
Operator * get(const std::string &name) const
Operator::ParseResult parseStub(Request &cmd)
void assign(const std::string &fname, Operator *o, bool deletable=false)
void addCapability(const std::string &cap)
virtual int getState(void) const =0
void setTag(std::string &t_in)
void setName(const std::string &s_in)
void setLastError(const std::string &error) const
static Session & getInstance(void)
Declaration of miscellaneous convertion functions.
Operator::ParseResult expectAstring(std::string &s_in)
Operator::ParseResult expectSPACE(void)
Operator::ParseResult expectTag(std::string &s_in)
void uppercase(std::string &input)
Declaration of all operators.
Declaration of a recursive descent IMAP command parser.