- (IBAction)openSpecialMediaFolder:(id)sender;
- (IBAction)dvdreadOptionChanged:(id)sender;
- (IBAction)vcdOptionChanged:(id)sender;
-- (NSString *)getVolumeTypeFromMountPath:(NSString *)mountPath;
-- (NSString *)getBSDNodeFromMountPath:(NSString *)mountPath;
+
+// static helper functions
++ (NSString *)getVolumeTypeFromMountPath:(NSString *)mountPath;
++ (NSString *)getBSDNodeFromMountPath:(NSString *)mountPath;
- (void)openNet;
- (IBAction)openNetModeChanged:(id)sender;
[[[o_tabview tabViewItemAtIndex: [o_tabview indexOfTabViewItemWithIdentifier:@"optical"]] view] displayIfNeeded];
}
-- (NSString *) getBSDNodeFromMountPath:(NSString *)mountPath
++ (NSString *) getBSDNodeFromMountPath:(NSString *)mountPath
{
OSStatus err;
FSRef ref;
return @"";
}
-- (NSString *)getVolumeTypeFromMountPath:(NSString *)mountPath
++ (NSString *)getVolumeTypeFromMountPath:(NSString *)mountPath
{
OSStatus err;
FSRef ref;
- (NSDictionary *)scanPath:(NSString *)o_path
{
- NSString *o_type = [self getVolumeTypeFromMountPath:o_path];
+ NSString *o_type = [VLCOpen getVolumeTypeFromMountPath:o_path];
NSImage *o_image = [[NSWorkspace sharedWorkspace] iconForFile: o_path];
NSString *o_device_path;
[o_type isEqualToString: kVLCMediaUnknown])
o_device_path = o_path;
else
- o_device_path = [self getBSDNodeFromMountPath:o_path];
+ o_device_path = [VLCOpen getBSDNodeFromMountPath:o_path];
return [NSDictionary dictionaryWithObjectsAndKeys: o_path, @"path",
o_device_path, @"devicePath",
if ([[NSFileManager defaultManager] fileExistsAtPath:o_path isDirectory:&b_dir] && b_dir &&
[[NSWorkspace sharedWorkspace] getFileSystemInfoForPath:o_path isRemovable: &b_rem
isWritable:&b_writable isUnmountable:NULL description:NULL type:NULL] && b_rem && !b_writable && [o_nsurl isFileURL]) {
- id o_vlc_open = [[VLCMain sharedInstance] open];
- NSString *diskType = [o_vlc_open getVolumeTypeFromMountPath: o_path];
+ NSString *diskType = [VLCOpen getVolumeTypeFromMountPath: o_path];
msg_Dbg(p_intf, "detected optical media of type %s in the file input", [diskType UTF8String]);
if ([diskType isEqualToString: kVLCMediaDVD])
- o_uri = [NSString stringWithFormat: @"dvdnav://%@", [o_vlc_open getBSDNodeFromMountPath: o_path]];
+ o_uri = [NSString stringWithFormat: @"dvdnav://%@", [VLCOpen getBSDNodeFromMountPath: o_path]];
else if ([diskType isEqualToString: kVLCMediaVideoTSFolder])
o_uri = [NSString stringWithFormat: @"dvdnav://%@", o_path];
else if ([diskType isEqualToString: kVLCMediaAudioCD])
- o_uri = [NSString stringWithFormat: @"cdda://%@", [o_vlc_open getBSDNodeFromMountPath: o_path]];
+ o_uri = [NSString stringWithFormat: @"cdda://%@", [VLCOpen getBSDNodeFromMountPath: o_path]];
else if ([diskType isEqualToString: kVLCMediaVCD])
- o_uri = [NSString stringWithFormat: @"vcd://%@#0:0", [o_vlc_open getBSDNodeFromMountPath: o_path]];
+ o_uri = [NSString stringWithFormat: @"vcd://%@#0:0", [VLCOpen getBSDNodeFromMountPath: o_path]];
else if ([diskType isEqualToString: kVLCMediaSVCD])
- o_uri = [NSString stringWithFormat: @"vcd://%@@0:0", [o_vlc_open getBSDNodeFromMountPath: o_path]];
+ o_uri = [NSString stringWithFormat: @"vcd://%@@0:0", [VLCOpen getBSDNodeFromMountPath: o_path]];
else if ([diskType isEqualToString: kVLCMediaBD] || [diskType isEqualToString: kVLCMediaBDMVFolder])
o_uri = [NSString stringWithFormat: @"bluray://%@", o_path];
else