]> err.no Git - sope/blob - sope-appserver/NGObjWeb/NGHttp/NGHttpRequest.h
fixed makefiles to search FHS locations at the last resort
[sope] / sope-appserver / NGObjWeb / NGHttp / NGHttpRequest.h
1 /*
2   Copyright (C) 2000-2004 SKYRIX Software AG
3
4   This file is part of OpenGroupware.org.
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 __NGHttp_NGHttpRequest_H__
24 #define __NGHttp_NGHttpRequest_H__
25
26 #import "NGHttpMessage.h"
27
28 @class NSString;
29
30 typedef enum {
31   NGHttpMethod_unknown = 0,
32   NGHttpMethod_OPTIONS = 1,
33   NGHttpMethod_GET,
34   NGHttpMethod_HEAD,
35   NGHttpMethod_POST,
36   NGHttpMethod_PUT,
37   NGHttpMethod_PATCH,
38   NGHttpMethod_COPY,
39   NGHttpMethod_MOVE,
40   NGHttpMethod_DELETE,
41   NGHttpMethod_LINK,
42   NGHttpMethod_UNLINK,
43   NGHttpMethod_TRACE,
44   NGHttpMethod_WRAPPED,
45   NGHttpMethod_CONNECT,
46   NGHttpMethod_PROPFIND,
47   NGHttpMethod_PROPPATCH,
48   NGHttpMethod_MKCOL,
49   NGHttpMethod_LOCK,
50   NGHttpMethod_UNLOCK,
51   /* Exchange Ext Methods */
52   NGHttpMethod_SEARCH, 
53   NGHttpMethod_SUBSCRIBE,
54   NGHttpMethod_UNSUBSCRIBE,
55   NGHttpMethod_NOTIFY,
56   NGHttpMethod_POLL,
57   /* Exchange Bulk Methods */
58   NGHttpMethod_BCOPY,
59   NGHttpMethod_BDELETE,
60   NGHttpMethod_BMOVE,
61   NGHttpMethod_BPROPFIND,
62   NGHttpMethod_BPROPPATCH,
63   NGHttpMethod_last
64 } NGHttpMethod;
65
66 NGHttpMethod NGHttpMethodFromString(NSString *_value);
67
68 @interface NGHttpRequest : NGHttpMessage
69 {
70   NGHttpMethod method;
71   NSString     *uri;
72   NGHashMap    *uriParameters;
73 }
74
75 - (id)initWithMethod:(NSString *)_methodName uri:(NSString *)_uri
76   header:(NGHashMap *)_header version:(NSString *)_version;
77
78 /* accessors */
79
80 - (NGHttpMethod)method;
81 - (NSString *)methodName;
82 - (NSString *)uri;
83
84 - (NGHashMap *)uriParameters; // parameters in x-www-form-urlencoded encoding
85
86 @end
87
88 #endif /* __NGHttp_NGHttpRequest_H__ */