--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+
+ <key>CFBundleExecutable</key>
+ <string>Cydia</string>
+
+ <key>CFBundleIdentifier</key>
+ <string>com.saurik.Cydia</string>
+
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+
+ <key>CFBundleName</key>
+ <string>Cydia</string>
+
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+
+ <key>CFBundleShortVersionString</key>
+ <string>0.9</string>
+
+ <key>CFBundleSignature</key>
+ <string>????</string>
+
+ <key>CFBundleVersion</key>
+ <string>0.9</string>
+</dict>
+
+</plist>
static NSMutableDictionary *Packages_;
static NSDate *now_;
+NSString *GetLastUpdate() {
+ NSDate *update = [Metadata_ objectForKey:@"LastUpdate"];
+
+ if (update == nil)
+ return @"Never or Unknown";
+
+ CFLocaleRef locale = CFLocaleCopyCurrent();
+ CFDateFormatterRef formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterMediumStyle, kCFDateFormatterMediumStyle);
+ CFStringRef formatted = CFDateFormatterCreateStringWithDate(NULL, formatter, (CFDateRef) update);
+
+ CFRelease(formatter);
+ CFRelease(formatted);
+ CFRelease(locale);
+
+ return [(NSString *) formatted autorelease];
+}
+
@protocol ProgressDelegate
- (void) setError:(NSString *)error;
- (void) setTitle:(NSString *)title;
}
- (void) setPrompt {
- NSDate *update = [Metadata_ objectForKey:@"LastUpdate"];
-
- CFLocaleRef locale = CFLocaleCopyCurrent();
- CFDateFormatterRef formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterMediumStyle, kCFDateFormatterMediumStyle);
- CFStringRef formatted = CFDateFormatterCreateStringWithDate(NULL, formatter, (CFDateRef) update);
-
- [navbar_ setPrompt:[NSString stringWithFormat:@"Last Updated: %@", (NSString *) formatted]];
-
- CFRelease(formatter);
- CFRelease(formatted);
- CFRelease(locale);
+ [navbar_ setPrompt:[NSString stringWithFormat:@"Last Updated: %@", GetLastUpdate()]];
}
@end
NSString *tagline_;
NSString *icon_;
NSString *bundle_;
+ NSString *website_;
}
- (void) dealloc;
- (NSString *) tagline;
- (NSString *) icon;
- (NSString *) bundle;
+- (NSString *) website;
- (BOOL) matches:(NSString *)text;
bundle_ = Scour("Bundle", begin, end);
if (bundle_ != nil)
bundle_ = [bundle_ retain];
+ website_ = Scour("Website", begin, end);
+ if (website_ != nil)
+ website_ = [website_ retain];
NSMutableDictionary *metadata = [Packages_ objectForKey:id_];
if (metadata == nil) {
return bundle_;
}
+- (NSString *) website {
+ return website_;
+}
+
- (BOOL) matches:(NSString *)text {
if (text == nil)
return NO;
}
- (void) setPrompt {
- NSDate *update = [Metadata_ objectForKey:@"LastUpdate"];
-
- CFLocaleRef locale = CFLocaleCopyCurrent();
- CFDateFormatterRef formatter = CFDateFormatterCreate(NULL, locale, kCFDateFormatterMediumStyle, kCFDateFormatterMediumStyle);
- CFStringRef formatted = CFDateFormatterCreateStringWithDate(NULL, formatter, (CFDateRef) update);
-
- [navbar_ setPrompt:[NSString stringWithFormat:@"Last Updated: %@", (NSString *) formatted]];
-
- CFRelease(formatter);
- CFRelease(formatted);
- CFRelease(locale);
+ [navbar_ setPrompt:[NSString stringWithFormat:@"Last Updated: %@", GetLastUpdate()]];
}
- (void) resolve {
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>en</string>
-
- <key>CFBundleExecutable</key>
- <string>Cydia</string>
-
- <key>CFBundleIdentifier</key>
- <string>com.saurik.Cydia</string>
-
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
-
- <key>CFBundleName</key>
- <string>Cydia</string>
-
- <key>CFBundlePackageType</key>
- <string>APPL</string>
-
- <key>CFBundleShortVersionString</key>
- <string>0.9</string>
-
- <key>CFBundleSignature</key>
- <string>????</string>
-
- <key>CFBundleVersion</key>
- <string>0.9</string>
-</dict>
-
-</plist>