]> err.no Git - sope/blob - sope-appserver/NGObjWeb/NGHttp/NGHttpCookie.h
increased element nesting depth
[sope] / sope-appserver / NGObjWeb / NGHttp / NGHttpCookie.h
1 /*
2   Copyright (C) 2000-2005 SKYRIX Software AG
3
4   This file is part of SOPE.
5
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
9   later version.
10
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.
15
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
19   02111-1307, USA.
20 */
21
22 #ifndef __NGHttp_NGHttpCookie_H__
23 #define __NGHttp_NGHttpCookie_H__
24
25 #import <Foundation/NSObject.h>
26
27 @class NSString, NSDate;
28
29 /*
30   Cookie values. Occures in 'Cookie' and 'Set-Cookie' header fields. Examples:
31
32     'Set-Cookie: CUSTOMER=WILE_E_COYOTE; path=/'
33     'Cookie: CUSTOMER=WILE_E_COYOTE'
34 */
35 @interface NGHttpCookie : NSObject
36 {
37 @protected
38   NSString *name;
39   id       value;        // the value of the cookie, should respond to -stringValue
40   NSDate   *expireDate;  // defines how long the cookies is valid
41   NSString *path;        // the root-path where the cookie is valid
42   NSString *domainName;  // the domain where the cookie is valid (default: hostname)
43   BOOL     onlyIfSecure; // send only if communication-channel is secure (SSL)
44 }
45
46 + (id)cookieWithName:(NSString *)_name;
47 - (id)initWithName:(NSString *)_name value:(id)_value;
48
49 // accessors
50
51 - (void)setCookieName:(NSString *)_name;
52 - (NSString *)cookieName;
53
54 - (void)setValue:(id)_value;
55 - (id)value;
56 - (void)addAdditionalValue:(id)_value; // use with care !
57
58 - (void)setExpireDate:(NSDate *)_date;
59 - (NSDate *)expireDate;
60 - (BOOL)doesExpireWhenUserSessionEnds;
61
62 - (void)setPath:(NSString *)_path;
63 - (NSString *)path;
64 - (void)setDomainName:(NSString *)_domainName;
65 - (NSString *)domainName;
66 - (void)setNeedsSecureChannel:(BOOL)_flag;
67 - (BOOL)needsSecureChannel;
68
69 // description
70
71 - (NSString *)stringValue;
72
73 @end
74
75 #endif /* __NGHttp_NGHttpCookie_H__ */