forked from ish-app/ish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Roots.h
33 lines (23 loc) · 941 Bytes
/
Roots.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
//
// Roots.h
// iSH
//
// Created by Theodore Dubois on 6/7/20.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol ProgressReporter
- (void)updateProgress:(double)progressFraction message:(NSString *)progressMessage;
- (BOOL)shouldCancel;
@end
@interface Roots : NSObject
+ (instancetype)instance;
@property (readonly) NSOrderedSet<NSString *> *roots;
@property NSString *defaultRoot;
- (NSURL *)rootUrl:(NSString *)name;
- (BOOL)importRootFromArchive:(NSURL *)archive name:(NSString *)name error:(NSError **)error progressReporter:(id<ProgressReporter> _Nullable)progress;
- (BOOL)exportRootNamed:(NSString *)name toArchive:(NSURL *)archive error:(NSError **)error progressReporter:(id<ProgressReporter> _Nullable)progress;
- (BOOL)destroyRootNamed:(NSString *)name error:(NSError **)error;
- (BOOL)renameRoot:(NSString *)name toName:(NSString *)newName error:(NSError **)error;
@end
NS_ASSUME_NONNULL_END