]> err.no Git - sope/blob - sope-appserver/NGObjWeb/WebDAV/SaxDAVHandler.h
reverted gstep-base workaround (fixed in gstep-base svn trunk), bumped framework...
[sope] / sope-appserver / NGObjWeb / WebDAV / SaxDAVHandler.h
1 /*
2   Copyright (C) 2002-2005 SKYRIX Software AG
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 __NGObjWeb_SaxDAVHandler_H__
23 #define __NGObjWeb_SaxDAVHandler_H__
24
25 #include <SaxObjC/SaxDefaultHandler.h>
26
27 /*
28   A SAX handler to parse WebDAV requests ...
29   
30   The delegate is used to parse (potentially long) responses.
31 */
32
33 @class NSMutableString, NSMutableArray, NSArray, NSString, NSMutableDictionary;
34 @class EOFetchSpecification;
35
36 @interface SaxDAVHandler : SaxDefaultHandler
37 {
38   id<NSObject,SaxLocator> locator;
39   id delegate; /* non-retained */
40   
41   /* results */
42   NSMutableArray *propNames;
43   BOOL           findAllProps;
44   BOOL           findPropNames;
45   NSMutableArray *responses;
46   NSString       *searchSQL;
47   NSMutableDictionary *propSet;
48   EOFetchSpecification *fspec;
49   
50   /* state */
51   id              response;
52   NSMutableString *cdata;
53   BOOL            ascending;
54   NSString        *lastLiteral;
55   NSString        *lastWherePropName;
56   NSString        *lastScopeHref;
57   NSString        *lastScopeDepth;
58   NSString        *lastHref;
59   NSMutableArray  *targets;
60   int             propValueNesting;
61   NSMutableArray  *qualifiers;
62   NSMutableArray  *compoundQualStack;
63   
64   /* active tags */
65   struct {
66     BOOL PropFind:1;
67     BOOL Response:1;
68     BOOL MultiStatus:1;
69     BOOL Href:1;
70     BOOL Status:1;
71     BOOL Prop:1;
72     BOOL PropStat:1;
73     BOOL PropertyUpdate:1;
74     BOOL Set:1;
75     BOOL Remove:1;
76     /* bulk */
77     BOOL target:1;
78     /* DASL */
79     BOOL SearchRequest:1;
80     BOOL SQL:1;
81     BOOL basicsearch:1;
82     BOOL select:1;
83     BOOL from:1;
84     BOOL scope:1;
85     BOOL depth:1;
86     BOOL where:1;
87     BOOL gt:1;
88     BOOL lt:1;
89     BOOL gte:1;
90     BOOL lte:1;
91     BOOL eq:1;
92     BOOL literal:1;
93     BOOL orderby:1;
94     BOOL order:1;
95     BOOL ascending:1;
96     BOOL like:1;
97   } in;
98 }
99
100 /* accessors */
101
102 - (void)setDelegate:(id)_delegate;
103 - (id)delegate;
104
105 /* cleanup */
106
107 - (void)reset;
108
109 /* propfind results */
110
111 - (BOOL)propFindAllProperties;
112 - (BOOL)propFindPropertyNames;
113 - (NSArray *)propFindQueriedNames;
114 - (NSArray *)bpropFindTargets;
115
116 /* proppatch results */
117
118 - (NSArray *)propPatchPropertyNamesToRemove;
119 - (NSDictionary *)propPatchValues;
120
121 /* search query results */
122
123 - (EOFetchSpecification *)searchFetchSpecification;
124
125 @end
126
127 @interface NSObject(SaxDAVHandlerDelegate)
128
129 - (void)davHandler:(SaxDAVHandler *)_handler
130   receivedProperties:(NSDictionary *)_record
131   forURI:(NSString *)_uri;
132
133 @end
134
135 #endif /* __NGObjWeb_SaxDAVHandler_H__ */