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