- (Source *) getSource:(pkgCache::PkgFileIterator)file;
- (void) setFetch:(bool)fetch forURI:(const char *)uri;
+- (void) resetFetch;
- (NSString *) mappedSectionForPointer:(const char *)pointer;
} else (*item)->ID = 0;
return ![delegate_ isSourceCancelled];
}
+
+ virtual void Stop() {
+ pkgAcquireStatus::Stop();
+ [database_ resetFetch];
+ }
};
/* }}} */
/* ProgressEvent Implementation {{{ */
- (NSURL *) iconURL;
- (void) setFetch:(bool)fetch forURI:(const char *)uri;
+- (void) resetFetch;
@end
[delegate_ performSelectorOnMainThread:@selector(setFetch:) withObject:[NSNumber numberWithBool:[self fetch]] waitUntilDone:NO];
}
+- (void) resetFetch {
+ fetches_.clear();
+ [delegate_ performSelectorOnMainThread:@selector(setFetch:) withObject:[NSNumber numberWithBool:NO] waitUntilDone:NO];
+}
+
@end
/* }}} */
/* CydiaOperation Class {{{ */
[source setFetch:fetch forURI:uri];
}
+- (void) resetFetch {
+ for (Source *source in (id) sourceList_)
+ [source resetFetch];
+}
+
- (NSString *) mappedSectionForPointer:(const char *)section {
_H<NSString> *mapped;
_H<UIProgressHUD> hud_;
_H<NSError> error_;
- //NSURLConnection *installer_;
NSURLConnection *trivial_bz2_;
NSURLConnection *trivial_gz_;
- //NSURLConnection *automatic_;
BOOL cydia_;
}
}
- (void) dealloc {
- //[self _releaseConnection:installer_];
[self _releaseConnection:trivial_gz_];
[self _releaseConnection:trivial_bz2_];
- //[self _releaseConnection:automatic_];
[super dealloc];
}
case 1: {
NSString *href = [[alert textField] text];
- //installer_ = [[self _requestHRef:href method:@"GET"] retain];
-
if (![href hasSuffix:@"/"])
href_ = [href stringByAppendingString:@"/"];
else
trivial_bz2_ = [[self _requestHRef:[href_ stringByAppendingString:@"Packages.bz2"] method:@"HEAD"] retain];
trivial_gz_ = [[self _requestHRef:[href_ stringByAppendingString:@"Packages.gz"] method:@"HEAD"] retain];
- //trivial_bz2_ = [[self _requestHRef:[href stringByAppendingString:@"dists/Release"] method:@"HEAD"] retain];
cydia_ = false;