ObjFW
Loading...
Searching...
No Matches
OFHTTPCookieManager.h
1/*
2 * Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
3 *
4 * All rights reserved.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License version 3.0 only,
8 * as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * version 3.0 for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * version 3.0 along with this program. If not, see
17 * <https://www.gnu.org/licenses/>.
18 */
19
20#import "OFObject.h"
21
22OF_ASSUME_NONNULL_BEGIN
23
24@class OFArray OF_GENERIC(ObjectType);
25@class OFHTTPCookie;
26@class OFIRI;
27@class OFMutableArray OF_GENERIC(ObjectType);
28
34OF_SUBCLASSING_RESTRICTED
36{
37 OFMutableArray OF_GENERIC(OFHTTPCookie *) *_cookies;
38}
39
43@property (readonly, nonatomic) OFArray OF_GENERIC(OFHTTPCookie *) *cookies;
44
50+ (instancetype)manager;
51
61- (void)addCookie: (OFHTTPCookie *)cookie forIRI: (OFIRI *)IRI;
62
72- (void)addCookies: (OFArray OF_GENERIC(OFHTTPCookie *) *)cookies
73 forIRI: (OFIRI *)IRI;
74
81- (OFArray OF_GENERIC(OFHTTPCookie *) *)cookiesForIRI: (OFIRI *)IRI;
82
86- (void)purgeExpiredCookies;
87@end
88
89OF_ASSUME_NONNULL_END
An abstract class for storing objects in an array.
Definition OFArray.h:109
A class for managing cookies for multiple domains.
Definition OFHTTPCookieManager.h:36
OFArray * cookies
All cookies known to the cookie manager.
Definition OFHTTPCookieManager.h:43
A class for storing and manipulating HTTP cookies.
Definition OFHTTPCookie.h:39
A class for representing IRIs, URIs, URLs and URNs, for parsing them as well as accessing parts of th...
Definition OFIRI.h:41
An abstract class for storing, adding and removing objects in an array.
Definition OFMutableArray.h:48
The root class for all other classes inside ObjFW.
Definition OFObject.h:692