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_NGHttpCookie_H__
24 #define __NGHttp_NGHttpCookie_H__
26 #import <Foundation/NSObject.h>
28 @class NSString, NSDate;
31 Cookie values. Occures in 'Cookie' and 'Set-Cookie' header fields. Examples:
33 'Set-Cookie: CUSTOMER=WILE_E_COYOTE; path=/'
34 'Cookie: CUSTOMER=WILE_E_COYOTE'
36 @interface NGHttpCookie : NSObject
40 id value; // the value of the cookie, should respond to -stringValue
41 NSDate *expireDate; // defines how long the cookies is valid
42 NSString *path; // the root-path where the cookie is valid
43 NSString *domainName; // the domain where the cookie is valid (default: hostname)
44 BOOL onlyIfSecure; // send only if communication-channel is secure (SSL)
47 + (id)cookieWithName:(NSString *)_name;
48 - (id)initWithName:(NSString *)_name value:(id)_value;
52 - (void)setCookieName:(NSString *)_name;
53 - (NSString *)cookieName;
55 - (void)setValue:(id)_value;
57 - (void)addAdditionalValue:(id)_value; // use with care !
59 - (void)setExpireDate:(NSDate *)_date;
60 - (NSDate *)expireDate;
61 - (BOOL)doesExpireWhenUserSessionEnds;
63 - (void)setPath:(NSString *)_path;
65 - (void)setDomainName:(NSString *)_domainName;
66 - (NSString *)domainName;
67 - (void)setNeedsSecureChannel:(BOOL)_flag;
68 - (BOOL)needsSecureChannel;
72 - (NSString *)stringValue;
76 #endif /* __NGHttp_NGHttpCookie_H__ */