2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
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
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.
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
22 #ifndef __NGObjWeb_WORequest_H__
23 #define __NGObjWeb_WORequest_H__
25 #import <Foundation/NSString.h>
26 #include <NGObjWeb/WOMessage.h>
27 #include <NGObjWeb/NGObjWebDecls.h>
29 @class NSString, NSArray, NSData, NSDictionary, NSCalendarDate;
33 NGObjWeb_EXPORT NSString *WORequestValueData;
34 NGObjWeb_EXPORT NSString *WORequestValueInstance;
35 NGObjWeb_EXPORT NSString *WORequestValuePageName;
36 NGObjWeb_EXPORT NSString *WORequestValueContextID;
37 NGObjWeb_EXPORT NSString *WORequestValueSenderID;
38 NGObjWeb_EXPORT NSString *WORequestValueSessionID;
39 NGObjWeb_EXPORT NSString *WORequestValueFragmentID;
40 NGObjWeb_EXPORT NSString *WONoSelectionString;
42 @interface WORequest : WOMessage
45 NGHttpRequest *request; // NGHttp Request
46 id formContent; // FORM data (message content or URL paras)
53 NSString *adaptorPrefix;
55 NSString *requestHandlerKey;
56 NSString *requestHandlerPath;
59 NSCalendarDate *startDate;
63 - (id)initWithMethod:(NSString *)_method
65 httpVersion:(NSString *)_version
66 headers:(NSDictionary *)_headers
67 content:(NSData *)_body
68 userInfo:(NSDictionary *)_userInfo;
72 - (BOOL)isFromClientComponent;
74 - (NSString *)applicationName;
75 - (NSString *)adaptorPrefix;
81 - (BOOL)isProxyRequest; /* check whether uri is a full URL */
85 - (NSStringEncoding)formValueEncoding;
86 - (void)setDefaultFormValueEncoding:(NSStringEncoding)_enc;
87 - (NSStringEncoding)defaultFormValueEncoding;
88 - (void)setFormValueEncodingDetectionEnabled:(BOOL)_flag;
89 - (BOOL)isFormValueEncodingDetectionEnabled;
91 - (NSArray *)formValueKeys;
92 - (NSString *)formValueForKey:(NSString *)_key;
93 - (NSArray *)formValuesForKey:(NSString *)_key;
94 - (NSDictionary *)formValues;
98 - (NSArray *)browserLanguages; // new in WO4
100 /* request handler */
102 - (NSString *)requestHandlerKey; // new in WO4
103 - (NSString *)requestHandlerPath; // new in WO4
104 - (NSArray *)requestHandlerPathArray; // new in WO4
106 /* cookie support (new in WO4) */
108 - (NSArray *)cookieValuesForKey:(NSString *)_key;
109 - (NSString *)cookieValueForKey:(NSString *)_key;
110 - (NSDictionary *)cookieValues;
112 /* SOPE extensions */
114 - (NSString *)fragmentID;
115 - (BOOL)isFragmentIDInRequest;
119 #if COMPILING_NGOBJWEB
121 @interface WORequest(PrivateMethods)
123 - (NGHttpRequest *)httpRequest;
127 - (NGHashMap *)formParameters;
133 @interface WORequest(DeprecatedMethodsInWO4)
135 - (NSString *)applicationHost; // use NSProcessInfo and/or NSTask
136 - (NSString *)sessionID; // [[context session] sessionID]
137 - (NSString *)senderID; // replaced by WOContext:-senderID
138 - (NSString *)contextID; // use WOContext:-contextID
142 #endif /* __NGObjWeb_WORequest_H__ */