| 1695 | } |
| 1696 | |
| 1697 | void 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 | |
| 1723 | void IMAPSession::appendMessage(String * folder, Data * messageData, MessageFlag flags, |
| 1724 | IMAPProgressCallback * progressCallback, uint32_t * createdUID, ErrorCode * pError) |