2 Copyright (C) 2005 Helge Hess
4 This file is part of SOPE.
6 SOPE is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __NGiCal_NGVCard_H__
23 #define __NGiCal_NGVCard_H__
25 #import <Foundation/NSObject.h>
30 Represents a vCard object.
32 XML DTD in Dawson-03 Draft:
33 <!ELEMENT vCard (%prop.man;, (%prop.opt;)*)>
38 'http://www.ietf.org/internet-drafts/draft-dawson-vcard-xml-dtd-02.txt'
39 xmlns:vcf CDATA #FIXED
40 'http://www.ietf.org/internet-drafts/draft-dawson-vcard-xml-dtd-02.txt'
41 version CDATA #REQUIRED
45 class (PUBLIC | PRIVATE | CONFIDENTIAL) "PUBLIC"
46 value NOTATION (VCARD) #IMPLIED>
47 <!-- version - Must be "3.0" if document conforms to this spec -->
48 <!-- rev - ISO 8601 formatted date or date/time string -->
49 <!-- uid - UID associated with the object described by the vCard -->
50 <!-- prodid - ISO 9070 FPI for product that generated vCard -->
51 <!-- class - Security classification for vCard information -->
58 @class NSString, NSArray, NSDictionary;
59 @class NGVCardStrArrayValue, NGVCardOrg, NGVCardName, NGVCardSimpleValue;
60 @class NGVCardPhone, NGVCardAddress;
62 @interface NGVCard : NSObject
71 // TODO: 'rev' (datetime)
82 NGVCardStrArrayValue *nickname;
83 NGVCardStrArrayValue *categories;
95 + (NSArray *)parseVCardsFromSource:(id)_src;
97 - (id)initWithUid:(NSString *)_uid version:(NSString *)_version;
101 - (NSString *)version;
103 - (void)setUid:(NSString *)_uid;
106 - (void)setVClass:(NSString *)_s;
107 - (NSString *)vClass;
108 - (void)setVName:(NSString *)_s;
110 - (void)setProdID:(NSString *)_s;
111 - (NSString *)prodID;
112 - (void)setProfile:(NSString *)_s;
113 - (NSString *)profile;
114 - (void)setSource:(NSString *)_s;
115 - (NSString *)source;
117 - (void)setFn:(NSString *)_fn;
119 - (void)setRole:(NSString *)_s;
121 - (void)setTitle:(NSString *)_title;
123 - (void)setBday:(NSString *)_bday;
125 - (void)setNote:(NSString *)_note;
128 - (void)setN:(NGVCardName *)_v;
130 - (void)setOrg:(NGVCardOrg *)_v;
133 - (void)setNickname:(id)_v;
134 - (NGVCardStrArrayValue *)nickname;
135 - (void)setCategories:(id)_v;
136 - (NGVCardStrArrayValue *)categories;
138 - (void)setTel:(NSArray *)_tel;
140 - (void)setAdr:(NSArray *)_adr;
142 - (void)setEmail:(NSArray *)_array;
144 - (void)setLabel:(NSArray *)_array;
146 - (void)setUrl:(NSArray *)_url;
149 - (void)setFreeBusyURL:(NSArray *)_v;
150 - (NSArray *)freeBusyURL;
151 - (void)setCalURI:(NSArray *)_calURI;
154 - (void)setX:(NSDictionary *)_dict;
159 - (NGVCardSimpleValue *)preferredEMail;
160 - (NGVCardPhone *)preferredTel;
161 - (NGVCardAddress *)preferredAdr;
165 #endif /* __NGiCal_NGVCard_H__ */