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 __NGHttp_NGHttpHeaderFields_H__
23 #define __NGHttp_NGHttpHeaderFields_H__
25 #import <Foundation/NSObject.h>
27 @class NSString, NSHost, NSDate, NSDictionary;
28 @class NGInternetSocketAddress;
31 Value field that occures in the HTTP 'Host' header field.
32 Looks like this: 'Host: trex@skyrix.com:80'
34 @interface NGHttpHostHeaderField : NSObject
41 - (id)initWithString:(NSString *)_value;
45 - (NSString *)hostName;
48 // advanced conversions
50 - (NGInternetSocketAddress *)socketAddress;
55 - (NSString *)stringValue;
60 Value field that occures in the HTTP 'accept-charset' header field.
61 Looks like this: 'accept-charset: iso-8859-1,*,utf-8'
63 @interface NGHttpCharsetHeaderField : NSObject
66 BOOL containsWildcard;
69 - (id)initWithArray:(NSArray *)_charsetArray;
70 - (id)initWithString:(NSString *)_value;
74 - (NSEnumerator *)charsets;
75 - (BOOL)containsCharset:(NSString *)_setName;
80 Value field that occures in the HTTP 'accept' header field.
81 Looks like this: 'accept: image/gif, image/x-xbitmap, image/jpeg, wildcard'
83 @interface NGHttpTypeSetHeaderField : NSObject
88 - (id)initWithArray:(NSArray *)_typeArray;
92 - (NSEnumerator *)types;
93 - (BOOL)containsMimeType:(NGMimeType *)_type;
98 Value field that occures in the HTTP 'accept-language' header field.
100 @interface NGHttpLanguageSetHeaderField : NSObject
105 - (id)initWithArray:(NSArray *)_langArray;
109 - (NSEnumerator *)languages;
110 - (BOOL)containsLanguage:(NSString *)_language;
115 Value field that occures in the HTTP 'user-agent' header field.
116 Looks like this: 'user-agent: Mozilla/4.5b2 [en] '
118 @interface NGHttpUserAgent : NSObject
127 - (id)initWithString:(NSString *)_value;
132 - (BOOL)isInternetExplorer;
139 Value field that occures in the HTTP 'connection' header field.
140 Looks like this: 'connection: Keep-Alive'
142 @interface NGHttpConnectionHeaderField : NSObject
150 - (id)initWithString:(NSString *)_value;
159 Value field that occures in the HTTP 'authorization' header field.
160 Looks like this: 'authorization: Basic aGVsZ2U6ZG9vZg=='
163 @interface NGHttpCredentials : NSObject
169 + (id)credentialsWithString:(NSString *)_cred;
170 + (id)credentialsWithScheme:(NSString *)_scheme
171 credentials:(NSData *)_credentials;
175 - (NSString *)scheme;
176 - (NSData *)credentials;
178 - (NSString *)userName;
179 - (NSString *)password;
183 - (NSString *)stringValue;
188 Value field that occures in the HTTP 'www-authenticate' header field.
189 Looks like this: 'www-authorization: Basic realm="SKYRIX"'
191 @interface NGHttpChallenge : NSObject
194 NSDictionary *parameters;
197 + (id)basicChallengeWithRealm:(NSString *)_realm;
198 - (id)initWithScheme:(NSString *)_scheme realm:(NSString *)_realm;
202 - (NSString *)scheme;
204 - (void)setRealm:(NSString *)_realm;
209 - (NSString *)stringValue;
213 #endif /* __NGHttp_NGHttpHeaderFields_H__ */