void ResourceHandle::unschedule(SchedulePair& pair) { CFRunLoopRef runLoop = pair.runLoop(); if (!runLoop) return; CFURLConnectionUnscheduleFromRunLoop(d->m_connection.get(), runLoop, pair.mode()); }
bool SchedulePair::operator==(const SchedulePair& other) const { if (runLoop() != other.runLoop()) return false; CFStringRef thisMode = mode(); CFStringRef otherMode = other.mode(); if (!thisMode || !otherMode) return thisMode == otherMode; return CFEqual(thisMode, otherMode); }
void ResourceHandle::schedule(SchedulePair& pair) { CFRunLoopRef runLoop = pair.runLoop(); if (!runLoop) return; CFURLConnectionScheduleWithRunLoop(d->m_connection.get(), runLoop, pair.mode()); if (d->m_startWhenScheduled) { CFURLConnectionStart(d->m_connection.get()); d->m_startWhenScheduled = false; } }