]> err.no Git - sope/blobdiff - sope-ical/NGiCal/NGVCardName.m
minor changes to Xcode project layout
[sope] / sope-ical / NGiCal / NGVCardName.m
index b40d590d5f641bf3163ad47d67f48a3faacf5c28..897e2ac379c177cb5274337924b6cf4a16e31ec8 100644 (file)
 
 @implementation NGVCardName
 
+- (id)initWithPropertyList:(id)_plist group:(NSString *)_group 
+  types:(NSArray *)_types arguments:(NSDictionary *)_a
+{
+  if ((self = [super initWithGroup:_group types:_types arguments:_a]) != nil) {
+    self->family = [[_plist objectForKey:@"family"] copy];
+    self->given  = [[_plist objectForKey:@"given"]  copy];
+    self->other  = [[_plist objectForKey:@"other"]  copy];
+    self->prefix = [[_plist objectForKey:@"prefix"] copy];
+    self->suffix = [[_plist objectForKey:@"suffix"] copy];
+  }
+  return self;
+}
+
+- (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->family release];
   [self->given  release];
   return self;
 }
 
+/* description */
+
+- (void)appendAttributesToDescription:(NSMutableString *)_ms {
+  [super appendAttributesToDescription:_ms];
+  [_ms appendFormat:@" vcard=%@", [self vCardString]];
+}
+
 @end /* NGVCardName */