ObjFW
Loading...
Searching...
No Matches
OFINIFile.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#import "OFString.h"
22#import "OFINICategory.h"
23
24OF_ASSUME_NONNULL_BEGIN
25
26@class OFIRI;
27@class OFMutableArray OF_GENERIC(ObjectType);
28
34OF_SUBCLASSING_RESTRICTED
36{
37 OFMutableArray OF_GENERIC(OFINICategory *) *_categories;
38}
39
43@property (readonly, nonatomic) OFArray OF_GENERIC(OFINICategory *) *categories;
44
56+ (instancetype)fileWithIRI: (OFIRI *)IRI;
57
70+ (instancetype)fileWithIRI: (OFIRI *)IRI encoding: (OFStringEncoding)encoding;
71
72- (instancetype)init OF_UNAVAILABLE;
73
86- (instancetype)initWithIRI: (OFIRI *)IRI;
87
100- (instancetype)initWithIRI: (OFIRI *)IRI
101 encoding: (OFStringEncoding)encoding
102 OF_DESIGNATED_INITIALIZER;
103
113- (OFINICategory *)categoryForName: (OFString *)name;
114
120- (void)writeToIRI: (OFIRI *)IRI;
121
129- (void)writeToIRI: (OFIRI *)IRI encoding: (OFStringEncoding)encoding;
130@end
131
132OF_ASSUME_NONNULL_END
OFStringEncoding
The encoding of a string.
Definition OFString.h:65
An abstract class for storing objects in an array.
Definition OFArray.h:109
A class for representing a category of an INI file.
Definition OFINICategory.h:35
A class for reading, creating and modifying INI files.
Definition OFINIFile.h:36
OFArray * categories
All categories in the INI file.
Definition OFINIFile.h:43
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
A class for handling strings.
Definition OFString.h:139