X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sope-ical%2FNGiCal%2FNGVCardAddress.m;h=3cfc7b22b1fbde8c63c54da4efebc9c0140fb946;hb=eb3ec572d9fe1516cb59db8ed7712570249835fc;hp=227c07d3e619cd4a577a128c25886c3f61cba712;hpb=ecf5ee0a372035502881721ce3d18834cd3ebe6c;p=sope diff --git a/sope-ical/NGiCal/NGVCardAddress.m b/sope-ical/NGiCal/NGVCardAddress.m index 227c07d3..3cfc7b22 100644 --- a/sope-ical/NGiCal/NGVCardAddress.m +++ b/sope-ical/NGiCal/NGVCardAddress.m @@ -24,6 +24,37 @@ @implementation NGVCardAddress +- (id)initWithDictionary:(NSDictionary *)_plist group:(NSString *)_group + types:(NSArray *)_types arguments:(NSDictionary *)_a +{ + if ((self = [super initWithGroup:_group types:_types arguments:_a]) != nil) { + self->pobox = [[_plist objectForKey:@"pobox"] copy]; + self->extadd = [[_plist objectForKey:@"extadd"] copy]; + self->street = [[_plist objectForKey:@"street"] copy]; + self->locality = [[_plist objectForKey:@"locality"] copy]; + self->region = [[_plist objectForKey:@"region"] copy]; + self->pcode = [[_plist objectForKey:@"pcode"] copy]; + self->country = [[_plist objectForKey:@"country"] copy]; + } + return self; +} +- (id)initWithPropertyList:(id)_plist group:(NSString *)_group + types:(NSArray *)_types arguments:(NSDictionary *)_a +{ + return [self initWithDictionary:_plist + group:_group types:_types arguments:_a]; +} + +- (id)initWithGroup:(NSString *)_group types:(NSArray *)_types + arguments:(NSDictionary *)_a +{ + return [self initWithPropertyList:nil + group:_group types:_types arguments:_a]; +} +- (id)init { + return [self initWithPropertyList:nil group:nil types:nil arguments:nil]; +} + - (void)dealloc { [self->pobox release]; [self->extadd release]; @@ -172,4 +203,11 @@ return self; } +/* description */ + +- (void)appendAttributesToDescription:(NSMutableString *)_ms { + [super appendAttributesToDescription:_ms]; + [_ms appendFormat:@" vcard=%@", [self vCardString]]; +} + @end /* NGVCardAddress */