]> err.no Git - sope/blob - sope-appserver/NGObjWeb/NGObjWeb/WOCookie.h
major improvements in resource/template lookup with SoProduct's
[sope] / sope-appserver / NGObjWeb / NGObjWeb / WOCookie.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 __NGObjWeb_WOCookie_H__
23 #define __NGObjWeb_WOCookie_H__
24
25 #import <Foundation/NSObject.h>
26
27 @class NSString, NSDate;
28
29 @interface WOCookie : NSObject < NSCopying >
30 {
31 @protected
32   NSString *name;
33   NSString *value;
34
35   // cookie configuration
36   NSDate   *expireDate;  // defines how long the cookies is valid
37   NSString *path;        // the root-path where the cookie is valid
38   NSString *domainName;  // the domain where the cookie is valid (def: hostname)
39   BOOL     onlyIfSecure; // send only if communication-channel is secure (SSL)
40 }
41
42 + (id)cookieWithName:(NSString *)_name value:(NSString *)_value;
43
44 + (id)cookieWithName:(NSString *)_name value:(NSString *)_value
45   path:(NSString *)_path domain:(NSString *)_domain
46   expires:(NSDate *)_date
47   isSecure:(BOOL)_secure;
48
49 /* accessors */
50
51 - (void)setName:(NSString *)_name;
52 - (NSString *)name;
53 - (void)setValue:(NSString *)_value;
54 - (NSString *)value;
55 - (void)setExpires:(NSDate *)_date;
56 - (NSDate *)expires;
57 - (void)setPath:(NSString *)_path;
58 - (NSString *)path;
59 - (void)setDomain:(NSString *)_domain;
60 - (NSString *)domain;
61 - (void)setIsSecure:(BOOL)_flag;
62 - (BOOL)isSecure;
63
64 /* description */
65
66 - (NSString *)headerString;
67 - (NSString *)stringValue; // called by HTTP server
68
69 @end
70
71 #endif /* __NGObjWeb_WOCookie_H__ */