2 Copyright (C) 2000-2003 SKYRIX Software AG
4 This file is part of OGo
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
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.
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
23 #ifndef __NGHttp_NGHttpHeaderFields_H__
24 #define __NGHttp_NGHttpHeaderFields_H__
26 #import <Foundation/NSObject.h>
28 @class NSString, NSHost, NSDate, NSDictionary;
29 @class NGInternetSocketAddress;
32 Value field that occures in the HTTP 'Host' header field.
33 Looks like this: 'Host: trex@skyrix.com:80'
35 @interface NGHttpHostHeaderField : NSObject
42 - (id)initWithString:(NSString *)_value;
46 - (NSString *)hostName;
49 // advanced conversions
51 - (NGInternetSocketAddress *)socketAddress;
56 - (NSString *)stringValue;
61 Value field that occures in the HTTP 'accept-charset' header field.
62 Looks like this: 'accept-charset: iso-8859-1,*,utf-8'
64 @interface NGHttpCharsetHeaderField : NSObject
67 BOOL containsWildcard;
70 - (id)initWithArray:(NSArray *)_charsetArray;
71 - (id)initWithString:(NSString *)_value;
75 - (NSEnumerator *)charsets;
76 - (BOOL)containsCharset:(NSString *)_setName;
81 Value field that occures in the HTTP 'accept' header field.
82 Looks like this: 'accept: image/gif, image/x-xbitmap, image/jpeg, wildcard'
84 @interface NGHttpTypeSetHeaderField : NSObject
89 - (id)initWithArray:(NSArray *)_typeArray;
93 - (NSEnumerator *)types;
94 - (BOOL)containsMimeType:(NGMimeType *)_type;
99 Value field that occures in the HTTP 'accept-language' header field.
101 @interface NGHttpLanguageSetHeaderField : NSObject
106 - (id)initWithArray:(NSArray *)_langArray;
110 - (NSEnumerator *)languages;
111 - (BOOL)containsLanguage:(NSString *)_language;
116 Value field that occures in the HTTP 'user-agent' header field.
117 Looks like this: 'user-agent: Mozilla/4.5b2 [en] '
119 @interface NGHttpUserAgent : NSObject
128 - (id)initWithString:(NSString *)_value;
133 - (BOOL)isInternetExplorer;
140 Value field that occures in the HTTP 'connection' header field.
141 Looks like this: 'connection: Keep-Alive'
143 @interface NGHttpConnectionHeaderField : NSObject
151 - (id)initWithString:(NSString *)_value;
160 Value field that occures in the HTTP 'authorization' header field.
161 Looks like this: 'authorization: Basic aGVsZ2U6ZG9vZg=='
164 @interface NGHttpCredentials : NSObject
170 + (id)credentialsWithString:(NSString *)_cred;
171 + (id)credentialsWithScheme:(NSString *)_scheme
172 credentials:(NSData *)_credentials;
176 - (NSString *)scheme;
177 - (NSData *)credentials;
179 - (NSString *)userName;
180 - (NSString *)password;
184 - (NSString *)stringValue;
189 Value field that occures in the HTTP 'www-authenticate' header field.
190 Looks like this: 'www-authorization: Basic realm="SKYRIX"'
192 @interface NGHttpChallenge : NSObject
195 NSDictionary *parameters;
198 + (id)basicChallengeWithRealm:(NSString *)_realm;
199 - (id)initWithScheme:(NSString *)_scheme realm:(NSString *)_realm;
203 - (NSString *)scheme;
205 - (void)setRealm:(NSString *)_realm;
210 - (NSString *)stringValue;
214 #endif /* __NGHttp_NGHttpHeaderFields_H__ */