Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLC-iOS
Commits
de4b449c
Commit
de4b449c
authored
Oct 25, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
local server list: rename makros to prevent potential makro redefinition
parent
4864f628
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
AspenProject/VLCLocalServerFolderListViewController.m
AspenProject/VLCLocalServerFolderListViewController.m
+13
-13
No files found.
AspenProject/VLCLocalServerFolderListViewController.m
View file @
de4b449c
...
...
@@ -22,8 +22,8 @@
#import "NSString+SupportedMedia.h"
#import "VLCStatusLabel.h"
#define kVLC
UPNPFileServer
0
#define kVLC
FTP
Server 1
#define kVLC
ServerTypeUPNP
0
#define kVLCServer
TypeFTP
1
@interface
VLCLocalServerFolderListViewController
()
<
UITableViewDataSource
,
UITableViewDelegate
,
WRRequestDelegate
,
VLCLocalNetworkListCell
>
{
...
...
@@ -70,7 +70,7 @@
_UPNPdevice
=
device
;
_listTitle
=
header
;
_UPNProotID
=
rootID
;
_serverType
=
kVLC
UPNPFileServer
;
_serverType
=
kVLC
ServerTypeUPNP
;
_mutableObjectList
=
[[
NSMutableArray
alloc
]
init
];
}
...
...
@@ -86,7 +86,7 @@
_ftpServerUserName
=
username
;
_ftpServerPassword
=
password
;
_ftpServerPath
=
path
;
_serverType
=
kVLC
FTP
Server
;
_serverType
=
kVLCServer
TypeFTP
;
}
return
self
;
...
...
@@ -96,7 +96,7 @@
{
[
super
viewDidLoad
];
if
(
_serverType
==
kVLC
UPNPFileServer
)
{
if
(
_serverType
==
kVLC
ServerTypeUPNP
)
{
NSMutableString
*
outResult
=
[[
NSMutableString
alloc
]
init
];
NSMutableString
*
outNumberReturned
=
[[
NSMutableString
alloc
]
init
];
NSMutableString
*
outTotalMatches
=
[[
NSMutableString
alloc
]
init
];
...
...
@@ -108,7 +108,7 @@
NSData
*
didl
=
[
outResult
dataUsingEncoding
:
NSUTF8StringEncoding
];
MediaServerBasicObjectParser
*
parser
=
[[
MediaServerBasicObjectParser
alloc
]
initWithMediaObjectArray
:
_mutableObjectList
itemsOnly
:
NO
];
[
parser
parseFromData
:
didl
];
}
else
if
(
_serverType
==
kVLC
FTP
Server
)
{
}
else
if
(
_serverType
==
kVLCServer
TypeFTP
)
{
if
([
_ftpServerPath
isEqualToString
:
@"/"
])
_listTitle
=
_ftpServerAddress
;
else
...
...
@@ -139,7 +139,7 @@
-
(
NSInteger
)
tableView
:(
UITableView
*
)
tableView
numberOfRowsInSection
:(
NSInteger
)
section
{
if
(
_serverType
==
kVLC
UPNPFileServer
)
if
(
_serverType
==
kVLC
ServerTypeUPNP
)
return
_mutableObjectList
.
count
;
return
_objectList
.
count
;
...
...
@@ -153,7 +153,7 @@
if
(
cell
==
nil
)
cell
=
[
VLCLocalNetworkListCell
cellWithReuseIdentifier
:
CellIdentifier
];
if
(
_serverType
==
kVLC
UPNPFileServer
)
{
if
(
_serverType
==
kVLC
ServerTypeUPNP
)
{
MediaServer1BasicObject
*
item
=
_mutableObjectList
[
indexPath
.
row
];
if
(
!
[
item
isContainer
])
{
MediaServer1ItemObject
*
mediaItem
=
_mutableObjectList
[
indexPath
.
row
];
...
...
@@ -173,7 +173,7 @@
[
cell
setIcon
:[
UIImage
imageNamed
:
@"folder"
]];
}
[
cell
setTitle
:[
item
title
]];
}
else
if
(
_serverType
==
kVLC
FTP
Server
)
{
}
else
if
(
_serverType
==
kVLCServer
TypeFTP
)
{
cell
.
title
=
[
_objectList
[
indexPath
.
row
]
objectForKey
:(
id
)
kCFFTPResourceName
];
if
([[
_objectList
[
indexPath
.
row
]
objectForKey
:(
id
)
kCFFTPResourceType
]
intValue
]
==
4
)
{
cell
.
isDirectory
=
YES
;
...
...
@@ -198,7 +198,7 @@
-
(
void
)
tableView
:(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:(
NSIndexPath
*
)
indexPath
{
if
(
_serverType
==
kVLC
UPNPFileServer
)
{
if
(
_serverType
==
kVLC
ServerTypeUPNP
)
{
MediaServer1BasicObject
*
item
=
_mutableObjectList
[
indexPath
.
row
];
if
([
item
isContainer
])
{
MediaServer1ContainerObject
*
container
=
_mutableObjectList
[
indexPath
.
row
];
...
...
@@ -227,7 +227,7 @@
[
appDelegate
.
playlistViewController
performSelector
:
@selector
(
openMovieFromURL
:)
withObject
:
itemURL
afterDelay
:
kGHRevealSidebarDefaultAnimationDuration
];
}
}
}
else
if
(
_serverType
==
kVLC
FTP
Server
)
{
}
else
if
(
_serverType
==
kVLCServer
TypeFTP
)
{
if
([[
_objectList
[
indexPath
.
row
]
objectForKey
:(
id
)
kCFFTPResourceType
]
intValue
]
==
4
)
{
NSString
*
newPath
=
[
NSString
stringWithFormat
:
@"%@/%@"
,
_ftpServerPath
,
[
_objectList
[
indexPath
.
row
]
objectForKey
:(
id
)
kCFFTPResourceName
]];
...
...
@@ -319,7 +319,7 @@
#pragma mark - VLCLocalNetworkListCell delegation
-
(
void
)
triggerDownloadForCell
:(
VLCLocalNetworkListCell
*
)
cell
{
if
(
_serverType
==
kVLC
UPNPFileServer
)
{
if
(
_serverType
==
kVLC
ServerTypeUPNP
)
{
MediaServer1ItemObject
*
item
=
_mutableObjectList
[[
self
.
tableView
indexPathForCell
:
cell
].
row
];
MediaServer1ItemRes
*
resource
=
nil
;
NSEnumerator
*
e
=
[[
item
resources
]
objectEnumerator
];
...
...
@@ -334,7 +334,7 @@
[
self
_downloadUPNPFile
:
itemURL
fileNameOfMedia
:[
item
title
]];
[
cell
.
statusLabel
showStatusMessage
:
NSLocalizedString
(
@"DOWNLOADING"
,
@""
)];
}
}
else
if
(
_serverType
==
kVLC
FTP
Server
)
{
}
else
if
(
_serverType
==
kVLCServer
TypeFTP
)
{
NSString
*
objectName
=
[
_objectList
[[
self
.
tableView
indexPathForCell
:
cell
].
row
]
objectForKey
:(
id
)
kCFFTPResourceName
];
if
(
!
[
objectName
isSupportedFormat
])
{
UIAlertView
*
alert
=
[[
UIAlertView
alloc
]
initWithTitle
:
NSLocalizedString
(
@"FILE_NOT_SUPPORTED"
,
@""
)
message
:[
NSString
stringWithFormat
:
NSLocalizedString
(
@"FILE_NOT_SUPPORTED_LONG"
,
@""
),
objectName
]
delegate
:
self
cancelButtonTitle
:
NSLocalizedString
(
@"BUTTON_CANCEL"
,
@""
)
otherButtonTitles
:
nil
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment