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

Function arrayFromSet

src/core/imap/MCIMAPSession.cpp:274–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272#pragma mark set conversion
273
274static Array * arrayFromSet(struct mailimap_set * imap_set)
275{
276 Array * result;
277 clistiter * iter;
278
279 result = Array::array();
280 for(iter = clist_begin(imap_set->set_list) ; iter != NULL ; iter = clist_next(iter)) {
281 struct mailimap_set_item * item;
282 unsigned long i;
283
284 item = (struct mailimap_set_item *) clist_content(iter);
285 for(i = item->set_first ; i <= item->set_last ; i ++) {
286 Value * nb;
287
288 nb = Value::valueWithUnsignedLongValue(i);
289 result->addObject(nb);
290 }
291 }
292
293 return result;
294}
295
296static clist * splitSet(struct mailimap_set * set, unsigned int splitCount)
297{

Callers 2

copyMessagesMethod · 0.85
moveMessagesMethod · 0.85

Calls 1

addObjectMethod · 0.45

Tested by

no test coverage detected