35 for (string::const_iterator i = s_in.begin(); i != s_in.end(); ++i) {
47 if (toupper(*i) != toupper(c)) {
68 unsigned int digit1, digit2;
73 session.
setLastError(
"expected digit (day) after \" and a SPACE.");
88 int day = digit1 * 10 + digit2;
132 unsigned int year, c;
134 session.
setLastError(
"expected digit (first digit of year)");
139 session.
setLastError(
"expected digit (second digit of year)");
143 year = (year * 10) + c;
146 session.
setLastError(
"expected digit (third digit of year)");
150 year = (year * 10) + c;
153 session.
setLastError(
"expected digit (last digit of year)");
157 year = (year * 10) + c;
163 s_in += yearstr.
str();
369 v_in.push_back(
"\\Answered");
371 v_in.push_back(
"\\Flagged");
373 v_in.push_back(
"\\Deleted");
375 v_in.push_back(
"\\Seen");
377 v_in.push_back(
"\\Draft");
379 v_in.push_back(
"\\Answered");
383 v_in.push_back(
"\\" + flag);
390 v_in.push_back(flag);
413 day = (day * 10) + c;
419 s_in += daystr.
str();
471 year = (year * 10) + c;
478 year = (year * 10) + c;
485 year = (year * 10) + c;
491 s_in += yearstr.
str();
572 case 041:
case 043:
case 044:
case 046:
case 047:
case 054:
573 case 055:
case 056:
case 057:
case 060:
case 061:
case 062:
574 case 063:
case 064:
case 065:
case 066:
case 067:
case 070:
575 case 071:
case 072:
case 073:
case 074:
case 075:
case 076:
576 case 077:
case 0100:
case 0101:
case 0102:
case 0103:
case 0104:
577 case 0105:
case 0106:
case 0107:
case 0110:
case 0111:
case 0112:
578 case 0113:
case 0114:
case 0115:
case 0116:
case 0117:
case 0120:
579 case 0121:
case 0122:
case 0123:
case 0124:
case 0125:
case 0126:
580 case 0127:
case 0130:
case 0131:
case 0132:
case 0133:
case 0135:
581 case 0136:
case 0137:
case 0140:
case 0141:
case 0142:
case 0143:
582 case 0144:
case 0145:
case 0146:
case 0147:
case 0150:
case 0151:
583 case 0152:
case 0153:
case 0154:
case 0155:
case 0156:
case 0157:
584 case 0160:
case 0161:
case 0162:
case 0163:
case 0164:
case 0165:
585 case 0166:
case 0167:
case 0170:
case 0171:
case 0172:
case 0174:
586 case 0175:
case 0176:
694 case 041:
case 043:
case 044:
case 046:
case 047:
case 053:
695 case 054:
case 055:
case 056:
case 057:
case 060:
case 061:
696 case 062:
case 063:
case 064:
case 065:
case 066:
case 067:
697 case 070:
case 071:
case 072:
case 073:
case 074:
case 075:
698 case 076:
case 077:
case 0100:
case 0101:
case 0102:
case 0103:
699 case 0104:
case 0105:
case 0106:
case 0107:
case 0110:
case 0111:
700 case 0112:
case 0113:
case 0114:
case 0115:
case 0116:
case 0117:
701 case 0120:
case 0121:
case 0122:
case 0123:
case 0124:
case 0125:
702 case 0126:
case 0127:
case 0130:
case 0131:
case 0132:
case 0133:
703 case 0135:
case 0136:
case 0137:
case 0140:
case 0141:
case 0142:
704 case 0143:
case 0144:
case 0145:
case 0146:
case 0147:
case 0150:
705 case 0151:
case 0152:
case 0153:
case 0154:
case 0155:
case 0156:
706 case 0157:
case 0160:
case 0161:
case 0162:
case 0163:
case 0164:
707 case 0165:
case 0166:
case 0167:
case 0170:
case 0171:
case 0172:
708 case 0174:
case 0175:
case 0176:
762 quoted += quotedchar;
788 case 01:
case 02:
case 03:
case 04:
case 05:
case 06:
case 07:
789 case 010:
case 011:
case 013:
case 014:
case 016:
case 017:
790 case 020:
case 021:
case 022:
case 023:
case 024:
case 025:
case 026:
case 027:
791 case 030:
case 031:
case 032:
case 033:
case 034:
case 035:
case 036:
case 037:
792 case 040:
case 041:
case 043:
case 044:
case 045:
case 046:
case 047:
793 case 050:
case 051:
case 052:
case 053:
case 054:
case 055:
case 056:
case 057:
794 case 060:
case 061:
case 062:
case 063:
case 064:
case 065:
case 066:
case 067:
795 case 070:
case 071:
case 072:
case 073:
case 074:
case 075:
case 076:
case 077:
796 case 0100:
case 0101:
case 0102:
case 0103:
case 0104:
case 0105:
case 0106:
case 0107:
797 case 0110:
case 0111:
case 0112:
case 0113:
case 0114:
case 0115:
case 0116:
case 0117:
798 case 0120:
case 0121:
case 0122:
case 0123:
case 0124:
case 0125:
case 0126:
case 0127:
799 case 0130:
case 0131:
case 0132:
case 0133:
case 0135:
case 0136:
case 0137:
800 case 0140:
case 0141:
case 0142:
case 0143:
case 0144:
case 0145:
case 0146:
case 0147:
801 case 0150:
case 0151:
case 0152:
case 0153:
case 0154:
case 0155:
case 0156:
case 0157:
802 case 0160:
case 0161:
case 0162:
case 0163:
case 0164:
case 0165:
case 0166:
case 0167:
803 case 0170:
case 0171:
case 0172:
case 0173:
case 0174:
case 0175:
case 0176:
case 0177:
815 if (d ==
'\"' || d ==
'\\') {
852 bool literalPlus =
false;
869 bincClient <<
"+ ok, send " << nchar <<
" bytes of data." << endl;
873 for (
unsigned int i = 0; i < nchar; ++i) {
900 i_in = (i_in * 10) + n;
950 case '1': i_in = 1;
break;
951 case '2': i_in = 2;
break;
952 case '3': i_in = 3;
break;
953 case '4': i_in = 4;
break;
954 case '5': i_in = 5;
break;
955 case '6': i_in = 6;
break;
956 case '7': i_in = 7;
break;
957 case '8': i_in = 8;
break;
958 case '9': i_in = 9;
break;
976 unsigned int seqnum = (
unsigned int) -1;
992 unsigned int seqnum2 = (
unsigned int) -1;
1027 i_in = (
unsigned int) -1;
1049 i_in = (i_in * 10) + c;
const std::string & str(void) const
void addRange(unsigned int a_in, unsigned int b_in)
void addNumber(unsigned int a_in)
void setLastError(const std::string &error) const
static Session & getInstance(void)
Declaration of miscellaneous convertion functions.
Declaration of the common items for parsing IMAP input.
Declaration of the IODevice class.
Declaration of the IOFactory class.
Operator::ParseResult expectNumber(unsigned int &i_in)
Operator::ParseResult expectFlag(std::vector< std::string > &v_in)
Operator::ParseResult expectLF(void)
Operator::ParseResult expectTagChar(int &c_in)
Operator::ParseResult expectAtomChar(int &i_in)
Operator::ParseResult expectAstring(std::string &s_in)
Operator::ParseResult expectZone(std::string &s_in)
Operator::ParseResult expectString(std::string &s_in)
Operator::ParseResult expectSPACE(void)
Operator::ParseResult expectLiteral(std::string &s_in)
Operator::ParseResult expectTime(std::string &s_in)
Operator::ParseResult expectDigit(unsigned int &i_in)
Operator::ParseResult expectTag(std::string &s_in)
Operator::ParseResult expectThisString(const std::string &s_in)
Operator::ParseResult expectAtom(std::string &s_in)
Operator::ParseResult expectQuotedChar(int &c_in)
Operator::ParseResult expectListWildcards(int &c_in)
Operator::ParseResult expectCR(void)
Operator::ParseResult expectSequenceNum(unsigned int &i_in)
Operator::ParseResult expectDateTime(std::string &s_in)
Operator::ParseResult expectDigitNZ(unsigned int &i_in)
Operator::ParseResult expectQuoted(std::string &s_in)
Operator::ParseResult expectListMailbox(std::string &s_in)
Operator::ParseResult expectDate(std::string &s_in)
Operator::ParseResult expectNZNumber(unsigned int &i_in)
Operator::ParseResult expectSet(SequenceSet &s_in)
Operator::ParseResult expectCRLF(void)
std::stack< int > inputBuffer
Operator::ParseResult expectMailbox(std::string &s_in)
Declaration of a recursive descent IMAP command parser.