29 logfacility = LOG_DAEMON;
78 logfacility = facility;
140 args.
addOptional(
"a|allow-plain",
"Allow authentication when not TLS protected",
true);
141 args.
addOptional(
"v|show-version",
"Enable verbose IMAP greeting",
false);
142 args.
addOptional(
"l|log-type",
"Sets the method used for logging",
false);
151 command.help =
args[
"help"] ==
"yes" ? true :
false;
152 command.version =
args[
"version"] ==
"yes" ? true :
false;
163 setEnv(
"ALLOW_NONSSL_PLAINTEXT_LOGINS",
"yes");
166 setEnv(
"SHOW_VERSION_IN_GREETING",
"yes");
199 responseCode =
"[" + code +
"] ";
226 return getenv(key.c_str()) != 0;
232 char *c = getenv(key.c_str());
239 string env = key +
"=" + value;
240 putenv(strdup(env.c_str()));
Declaration of the argument parser class.
bool hasArg(const std::string &arg) const
bool parse(int argc, char *argv[])
std::string errorString(void) const
void addOptional(const std::string &arg, const std::string &desc, bool boolean)
void setLogFacility(int facility)
const int getState(void) const
int getLogFacility(void) const
void setEnv(const std::string &key, const std::string &value)
void assignCommandLineArgs(void)
void setLastError(const std::string &error) const
const std::string & getIP(void) const
void setUserID(const std::string &s)
const std::string & getLastError(void) const
void setIP(const std::string &ip)
const std::string & getUserID() const
int getBodies(void) const
void setResponseCode(const std::string &error) const
int getWriteBytes(void) const
int getReadBytes(void) const
struct Binc::Session::@3 command
int getStatements(void) const
void clearResponseCode(void) const
bool parseCommandLine(int argc, char *argv[])
static Session & getInstance(void)
const std::string & getResponseCode(void) const
std::string getEnv(const std::string &key)
bool hasEnv(const std::string &key) const
Declaration of miscellaneous convertion functions.