summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2014-06-11 20:55:05 -0700
committerJay Freeman (saurik) <saurik@saurik.com>2014-06-11 20:55:05 -0700
commit10387810f98418edacf59804f0b87073e2c19c58 (patch)
treedf637dbd4b2e88186a0eaa3315d262255926dc8b
parent77259cabd44ffd6578831c9fca3d05e8de4f6761 (diff)
Use consistent "desc" name for ItemDesc parameter.
-rw-r--r--Cydia/ProgressEvent.h2
-rw-r--r--MobileCydia.mm32
2 files changed, 17 insertions, 17 deletions
diff --git a/Cydia/ProgressEvent.h b/Cydia/ProgressEvent.h
index 3ee3097..1b2bae0 100644
--- a/Cydia/ProgressEvent.h
+++ b/Cydia/ProgressEvent.h
@@ -40,7 +40,7 @@
+ (CydiaProgressEvent *) eventWithMessage:(NSString *)message ofType:(NSString *)type;
+ (CydiaProgressEvent *) eventWithMessage:(NSString *)message ofType:(NSString *)type forPackage:(NSString *)package;
-+ (CydiaProgressEvent *) eventWithMessage:(NSString *)message ofType:(NSString *)type forItem:(pkgAcquire::ItemDesc &)item;
++ (CydiaProgressEvent *) eventWithMessage:(NSString *)message ofType:(NSString *)type forItemDesc:(pkgAcquire::ItemDesc &)desc;
- (id) initWithMessage:(NSString *)message ofType:(NSString *)type;
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 9b7e9cb..e64b7fb 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -988,8 +988,8 @@ class CancelStatus :
return false;
}
- virtual void IMSHit(pkgAcquire::ItemDesc &item) {
- Done(item);
+ virtual void IMSHit(pkgAcquire::ItemDesc &desc) {
+ Done(desc);
}
virtual bool Pulse_(pkgAcquire *Owner) = 0;
@@ -1025,30 +1025,30 @@ class CydiaStatus :
delegate_ = delegate;
}
- virtual void Fetch(pkgAcquire::ItemDesc &item) {
- NSString *name([NSString stringWithUTF8String:item.ShortDesc.c_str()]);
- CydiaProgressEvent *event([CydiaProgressEvent eventWithMessage:[NSString stringWithFormat:UCLocalize("DOWNLOADING_"), name] ofType:kCydiaProgressEventTypeStatus forItem:item]);
+ virtual void Fetch(pkgAcquire::ItemDesc &desc) {
+ NSString *name([NSString stringWithUTF8String:desc.ShortDesc.c_str()]);
+ CydiaProgressEvent *event([CydiaProgressEvent eventWithMessage:[NSString stringWithFormat:UCLocalize("DOWNLOADING_"), name] ofType:kCydiaProgressEventTypeStatus forItemDesc:desc]);
[delegate_ performSelectorOnMainThread:@selector(addProgressEvent:) withObject:event waitUntilDone:YES];
}
- virtual void Done(pkgAcquire::ItemDesc &item) {
- NSString *name([NSString stringWithUTF8String:item.ShortDesc.c_str()]);
- CydiaProgressEvent *event([CydiaProgressEvent eventWithMessage:[NSString stringWithFormat:Colon_, UCLocalize("DONE"), name] ofType:kCydiaProgressEventTypeStatus forItem:item]);
+ virtual void Done(pkgAcquire::ItemDesc &desc) {
+ NSString *name([NSString stringWithUTF8String:desc.ShortDesc.c_str()]);
+ CydiaProgressEvent *event([CydiaProgressEvent eventWithMessage:[NSString stringWithFormat:Colon_, UCLocalize("DONE"), name] ofType:kCydiaProgressEventTypeStatus forItemDesc:desc]);
[delegate_ performSelectorOnMainThread:@selector(addProgressEvent:) withObject:event waitUntilDone:YES];
}
- virtual void Fail(pkgAcquire::ItemDesc &item) {
+ virtual void Fail(pkgAcquire::ItemDesc &desc) {
if (
- item.Owner->Status == pkgAcquire::Item::StatIdle ||
- item.Owner->Status == pkgAcquire::Item::StatDone
+ desc.Owner->Status == pkgAcquire::Item::StatIdle ||
+ desc.Owner->Status == pkgAcquire::Item::StatDone
)
return;
- std::string &error(item.Owner->ErrorText);
+ std::string &error(desc.Owner->ErrorText);
if (error.empty())
return;
- CydiaProgressEvent *event([CydiaProgressEvent eventWithMessage:[NSString stringWithUTF8String:error.c_str()] ofType:kCydiaProgressEventTypeError forItem:item]);
+ CydiaProgressEvent *event([CydiaProgressEvent eventWithMessage:[NSString stringWithUTF8String:error.c_str()] ofType:kCydiaProgressEventTypeError forItemDesc:desc]);
[delegate_ performSelectorOnMainThread:@selector(addProgressEvent:) withObject:event waitUntilDone:YES];
}
@@ -1220,10 +1220,10 @@ class SourceStatus :
return event;
}
-+ (CydiaProgressEvent *) eventWithMessage:(NSString *)message ofType:(NSString *)type forItem:(pkgAcquire::ItemDesc &)item {
++ (CydiaProgressEvent *) eventWithMessage:(NSString *)message ofType:(NSString *)type forItemDesc:(pkgAcquire::ItemDesc &)desc {
CydiaProgressEvent *event([self eventWithMessage:message ofType:type]);
- NSString *description([NSString stringWithUTF8String:item.Description.c_str()]);
+ NSString *description([NSString stringWithUTF8String:desc.Description.c_str()]);
NSArray *fields([description componentsSeparatedByString:@" "]);
[event setItem:fields];
@@ -1232,7 +1232,7 @@ class SourceStatus :
[event setVersion:[fields objectAtIndex:3]];
}
- [event setURL:[NSString stringWithUTF8String:item.URI.c_str()]];
+ [event setURL:[NSString stringWithUTF8String:desc.URI.c_str()]];
return event;
}