]> err.no Git - scalable-opengroupware.org/blob - SOPE/NGCards/NGCardsSaxHandler.h
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1178 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / SOPE / NGCards / NGCardsSaxHandler.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_NGCardsSaxHandler_H__
23 #define __NGiCal_NGCardsSaxHandler_H__
24
25 #include <SaxObjC/SaxDefaultHandler.h>
26
27 /*
28   NGCardsSaxHandler
29   
30   This SAX handler is supposed to create the NGiCal object model from SAX
31   events.
32 */
33
34 @class NSString, NSMutableString, NSMutableArray;
35 @class NSDictionary, NSMutableDictionary;
36
37 @class CardElement;
38 @class CardGroup;
39
40 @interface NGCardsSaxHandler : SaxDefaultHandler
41 {
42   NSMutableArray *cards;
43   CardElement *currentElement;
44   CardGroup *currentCardGroup;
45
46   NSString *currentGroup;
47   unichar  *content;
48   unsigned contentLength;
49
50   NSMutableDictionary *xtags;
51   NSMutableDictionary *subvalues;
52   NSMutableArray      *types;
53   NSMutableDictionary *args;
54   NSMutableArray      *tel;
55   NSMutableArray      *adr;
56   NSMutableArray      *email;
57   NSMutableArray      *label;
58   NSMutableArray      *url;
59   NSMutableArray      *fburl;
60   NSMutableArray      *caluri;
61   
62   struct {
63     int isInVCardSet:1;
64     int isInVCard:1;
65     int isInN:1;
66     int isInAdr:1;
67     int isInOrg:1;
68     int isInGroup:1;
69     int isInGeo:1;
70     int collectContent:1;
71     int reserved:24;
72   } vcs;
73
74   Class topGroupClass;
75 }
76
77 /* results */
78
79 - (NSArray *) cards;
80 - (void)reset;
81
82 /* content */
83
84 - (void) startCollectingContent;
85 - (NSArray *) finishCollectingContent;
86
87 - (void) startGroupElement: (NSString *) _localName;
88 - (void) endGroupElement;
89
90 - (void) setTopElementClass: (Class) aGroupClass;
91
92 @end
93
94 #endif /* __NGiCal_NGCardsSaxHandler_H__ */