-
Notifications
You must be signed in to change notification settings - Fork 281
/
Copy pathGTConfiguration.h
52 lines (36 loc) · 1.46 KB
/
GTConfiguration.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// GTConfiguration.h
// ObjectiveGitFramework
//
// Created by Josh Abernathy on 12/30/11.
// Copyright (c) 2011 GitHub, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "git2/types.h"
@class GTRemote;
@class GTRepository;
@class GTSignature;
NS_ASSUME_NONNULL_BEGIN
@interface GTConfiguration : NSObject
@property (nonatomic, readonly, strong) GTRepository * _Nullable repository;
@property (nonatomic, readonly, copy) NSArray<NSString *> *configurationKeys;
/// The GTRemotes in the config. If the configuration isn't associated with any
/// repository, this will always be nil.
@property (nonatomic, readonly, copy) NSArray<GTRemote *> * _Nullable remotes;
- (instancetype)init NS_UNAVAILABLE;
/// Creates and returns a configuration which includes the global, XDG, and
/// system configurations.
+ (instancetype _Nullable)defaultConfiguration;
/// The underlying `git_config` object.
- (git_config *)git_config __attribute__((objc_returns_inner_pointer));
- (void)setString:(NSString *)s forKey:(NSString *)key;
- (NSString * _Nullable)stringForKey:(NSString *)key;
- (void)setBool:(BOOL)b forKey:(NSString *)key;
- (BOOL)boolForKey:(NSString *)key;
- (void)setInt32:(int32_t)i forKey:(NSString *)key;
- (int32_t)int32ForKey:(NSString *)key;
- (void)setInt64:(int64_t)i forKey:(NSString *)key;
- (int64_t)int64ForKey:(NSString *)key;
- (BOOL)deleteValueForKey:(NSString *)key error:(NSError * __autoreleasing *)error;
@end
NS_ASSUME_NONNULL_END