-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathL0iPod.h
103 lines (74 loc) · 2.55 KB
/
L0iPod.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// L0iPod.h
#import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h>
typedef enum {
// internal, unused
kL0iPodUnchecked = -1,
// cannot determine the iPod type.
kL0iPodGeneric = 0,
// iPod, first or second generation
kL0iPodMechanicalOrTouchWheel = 1,
// iPod, third generation
kL0iPodTouchWheelAndButtons = 2,
// iPod mini (either first or second gen.)
kL0iPodMini = 3,
// iPod, fourth generation
kL0iPodClickWheel = 4,
// iPod photo or iPod with color display
kL0iPodColorDisplay = 5,
// iPod, fifth generation
kL0iPodVideo = 6,
// iPod nano
kL0iPodNano = 7,
// iPod shuffle
kL0iPodShuffle = 128
} L0iPodFamily;
@interface L0iPod : NSObject {
FSRef iPodRef;
L0iPodFamily family;
}
// If the given path is inside an iPod, returns the absolute
// path to that iPod's mount point. Otherwise, returns nil.
+ (NSString*) deviceRootForPath:(NSString*) path;
// Is the given path an iPod mount point?
+ (BOOL) hasControlFolder:(NSString*) path;
// Returns the mount points of all mounted iPods.
+ (NSArray*) allMountedDevices;
// Initializes a L0iPod object that refers to the iPod that
// contains the given path. Returns the new object or nil if
// the path is not inside an iPod.
- (id) initWithPath:(NSString*) path;
// The file:// URL to the iPod mount point.
// Always returns the right URL, even if it has changed since
// you created this object. Returns nil if iPod was unmounted.
- (NSURL*) fileURL;
// The absolute path to the iPod mount point.
// Always returns the right path, even if it has changed since
// you created this object. Returns nil if iPod was unmounted.
- (NSString*) path;
// Returns the iPod's icon at a size of 32x32, as currently
// displayed by the Finder.
- (NSImage*) icon;
// Returns a dictionary containing the keys and values of the
// iPod's SysInfo file.
- (NSDictionary*) deviceInformation;
// Returns the iPod's family (one of the L0iPodFamily constants
// above).
- (L0iPodFamily) family;
// Does this iPod have a display?
- (BOOL) hasDisplay;
// Does this iPod have a color display?
- (BOOL) hasColorDisplay;
// Does this iPod have the Extras > Notes submenu?
- (BOOL) hasNotes;
// Can this iPod be connected to a TV (for photo or video
// viewing)?
- (BOOL) hasTVOut;
// Can this iPod play back video?
- (BOOL) hasVideoPlayback;
// Does this iPod have photo display capabilities?
- (BOOL) hasPhotoAlbum;
// The iPod's display name, as shown by the Finder, or
// nil if the iPod was unmounted.
- (NSString*) displayName;
@end