-
Notifications
You must be signed in to change notification settings - Fork 15
/
SLDiskManager.h
58 lines (44 loc) · 1.72 KB
/
SLDiskManager.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
53
54
55
56
57
58
//
// SLDiskManager.h
// Semulov
//
// Created by Kevin Wojniak on 9/1/11.
// Copyright 2011-2014 Kevin Wojniak. All rights reserved.
//
#import <Foundation/Foundation.h>
@class SLDisk;
@class SLDiskImageManager;
@interface SLDiskManager : NSObject
@property (readonly) NSArray *unmountedDisks;
@property (readonly) NSArray *disks;
- (void)mount:(SLDisk *)disk;
typedef void (^SLUnmountHandler)(BOOL unmounted);
- (void)unmountAndMaybeEject:(SLDisk *)disk handler:(SLUnmountHandler)handler;
@property (readwrite) BOOL blockMounts;
- (SLDisk *)diskForPath:(NSString *)path;
- (SLDisk *)diskForDiskID:(NSString *)diskID;
@property (readonly) SLDiskImageManager *diskImageManager;
@end
extern NSString * const SLDiskManagerUnmountedVolumesDidChangeNotification;
extern NSString * const SLDiskManagerDidBlockMountNotification; // object is DADiskRef dictionary
@interface SLDisk : NSObject
@property (weak) SLDisk *parent;
@property (readwrite, copy) NSString *diskID;
@property (readwrite, copy) NSString *name;
@property (readwrite, copy) NSString *deviceName;
@property (readwrite, strong) NSImage *icon;
@property (readwrite, strong) NSURL *volumePath;
@property (readonly) BOOL mounted;
@property (readwrite) BOOL mountable;
@property (readwrite) BOOL ejectable;
@property (readwrite) BOOL whole;
@property (readonly) BOOL isStartupDisk;
@property (readonly) BOOL containsStartupDisk;
@property (readwrite) BOOL isDiskImage;
@property (readwrite, copy) NSString *diskImage;
@property (readwrite, strong) NSMutableArray *children;
// Properties introduced for being able to mount encrypted volumes
@property (readwrite, copy) NSString *volumeKind;
@property (readwrite) BOOL encrypted;
@property (readwrite, copy) NSString *volumeUUID;
@end