summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm15
1 files changed, 15 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 38f6db1..8ffb37d 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -2118,6 +2118,8 @@ struct PackageNameOrdering :
return @"clear";
else if (selector == @selector(getField:))
return @"getField";
+ else if (selector == @selector(getRecord))
+ return @"getRecord";
else if (selector == @selector(hasTag:))
return @"hasTag";
else if (selector == @selector(install))
@@ -2202,6 +2204,19 @@ struct PackageNameOrdering :
return [NSString stringWithString:[(NSString *) CYStringCreate(start, end - start) autorelease]];
} }
+- (NSString *) getRecord {
+@synchronized (database_) {
+ if ([database_ era] != era_ || file_.end())
+ return nil;
+
+ pkgRecords::Parser &parser([database_ records]->Lookup(file_));
+
+ const char *start, *end;
+ parser.GetRec(start, end);
+
+ return [NSString stringWithString:[(NSString *) CYStringCreate(start, end - start) autorelease]];
+} }
+
- (void) parse {
if (parsed_ != NULL)
return;