|
@@ -14,6 +14,7 @@ import Foundation
|
|
|
enum RemoteNetworkCellType: Int {
|
|
|
case cloud
|
|
|
case streaming
|
|
|
+ case download
|
|
|
case wifi
|
|
|
static let count: Int = {
|
|
|
var max: Int = 0
|
|
@@ -30,6 +31,7 @@ protocol RemoteNetworkDataSourceDelegate {
|
|
|
public class RemoteNetworkDataSource: NSObject, UITableViewDataSource, UITableViewDelegate {
|
|
|
let cloudVC = VLCCloudServicesTableViewController(nibName: "VLCCloudServicesTableViewController", bundle: Bundle.main)
|
|
|
let streamingVC = VLCOpenNetworkStreamViewController(nibName: "VLCOpenNetworkStreamViewController", bundle: Bundle.main)
|
|
|
+ let downloadVC = VLCDownloadViewController(nibName: "VLCDownloadViewController", bundle: Bundle.main)
|
|
|
|
|
|
@objc weak var delegate: RemoteNetworkDataSourceDelegate?
|
|
|
|
|
@@ -61,6 +63,14 @@ public class RemoteNetworkDataSource: NSObject, UITableViewDataSource, UITableVi
|
|
|
networkCell.accessibilityIdentifier = "Stream"
|
|
|
return networkCell
|
|
|
}
|
|
|
+ case .download:
|
|
|
+ if let networkCell = tableView.dequeueReusableCell(withIdentifier: VLCRemoteNetworkCell.cellIdentifier) {
|
|
|
+ networkCell.textLabel?.text = downloadVC.title
|
|
|
+ networkCell.detailTextLabel?.text = downloadVC.detailText
|
|
|
+ networkCell.imageView?.image = downloadVC.cellImage
|
|
|
+ networkCell.accessibilityIdentifier = "Downloads"
|
|
|
+ return networkCell
|
|
|
+ }
|
|
|
case .wifi:
|
|
|
if let wifiCell = tableView.dequeueReusableCell(withIdentifier: VLCWiFiUploadTableViewCell.cellIdentifier()) {
|
|
|
return wifiCell
|
|
@@ -92,6 +102,8 @@ public class RemoteNetworkDataSource: NSObject, UITableViewDataSource, UITableVi
|
|
|
return cloudVC
|
|
|
case .streaming:
|
|
|
return streamingVC
|
|
|
+ case .download:
|
|
|
+ return downloadVC
|
|
|
case .wifi:
|
|
|
assertionFailure("We shouldn't get in here since we return nil in willSelect")
|
|
|
return nil
|