MCPcopy Create free account
hub / github.com/MailCore/mailcore2 / customCommand

Method customCommand

src/core/imap/MCIMAPSession.cpp:1114–1140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1112}
1113
1114String * 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
1142void IMAPSession::select(String * folder, ErrorCode * pError)
1143{

Callers

nothing calls this directly

Calls 1

hasErrorFunction · 0.85

Tested by

no test coverage detected