]> err.no Git - sope/blob - sope-ical/NGiCal/NGVCard.h
added some properties
[sope] / sope-ical / NGiCal / NGVCard.h
1 /*
2   Copyright (C) 2005 Helge Hess
3
4   This file is part of SOPE.
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21
22 #ifndef __NGiCal_NGVCard_H__
23 #define __NGiCal_NGVCard_H__
24
25 #import <Foundation/NSObject.h>
26
27 /*
28   NGVCard
29   
30   Represents a vCard object.
31
32   XML DTD in Dawson-03 Draft:
33     <!ELEMENT vCard      (%prop.man;, (%prop.opt;)*)>
34     
35     <!ATTLIST vCard
36             %attr.lang;
37             xmlns     CDATA #FIXED 
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
42             rev       CDATA #IMPLIED
43             uid       CDATA #IMPLIED
44             prodid    CDATA #IMPLIED
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 -->
52   
53   Mandatory elements:
54     n
55     fn
56 */
57
58 @class NSString, NSArray, NSDictionary;
59 @class NGVCardStrArrayValue, NGVCardOrg, NGVCardName;
60
61 @interface NGVCard : NSObject
62 {
63   NSString     *uid;
64   NSString     *version;
65   NSString     *vClass;
66   NSString     *prodID;
67   NSString     *profile;
68   NSString     *source;
69   NSString     *vName;
70   // TODO: 'rev' (datetime)
71
72   NSString     *fn;
73   NSString     *role;
74   NSString     *title;
75   NSString     *bday;
76   NSString     *note;
77
78   NGVCardName  *n;
79   NGVCardOrg   *org;
80   
81   NGVCardStrArrayValue *nickname;
82   NGVCardStrArrayValue *categories;
83   
84   NSArray      *tel;
85   NSArray      *adr;
86   NSArray      *email;
87   NSArray      *label;
88   NSArray      *url;
89   NSArray      *fburl;
90   NSArray      *caluri;
91   NSDictionary *x;
92 }
93
94 + (NSArray *)parseVCardsFromSource:(id)_src;
95
96 - (id)initWithUid:(NSString *)_uid version:(NSString *)_version;
97
98 /* accessors */
99
100 - (NSString *)version;
101
102 - (void)setUid:(NSString *)_uid;
103 - (NSString *)uid;
104
105 - (void)setVClass:(NSString *)_s;
106 - (NSString *)vClass;
107 - (void)setVName:(NSString *)_s;
108 - (NSString *)vName;
109 - (void)setProdID:(NSString *)_s;
110 - (NSString *)prodID;
111 - (void)setProfile:(NSString *)_s;
112 - (NSString *)profile;
113 - (void)setSource:(NSString *)_s;
114 - (NSString *)source;
115
116 - (void)setFn:(NSString *)_fn;
117 - (NSString *)fn;
118 - (void)setRole:(NSString *)_s;
119 - (NSString *)role;
120 - (void)setTitle:(NSString *)_title;
121 - (NSString *)title;
122 - (void)setBday:(NSString *)_bday;
123 - (NSString *)bday;
124 - (void)setNote:(NSString *)_note;
125 - (NSString *)note;
126
127 - (void)setN:(NGVCardName *)_v;
128 - (NGVCardName *)n;
129 - (void)setOrg:(NGVCardOrg *)_v;
130 - (NGVCardOrg *)org;
131
132 - (void)setNickname:(id)_v;
133 - (NGVCardStrArrayValue *)nickname;
134 - (void)setCategories:(id)_v;
135 - (NGVCardStrArrayValue *)categories;
136
137 - (void)setTel:(NSArray *)_tel;
138 - (NSArray *)tel;
139 - (void)setAdr:(NSArray *)_adr;
140 - (NSArray *)adr;
141 - (void)setEmail:(NSArray *)_array;
142 - (NSArray *)email;
143 - (void)setLabel:(NSArray *)_array;
144 - (NSArray *)label;
145 - (void)setUrl:(NSArray *)_url;
146 - (NSArray *)url;
147
148 - (void)setFreeBusyURL:(NSArray *)_v;
149 - (NSArray *)freeBusyURL;
150 - (void)setCalURI:(NSArray *)_calURI;
151 - (NSArray *)calURI;
152
153 - (void)setX:(NSDictionary *)_dict;
154 - (NSDictionary *)x;
155
156 @end
157
158 #endif /* __NGiCal_NGVCard_H__ */