ObjFW
OFHTTPCookieManager.h
1 /*
2  * Copyright (c) 2008-2023 Jonathan Schleifer <js@nil.im>
3  *
4  * All rights reserved.
5  *
6  * This file is part of ObjFW. It may be distributed under the terms of the
7  * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
8  * the packaging of this file.
9  *
10  * Alternatively, it may be distributed under the terms of the GNU General
11  * Public License, either version 2 or 3, which can be found in the file
12  * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
13  * file.
14  */
15 
16 #import "OFObject.h"
17 
18 OF_ASSUME_NONNULL_BEGIN
19 
20 @class OFArray OF_GENERIC(ObjectType);
21 @class OFHTTPCookie;
22 @class OFIRI;
23 @class OFMutableArray OF_GENERIC(ObjectType);
24 
30 OF_SUBCLASSING_RESTRICTED
32 {
33  OFMutableArray OF_GENERIC(OFHTTPCookie *) *_cookies;
34 }
35 
39 @property (readonly, nonatomic) OFArray OF_GENERIC(OFHTTPCookie *) *cookies;
40 
46 + (instancetype)manager;
47 
57 - (void)addCookie: (OFHTTPCookie *)cookie forIRI: (OFIRI *)IRI;
58 
68 - (void)addCookies: (OFArray OF_GENERIC(OFHTTPCookie *) *)cookies
69  forIRI: (OFIRI *)IRI;
70 
77 - (OFArray OF_GENERIC(OFHTTPCookie *) *)cookiesForIRI: (OFIRI *)IRI;
78 
82 - (void)purgeExpiredCookies;
83 @end
84 
85 OF_ASSUME_NONNULL_END
An abstract class for storing objects in an array.
Definition: OFArray.h:103
The root class for all other classes inside ObjFW.
Definition: OFObject.h:686
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:43
A class for storing and manipulating HTTP cookies.
Definition: OFHTTPCookie.h:33
OFArray * cookies
All cookies known to the cookie manager.
Definition: OFHTTPCookieManager.h:39
A class for managing cookies for multiple domains.
Definition: OFHTTPCookieManager.h:31
A class for representing IRIs, URIs, URLs and URNs, for parsing them as well as accessing parts of th...
Definition: OFIRI.h:35