struct PackageValue :
Cytore::Block
{
- Cytore::Offset<void> reserved_;
Cytore::Offset<PackageValue> next_;
uint32_t index_ : 23;
struct MetaValue :
Cytore::Block
{
- Cytore::Offset<void> reserved_;
Cytore::Offset<PackageValue> packages_[1 << 16];
};
}
- (void) onSwitch:(id)sender {
- NSMutableDictionary *metadata = [Sections_ objectForKey:basic_];
+ NSMutableDictionary *metadata([Sections_ objectForKey:basic_]);
if (metadata == nil) {
metadata = [NSMutableDictionary dictionaryWithCapacity:2];
[Sections_ setObject:metadata forKey:basic_];
}
- Changed_ = true;
[metadata setObject:[NSNumber numberWithBool:([switch_ isOn] == NO)] forKey:@"Hidden"];
+ Changed_ = true;
}
- (void) setSection:(Section *)section editing:(BOOL)editing {
nil];
[Metadata_ setObject:Settings_ forKey:@"Settings"];
-
Changed_ = true;
if (rolling)
}
- (void) _saveConfig {
+ _trace();
+ MetaFile_.Sync();
+ _trace();
+
if (Changed_) {
- _trace();
NSString *error(nil);
+
if (NSData *data = [NSPropertyListSerialization dataFromPropertyList:Metadata_ format:NSPropertyListBinaryFormat_v1_0 errorDescription:&error]) {
_trace();
NSError *error(nil);
if (![data writeToFile:@"/var/lib/cydia/metadata.plist" options:NSAtomicWrite error:&error])
NSLog(@"failure to save metadata data: %@", error);
_trace();
+
+ Changed_ = false;
} else {
NSLog(@"failure to serialize metadata: %@", error);
- return;
}
-
- Changed_ = false;
}
}
}
- (void) applicationDidFinishLaunching:(id)unused {
+_trace();
[CYBrowserController _initialize];
[NSURLProtocol registerClass:[CydiaURLProtocol class]];