From 10387810f98418edacf59804f0b87073e2c19c58 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 11 Jun 2014 20:55:05 -0700 Subject: [PATCH] Use consistent "desc" name for ItemDesc parameter. --- Cydia/ProgressEvent.h | 2 +- MobileCydia.mm | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Cydia/ProgressEvent.h b/Cydia/ProgressEvent.h index 3ee3097d..1b2bae09 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 9b7e9cbf..e64b7fbf 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; } -- 2.45.2