diff options
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 249f6f0..5ff7013 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -2360,6 +2360,7 @@ struct PackageNameOrdering : @"purposes", @"relations", @"section", + @"selection", @"shortDescription", @"shortSection", @"simpleSection", @@ -2944,6 +2945,27 @@ struct PackageNameOrdering : return (NSString *) [NSNull null]; } } +- (NSString *) selection { +@synchronized (database_) { + if ([database_ era] != era_ || file_.end()) + return nil; + + switch (iterator_->SelectedState) { + case pkgCache::State::Unknown: + return @"Unknown"; + case pkgCache::State::Install: + return @"Install"; + case pkgCache::State::Hold: + return @"Hold"; + case pkgCache::State::DeInstall: + return @"DeInstall"; + case pkgCache::State::Purge: + return @"Purge"; + } + + return (NSString *) [NSNull null]; +} } + - (NSArray *) warnings { NSMutableArray *warnings([NSMutableArray arrayWithCapacity:4]); const char *name(iterator_.Name()); |