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

Method unsubscribeFolder

src/core/imap/MCIMAPSession.cpp:1697–1721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1695}
1696
1697void IMAPSession::unsubscribeFolder(String * folder, ErrorCode * pError)
1698{
1699 int r;
1700
1701 selectIfNeeded(MCSTR("INBOX"), pError);
1702 if (* pError != ErrorNone)
1703 return;
1704
1705 r = mailimap_unsubscribe(mImap, MCUTF8(folder));
1706 if (r == MAILIMAP_ERROR_STREAM) {
1707 mShouldDisconnect = true;
1708 * pError = ErrorConnection;
1709 return;
1710 }
1711 else if (r == MAILIMAP_ERROR_PARSE) {
1712 mShouldDisconnect = true;
1713 * pError = ErrorParse;
1714 return;
1715 }
1716 else if (hasError(r)) {
1717 * pError = ErrorSubscribe;
1718 return;
1719 }
1720 * pError = ErrorNone;
1721}
1722
1723void IMAPSession::appendMessage(String * folder, Data * messageData, MessageFlag flags,
1724 IMAPProgressCallback * progressCallback, uint32_t * createdUID, ErrorCode * pError)

Callers 1

mainMethod · 0.80

Calls 1

hasErrorFunction · 0.85

Tested by

no test coverage detected