3 @implementation JubConfig
4 @synthesize domain, server;
8 - initWithFile: (OFString*)file
13 OFAutoreleasePool *pool = [OFAutoreleasePool new];
14 OFXMLElement *element = [OFXMLElement elementWithFile: file];
16 if (![element.name isEqual: @"config"] ||
17 ![element.namespace isEqual: CONFIG_NS]) {
18 // TODO: load default config
23 // TODO: Add error handling for missing elements
24 of_log(@"Parsed file: %@", element);
26 elementForName: @"domain"
27 namespace: CONFIG_NS] stringValue] copy];
29 elementForName: @"server"
30 namespace: CONFIG_NS] stringValue] copy];
32 elementForName: @"username"
33 namespace: CONFIG_NS] stringValue] copy];
35 elementForName: @"password"
36 namespace: CONFIG_NS] stringValue] copy];