| 1112 | } |
| 1113 | |
| 1114 | String * IMAPSession::customCommand(String * command, ErrorCode * pError) |
| 1115 | { |
| 1116 | int r; |
| 1117 | |
| 1118 | loginIfNeeded(pError); |
| 1119 | if (* pError != ErrorNone) |
| 1120 | return NULL; |
| 1121 | |
| 1122 | r = mailimap_custom_command(mImap, MCUTF8(command)); |
| 1123 | if (r == MAILIMAP_ERROR_STREAM) { |
| 1124 | mShouldDisconnect = true; |
| 1125 | * pError = ErrorConnection; |
| 1126 | return NULL; |
| 1127 | } |
| 1128 | else if (r == MAILIMAP_ERROR_PARSE) { |
| 1129 | mShouldDisconnect = true; |
| 1130 | * pError = ErrorParse; |
| 1131 | return NULL; |
| 1132 | } |
| 1133 | else if (hasError(r)) { |
| 1134 | * pError = ErrorCustomCommand; |
| 1135 | return NULL; |
| 1136 | } |
| 1137 | |
| 1138 | String *response = String::stringWithUTF8Characters(mImap->imap_response); |
| 1139 | return response; |
| 1140 | } |
| 1141 | |
| 1142 | void IMAPSession::select(String * folder, ErrorCode * pError) |
| 1143 | { |
nothing calls this directly
no test coverage detected