summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-03-09 22:31:20 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-03-09 22:31:20 -0800
commita412f357495af8daf737b00bbfd1923608b82f7d (patch)
tree6feaadac648287989994e14b6a8f2328fd89a624
parent9dd3045d98e3d2905f4b656c44b933a06fbe7736 (diff)
Add architecture field.
-rw-r--r--MobileCydia.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index fd5c1c4..ee6baeb 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -1790,6 +1790,7 @@ static void PackageImport(const void *key, const void *value, void *context) {
struct ParsedPackage {
CYString tagline_;
+ CYString architecture_;
CYString icon_;
CYString depiction_;
@@ -2082,6 +2083,7 @@ struct PackageNameOrdering :
+ (NSArray *) _attributeKeys {
return [NSArray arrayWithObjects:
@"applications",
+ @"architecture",
@"author",
@"depiction",
@"essential",
@@ -2128,6 +2130,12 @@ struct PackageNameOrdering :
return relations;
} }
+- (NSString *) architecture {
+ [self parse];
+@synchronized (database_) {
+ return parsed_->architecture_.empty() ? [NSNull null] : (id) parsed_->architecture_;
+} }
+
- (NSString *) getField:(NSString *)name {
@synchronized (database_) {
if ([database_ era] != era_ || file_.end())
@@ -2166,6 +2174,7 @@ struct PackageNameOrdering :
const char *name_;
CYString *value_;
} names[] = {
+ {"architecture", &parsed->architecture_},
{"icon", &parsed->icon_},
{"depiction", &parsed->depiction_},
{"homepage", &parsed->homepage_},