]> err.no Git - sope/blob - sope-appserver/NGObjWeb/NGHttp/NGHttpCookie.h
fixed makefiles to search FHS locations at the last resort
[sope] / sope-appserver / NGObjWeb / NGHttp / NGHttpCookie.h
1 /*
2   Copyright (C) 2000-2003 SKYRIX Software AG
3
4   This file is part of OGo
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_NGHttpCookie_H__
24 #define __NGHttp_NGHttpCookie_H__
25
26 #import <Foundation/NSObject.h>
27
28 @class NSString, NSDate;
29
30 /*
31   Cookie values. Occures in 'Cookie' and 'Set-Cookie' header fields. Examples:
32
33     'Set-Cookie: CUSTOMER=WILE_E_COYOTE; path=/'
34     'Cookie: CUSTOMER=WILE_E_COYOTE'
35 */
36 @interface NGHttpCookie : NSObject
37 {
38 @protected
39   NSString *name;
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)
45 }
46
47 + (id)cookieWithName:(NSString *)_name;
48 - (id)initWithName:(NSString *)_name value:(id)_value;
49
50 // accessors
51
52 - (void)setCookieName:(NSString *)_name;
53 - (NSString *)cookieName;
54
55 - (void)setValue:(id)_value;
56 - (id)value;
57 - (void)addAdditionalValue:(id)_value; // use with care !
58
59 - (void)setExpireDate:(NSDate *)_date;
60 - (NSDate *)expireDate;
61 - (BOOL)doesExpireWhenUserSessionEnds;
62
63 - (void)setPath:(NSString *)_path;
64 - (NSString *)path;
65 - (void)setDomainName:(NSString *)_domainName;
66 - (NSString *)domainName;
67 - (void)setNeedsSecureChannel:(BOOL)_flag;
68 - (BOOL)needsSecureChannel;
69
70 // description
71
72 - (NSString *)stringValue;
73
74 @end
75
76 #endif /* __NGHttp_NGHttpCookie_H__ */