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

Function indexSetFromSet

src/core/imap/MCIMAPSession.cpp:347–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347static IndexSet * indexSetFromSet(struct mailimap_set * imap_set)
348{
349 IndexSet * indexSet = IndexSet::indexSet();
350 for(clistiter * cur = clist_begin(imap_set->set_list) ; cur != NULL ; cur = clist_next(cur)) {
351 struct mailimap_set_item * item = (struct mailimap_set_item *) clist_content(cur);
352 if (item->set_last == 0) {
353 indexSet->addRange(RangeMake(item->set_first, UINT64_MAX));
354 }
355 else {
356 indexSet->addRange(RangeMake(item->set_first, item->set_last - item->set_first));
357 }
358 }
359 return indexSet;
360}
361
362void IMAPSession::init()
363{

Callers 1

fetchMessagesMethod · 0.85

Calls 1

addRangeMethod · 0.45

Tested by

no test coverage detected