status_t Protocol::GetQuota(uint64& used, uint64& total) { if (!Capabilities().Contains("QUOTA")) return B_ERROR; GetQuotaCommand quotaCommand; status_t status = ProcessCommand(quotaCommand); if (status != B_OK) return status; used = quotaCommand.UsedStorage(); total = quotaCommand.TotalStorage(); return B_OK; }
status_t IMAPFolders::GetQuota(uint64& used, uint64& total) { if (fCapabilityHandler.Capabilities() == "") ProcessCommand(fCapabilityHandler.Command()); if (fCapabilityHandler.Capabilities().FindFirst("QUOTA") < 0) return B_ERROR; GetQuotaCommand quotaCommand; status_t status = ProcessCommand("aCommand); if (status != B_OK) return status; used = quotaCommand.UsedStorage(); total = quotaCommand.TotalStorage(); return B_OK; }