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
bc43694c
Commit
bc43694c
authored
May 27, 2015
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clouds: cosmetics
(cherry picked from commit
9c09939f
)
parent
0bcbb1e4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
46 deletions
+45
-46
Sources/VLCBoxController.m
Sources/VLCBoxController.m
+3
-3
Sources/VLCBoxTableViewController.m
Sources/VLCBoxTableViewController.m
+27
-27
Sources/VLCCloudStorageTableViewCell.h
Sources/VLCCloudStorageTableViewCell.h
+2
-2
Sources/VLCCloudStorageTableViewCell.m
Sources/VLCCloudStorageTableViewCell.m
+11
-11
Sources/VLCDropboxTableViewController.m
Sources/VLCDropboxTableViewController.m
+2
-1
Sources/VLCOneDriveController.m
Sources/VLCOneDriveController.m
+0
-2
No files found.
Sources/VLCBoxController.m
View file @
bc43694c
...
...
@@ -155,9 +155,9 @@
* and pass the final location to libvlc, which does not require a custom HTTP header */
NSURL
*
baseURL
=
[[[
BoxSDK
sharedSDK
]
filesManager
]
URLWithResource
:
@"files"
ID:
file
.
modelID
subresource:
@"content"
subID:
nil
];
ID:
file
.
modelID
subresource:
@"content"
subID:
nil
];
NSMutableURLRequest
*
urlRequest
=
[
NSMutableURLRequest
requestWithURL
:
baseURL
cachePolicy:
NSURLRequestReloadIgnoringLocalCacheData
...
...
Sources/VLCBoxTableViewController.m
View file @
bc43694c
...
...
@@ -43,34 +43,34 @@
self
.
cloudStorageLogo
.
center
=
self
.
view
.
center
;
// Handle logged in
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
boxApiTokenDidRefresh
)
name:
BoxOAuth2SessionDidRefreshTokensNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
boxApiTokenDidRefresh
)
name:
BoxOAuth2SessionDidBecomeAuthenticatedNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
NSNotificationCenter
*
defaultCenter
=
[
NSNotificationCenter
defaultCenter
];
[
defaultCenter
addObserver
:
self
selector:
@selector
(
boxApiTokenDidRefresh
)
name:
BoxOAuth2SessionDidRefreshTokensNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
[
defaultCenter
addObserver
:
self
selector:
@selector
(
boxApiTokenDidRefresh
)
name:
BoxOAuth2SessionDidBecomeAuthenticatedNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
// Handle logout
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
boxDidGetLoggedOut
)
name:
BoxOAuth2SessionDidReceiveAuthenticationErrorNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
boxDidGetLoggedOut
)
name:
BoxOAuth2SessionDidReceiveRefreshErrorNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
boxAPIAuthenticationDidFail
)
name:
BoxOAuth2SessionDidReceiveAuthenticationErrorNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
boxAPIInitiateLogin
)
name:
BoxOAuth2SessionDidReceiveRefreshErrorNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
[
defaultCenter
addObserver
:
self
selector:
@selector
(
boxDidGetLoggedOut
)
name:
BoxOAuth2SessionDidReceiveAuthenticationErrorNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
[
defaultCenter
addObserver
:
self
selector:
@selector
(
boxDidGetLoggedOut
)
name:
BoxOAuth2SessionDidReceiveRefreshErrorNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
[
defaultCenter
addObserver
:
self
selector:
@selector
(
boxAPIAuthenticationDidFail
)
name:
BoxOAuth2SessionDidReceiveAuthenticationErrorNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
[
defaultCenter
addObserver
:
self
selector:
@selector
(
boxAPIInitiateLogin
)
name:
BoxOAuth2SessionDidReceiveRefreshErrorNotification
object:
[
BoxSDK
sharedSDK
].
OAuth2Session
];
}
-
(
UIViewController
*
)
createAuthController
...
...
Sources/VLCCloudStorageTableViewCell.h
View file @
bc43694c
...
...
@@ -2,7 +2,7 @@
* VLCCloudStorageTableViewCell.h
* VLC for iOS
*****************************************************************************
* Copyright (c) 2013 VideoLAN. All rights reserved.
* Copyright (c) 2013
-2015
VideoLAN. All rights reserved.
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne # videolan.org>
...
...
@@ -26,7 +26,7 @@
@property
(
nonatomic
,
strong
)
IBOutlet
UIImageView
*
thumbnailView
;
@property
(
nonatomic
,
strong
)
IBOutlet
UIButton
*
downloadButton
;
@property
(
nonatomic
,
retain
)
DBMetadata
*
fileMetadata
;
@property
(
nonatomic
,
retain
)
DBMetadata
*
dropboxFile
;
@property
(
nonatomic
,
retain
)
GTLDriveFile
*
driveFile
;
@property
(
nonatomic
,
retain
)
BoxItem
*
boxFile
;
@property
(
nonatomic
,
retain
)
VLCOneDriveObject
*
oneDriveFile
;
...
...
Sources/VLCCloudStorageTableViewCell.m
View file @
bc43694c
...
...
@@ -2,7 +2,7 @@
* VLCCloudStorageTableViewCell.m
* VLC for iOS
*****************************************************************************
* Copyright (c) 2013 VideoLAN. All rights reserved.
* Copyright (c) 2013
-2015
VideoLAN. All rights reserved.
* $Id$
*
* Authors: Carola Nitz <nitz.carola # googlemail.com>
...
...
@@ -30,10 +30,10 @@
return
cell
;
}
-
(
void
)
set
FileMetadata
:(
DBMetadata
*
)
fileMetadata
-
(
void
)
set
DropboxFile
:(
DBMetadata
*
)
dropboxFile
{
if
(
fileMetadata
!=
_fileMetadata
)
_
fileMetadata
=
fileMetadata
;
if
(
dropboxFile
!=
_dropboxFile
)
_
dropboxFile
=
dropboxFile
;
[
self
_updatedDisplayedInformation
];
}
...
...
@@ -64,19 +64,19 @@
-
(
void
)
_updatedDisplayedInformation
{
if
(
_
fileMetadata
!=
nil
)
{
if
(
self
.
fileMetadata
.
isDirectory
)
{
self
.
folderTitleLabel
.
text
=
self
.
fileMetadata
.
filename
;
if
(
_
dropboxFile
!=
nil
)
{
if
(
self
.
dropboxFile
.
isDirectory
)
{
self
.
folderTitleLabel
.
text
=
self
.
dropboxFile
.
filename
;
self
.
titleLabel
.
hidden
=
self
.
subtitleLabel
.
hidden
=
YES
;
self
.
folderTitleLabel
.
hidden
=
NO
;
}
else
{
self
.
titleLabel
.
text
=
self
.
fileMetadata
.
filename
;
self
.
subtitleLabel
.
text
=
(
self
.
fileMetadata
.
totalBytes
>
0
)
?
self
.
fileMetadata
.
humanReadableSize
:
@""
;
self
.
titleLabel
.
text
=
self
.
dropboxFile
.
filename
;
self
.
subtitleLabel
.
text
=
(
self
.
dropboxFile
.
totalBytes
>
0
)
?
self
.
dropboxFile
.
humanReadableSize
:
@""
;
self
.
titleLabel
.
hidden
=
self
.
subtitleLabel
.
hidden
=
NO
;
self
.
folderTitleLabel
.
hidden
=
YES
;
}
NSString
*
iconName
=
self
.
fileMetadata
.
icon
;
NSString
*
iconName
=
self
.
dropboxFile
.
icon
;
if
([
iconName
isEqualToString
:
@"folder_user"
]
||
[
iconName
isEqualToString
:
@"folder"
]
||
[
iconName
isEqualToString
:
@"folder_public"
]
||
[
iconName
isEqualToString
:
@"folder_photos"
]
||
[
iconName
isEqualToString
:
@"package"
])
{
self
.
thumbnailView
.
image
=
[
UIImage
imageNamed
:
@"folder"
];
self
.
downloadButton
.
hidden
=
YES
;
...
...
@@ -88,7 +88,7 @@
self
.
thumbnailView
.
image
=
[
UIImage
imageNamed
:
@"audio"
];
else
{
self
.
thumbnailView
.
image
=
[
UIImage
imageNamed
:
@"blank"
];
APLog
(
@"missing icon for type '%@'"
,
self
.
fileMetadata
.
icon
);
APLog
(
@"missing icon for type '%@'"
,
self
.
dropboxFile
.
icon
);
}
}
else
if
(
_driveFile
!=
nil
){
...
...
Sources/VLCDropboxTableViewController.m
View file @
bc43694c
...
...
@@ -76,7 +76,7 @@
if
(
cell
==
nil
)
cell
=
[
VLCCloudStorageTableViewCell
cellWithReuseIdentifier
:
CellIdentifier
];
cell
.
fileMetadata
=
_dropboxController
.
currentListFiles
[
indexPath
.
row
];
cell
.
dropboxFile
=
_dropboxController
.
currentListFiles
[
indexPath
.
row
];
cell
.
delegate
=
self
;
return
cell
;
...
...
@@ -120,6 +120,7 @@
#pragma mark - VLCCloudStorageTableViewCell delegation
-
(
void
)
triggerDownloadForCell
:(
VLCCloudStorageTableViewCell
*
)
cell
{
_selectedFile
=
_dropboxController
.
currentListFiles
[[
self
.
tableView
indexPathForCell
:
cell
].
row
];
...
...
Sources/VLCOneDriveController.m
View file @
bc43694c
...
...
@@ -10,7 +10,6 @@
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
#import "VLCOneDriveController.h"
#import "VLCOneDriveConstants.h"
#import "VLCOneDriveObject.h"
...
...
@@ -24,7 +23,6 @@
@interface
VLCOneDriveController
()
<
LiveAuthDelegate
,
VLCOneDriveObjectDelegate
,
VLCOneDriveObjectDownloadDelegate
>
{
LiveConnectClient
*
_liveClient
;
//VLCOneDriveObject *_folderiD;
NSString
*
_folderId
;
NSArray
*
_liveScopes
;
BOOL
_activeSession
;
...
...
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