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 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#import "OFString.h"
18#import "OFINICategory.h"
19
20OF_ASSUME_NONNULL_BEGIN
21
22@class OFIRI;
23@class OFMutableArray OF_GENERIC(ObjectType);
24
30OF_SUBCLASSING_RESTRICTED
32{
33 OFMutableArray OF_GENERIC(OFINICategory *) *_categories;
34}
35
39@property (readonly, nonatomic) OFArray OF_GENERIC(OFINICategory *) *categories;
40
52+ (instancetype)fileWithIRI: (OFIRI *)IRI;
53
66+ (instancetype)fileWithIRI: (OFIRI *)IRI encoding: (OFStringEncoding)encoding;
67
68- (instancetype)init OF_UNAVAILABLE;
69
82- (instancetype)initWithIRI: (OFIRI *)IRI;
83
96- (instancetype)initWithIRI: (OFIRI *)IRI
97 encoding: (OFStringEncoding)encoding
98 OF_DESIGNATED_INITIALIZER;
99
109- (OFINICategory *)categoryForName: (OFString *)name;
110
116- (void)writeToIRI: (OFIRI *)IRI;
117
125- (void)writeToIRI: (OFIRI *)IRI encoding: (OFStringEncoding)encoding;
126@end
127
128OF_ASSUME_NONNULL_END
OFStringEncoding
The encoding of a string.
Definition OFString.h:61
An abstract class for storing objects in an array.
Definition OFArray.h:105
A class for representing a category of an INI file.
Definition OFINICategory.h:31
A class for reading, creating and modifying INI files.
Definition OFINIFile.h:32
OFArray * categories
All categories in the INI file.
Definition OFINIFile.h:39
A class for representing IRIs, URIs, URLs and URNs, for parsing them as well as accessing parts of th...
Definition OFIRI.h:37
An abstract class for storing, adding and removing objects in an array.
Definition OFMutableArray.h:44
The root class for all other classes inside ObjFW.
Definition OFObject.h:688
A class for handling strings.
Definition OFString.h:135