浏览代码

OneDrive: implement directory listing and navigation

Felix Paul Kühne 10 年之前
父节点
当前提交
43a4fd81fd

+ 2 - 0
Sources/VLCCloudStorageTableViewCell.h

@@ -14,6 +14,7 @@
 #import <DropboxSDK/DropboxSDK.h>
 #import "GTLDrive.h"
 #import <BoxSDK/BoxSDK.h>
+#import "VLCOneDriveObject.h"
 
 @interface VLCCloudStorageTableViewCell : UITableViewCell
 
@@ -28,6 +29,7 @@
 @property (nonatomic, retain) DBMetadata *fileMetadata;
 @property (nonatomic, retain) GTLDriveFile *driveFile;
 @property (nonatomic, retain) BoxItem *boxFile;
+@property (nonatomic, retain) VLCOneDriveObject *oneDriveFile;
 
 + (VLCCloudStorageTableViewCell *)cellWithReuseIdentifier:(NSString *)ident;
 + (CGFloat)heightOfCell;

+ 22 - 0
Sources/VLCCloudStorageTableViewCell.m

@@ -54,6 +54,14 @@
     [self _updatedDisplayedInformation];
 }
 
+- (void)setOneDriveFile:(VLCOneDriveObject *)oneDriveFile
+{
+    if (oneDriveFile != _oneDriveFile)
+        _oneDriveFile = oneDriveFile;
+
+    [self _updatedDisplayedInformation];
+}
+
 - (void)_updatedDisplayedInformation
 {
     if (_fileMetadata != nil) {
@@ -136,9 +144,23 @@
             self.thumbnailView.image = [UIImage imageNamed:@"blank"];
             APLog(@"missing icon for type '%@'", self.boxFile);
         }
+    } else if(_oneDriveFile != nil) {
+        if (_oneDriveFile.isFolder) {
+            self.folderTitleLabel.text = self.oneDriveFile.name;
+            self.titleLabel.hidden = self.subtitleLabel.hidden = YES;
+            self.folderTitleLabel.hidden = NO;
+            self.thumbnailView.image = [UIImage imageNamed:@"folder"];
+        } else {
+            self.titleLabel.text = self.oneDriveFile.name;
+            self.subtitleLabel.text = (self.oneDriveFile.size > 0) ? [NSByteCountFormatter stringFromByteCount:[self.oneDriveFile.size longLongValue] countStyle:NSByteCountFormatterCountStyleFile]: @"";
+            self.titleLabel.hidden = self.subtitleLabel.hidden = NO;
+            self.folderTitleLabel.hidden = YES;
+            self.thumbnailView.image = [UIImage imageNamed:@"blank"];
+        }
     }
     //we don't have streaming for box yet
     self.downloadButton.hidden = _boxFile != nil;
+
     [self setNeedsDisplay];
 }
 

+ 1 - 1
Sources/VLCDropboxTableViewController.m

@@ -277,7 +277,7 @@
 }
 
 
-#pragma mark - VLCLocalNetworkListCell delegation
+#pragma mark - VLCCloudStorageTableViewCell delegation
 - (void)triggerDownloadForCell:(VLCCloudStorageTableViewCell *)cell
 {
     _selectedFile = _dropboxController.currentListFiles[[self.tableView indexPathForCell:cell].row];

+ 18 - 2
Sources/VLCOneDriveController.h

@@ -2,7 +2,7 @@
  * VLCOneDriveController.h
  * VLC for iOS
  *****************************************************************************
- * Copyright (c) 2014 VideoLAN. All rights reserved.
+ * Copyright (c) 2014-2015 VideoLAN. All rights reserved.
  * $Id$
  *
  * Authors: Felix Paul Kühne <fkuehne # videolan.org>
@@ -11,22 +11,38 @@
  *****************************************************************************/
 
 #import "VLCOneDriveTableViewController.h"
+#import "VLCOneDriveObject.h"
 
 @protocol VLCOneDriveControllerDelegate <NSObject>
 
+@required
+- (void)sessionWasUpdated;
+- (void)mediaListUpdated;
+
+@optional
+- (void)operationWithProgressInformationStarted;
+- (void)currentProgressInformation:(float)progress;
+- (void)updateRemainingTime:(NSString *)time;
+- (void)operationWithProgressInformationStopped;
+
+- (void)numberOfFilesWaitingToBeDownloadedChanged;
+
 @end
 
 @interface VLCOneDriveController : NSObject
 
 @property (nonatomic, weak) VLCOneDriveTableViewController *delegate;
 @property (readonly) BOOL activeSession;
+@property (readonly) BOOL userAuthenticated;
+@property (nonatomic, readonly) VLCOneDriveObject *rootFolder;
+@property (nonatomic, readwrite) VLCOneDriveObject *currentFolder;
 
 + (VLCOneDriveController *)sharedInstance;
 
 - (void)login;
 - (void)logout;
 
-- (void)requestDirectoryListingAtPath:(NSString *)path;
+- (void)loadCurrentFolder;
 - (void)downloadFileWithPath:(NSString *)path;
 - (void)streamFileWithPath:(NSString *)path;
 

+ 75 - 5
Sources/VLCOneDriveController.m

@@ -2,7 +2,7 @@
  * VLCOneDriveController.m
  * VLC for iOS
  *****************************************************************************
- * Copyright (c) 2014 VideoLAN. All rights reserved.
+ * Copyright (c) 2014-2015 VideoLAN. All rights reserved.
  * $Id$
  *
  * Authors: Felix Paul Kühne <fkuehne # videolan.org>
@@ -13,6 +13,7 @@
 
 #import "VLCOneDriveController.h"
 #import "VLCOneDriveConstants.h"
+#import "VLCOneDriveObject.h"
 
 /* the Live SDK doesn't have an umbrella header so we need to import what we need */
 #import <LiveSDK/LiveConnectClient.h>
@@ -20,7 +21,7 @@
 /* include private API headers */
 #import <LiveSDK/LiveApiHelper.h>
 
-@interface VLCOneDriveController () <LiveAuthDelegate, LiveDownloadOperationDelegate, LiveOperationDelegate>
+@interface VLCOneDriveController () <LiveAuthDelegate, LiveDownloadOperationDelegate, LiveOperationDelegate, VLCOneDriveObjectDelegate>
 {
     LiveConnectClient *_liveClient;
     NSArray *_liveScopes;
@@ -50,7 +51,7 @@
     if (!self)
         return self;
 
-    _liveScopes = @[@"wl.signin",@"wl.basic",@"wl.skydrive"];
+    _liveScopes = @[@"wl.signin",@"wl.offline_access",@"wl.skydrive"];
 
     _liveClient = [[LiveConnectClient alloc] initWithClientId:kVLCOneDriveClientID
                                                        scopes:_liveScopes
@@ -79,30 +80,68 @@
 {
     [_liveClient logoutWithDelegate:self userState:@"logout"];
     _activeSession = NO;
+    _userAuthenticated = NO;
 }
 
 - (void)authCompleted:(LiveConnectSessionStatus)status session:(LiveConnectSession *)session userState:(id)userState
 {
-    if (status == 1 && session != NULL)
+    NSLog(@"authCompleted, status %i, state %@", status, userState);
+
+    if (status == 1 && session != NULL && [userState isEqualToString:@"init"])
         _activeSession = YES;
     else
         _activeSession = NO;
+
+    if (status == 1 && session != NULL && [userState isEqualToString:@"login"])
+        _userAuthenticated = YES;
+    else
+        _userAuthenticated = NO;
+
+    if (self.delegate) {
+        if ([self.delegate respondsToSelector:@selector(sessionWasUpdated)])
+            [self.delegate performSelector:@selector(sessionWasUpdated)];
+    }
 }
 
 - (void)authFailed:(NSError *)error userState:(id)userState
 {
     APLog(@"OneDrive auth failed: %@, %@", error, userState);
     _activeSession = NO;
+
+    if (self.delegate) {
+        if ([self.delegate respondsToSelector:@selector(sessionWasUpdated)])
+            [self.delegate performSelector:@selector(sessionWasUpdated)];
+    }
 }
 
 #pragma mark - listing
 
-- (void)requestDirectoryListingAtPath:(NSString *)path
+- (void)loadTopLevelFolder
 {
+    _rootFolder = [[VLCOneDriveObject alloc] init];
+    _rootFolder.objectId = @"me/skydrive";
+    _rootFolder.name = @"OneDrive";
+    _rootFolder.type = @"folder";
+    _rootFolder.liveClient = _liveClient;
+    _rootFolder.delegate = self;
+
+    _currentFolder = _rootFolder;
+    [_rootFolder loadFolderContent];
+}
+
+- (void)loadCurrentFolder
+{
+    if (_currentFolder == nil)
+        [self loadTopLevelFolder];
+    else {
+        _currentFolder.delegate = self;
+        [_currentFolder loadFolderContent];
+    }
 }
 
 - (void)liveOperationSucceeded:(LiveOperation *)operation
 {
+    NSLog(@"%@", operation);
 }
 
 - (void)liveOperationFailed:(NSError *)error operation:(LiveOperation *)operation
@@ -125,4 +164,35 @@
 {
 }
 
+#pragma mark - skydrive object delegation
+
+- (void)folderContentLoaded:(VLCOneDriveObject *)sender
+{
+    NSLog(@"odc: foldercontent loaded: %@", [sender name]);
+
+    if (self.delegate)
+        [self.delegate performSelector:@selector(mediaListUpdated)];
+}
+
+- (void)folderContentLoadingFailed:(NSError *)error sender:(VLCOneDriveObject *)sender
+{
+    NSLog(@"folder content loading failed %@", error);
+}
+
+- (void)fileContentLoaded:(VLCOneDriveObject *)sender
+{
+}
+
+- (void)fileContentLoadingFailed:(NSError *)error sender:(VLCOneDriveObject *)sender
+{
+    NSLog(@"file content loading failed %@", error);
+}
+
+- (void)fullFolderTreeLoaded:(VLCOneDriveObject *)sender
+{
+    NSLog(@"fullFolderTreeLoaded");
+    if (self.delegate)
+        [self.delegate performSelector:@selector(mediaListUpdated)];
+}
+
 @end

+ 57 - 0
Sources/VLCOneDriveObject.h

@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * VLCOneDriveObject.h
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2015 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Authors: Felix Paul Kühne <fkuehne # videolan.org>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
+
+#import <LiveSDK/LiveConnectClient.h>
+
+@class VLCOneDriveObject;
+
+@protocol VLCOneDriveObjectDelegate <NSObject>
+
+- (void)folderContentLoaded:(VLCOneDriveObject *)sender;
+
+- (void)fullFolderTreeLoaded:(VLCOneDriveObject *)sender;
+
+- (void)folderContentLoadingFailed:(NSError *)error
+                            sender:(VLCOneDriveObject *) sender;
+
+- (void)fileContentLoaded:(VLCOneDriveObject *)sender;
+
+- (void)fileContentLoadingFailed:(NSError *)error
+                          sender:(VLCOneDriveObject *) sender;
+
+@end
+
+@interface VLCOneDriveObject : NSObject <LiveOperationDelegate, LiveDownloadOperationDelegate, VLCOneDriveObjectDelegate>
+
+@property (strong, nonatomic) VLCOneDriveObject *parent;
+@property (strong, nonatomic) NSString *objectId;
+@property (strong, nonatomic) NSString *name;
+@property (strong, nonatomic) NSString *type;
+@property (strong, nonatomic) NSNumber *size;
+@property (strong, nonatomic) NSString *thumbnailURL;
+@property (readonly, nonatomic) BOOL isFolder;
+
+@property (strong, nonatomic) NSArray *folders;
+@property (strong, nonatomic) NSArray *files;
+@property (strong, nonatomic) NSArray *items;
+
+@property (readonly, nonatomic) NSString *filesPath;
+@property (readonly, nonatomic) NSString *downloadPath;
+@property (readonly, nonatomic) BOOL hasFullFolderTree;
+
+@property (strong, nonatomic) LiveConnectClient *liveClient;
+@property (strong, nonatomic) id<VLCOneDriveObjectDelegate>delegate;
+
+- (void)loadFolderContent;
+- (void)loadFileContent;
+
+@end

+ 181 - 0
Sources/VLCOneDriveObject.m

@@ -0,0 +1,181 @@
+/*****************************************************************************
+ * VLCOneDriveObject.h
+ * VLC for iOS
+ *****************************************************************************
+ * Copyright (c) 2015 VideoLAN. All rights reserved.
+ * $Id$
+ *
+ * Authors: Felix Paul Kühne <fkuehne # videolan.org>
+ *
+ * Refer to the COPYING file of the official project for license.
+ *****************************************************************************/
+
+#import "VLCOneDriveObject.h"
+
+@implementation VLCOneDriveObject
+
+#pragma mark properties
+
+- (BOOL)isFolder
+{
+    return [self.type isEqual:@"folder"] || [self.type isEqual:@"album"];
+}
+
+- (NSString *)filesPath
+{
+    return [self.objectId stringByAppendingString:@"/files"];
+}
+
+- (NSString *)downloadPath
+{
+    return self.objectId;
+}
+
+- (BOOL)hasFullFolderTree
+{
+    BOOL hasFullTree = YES;
+
+    if (self.folders != nil) {
+        NSUInteger count = self.folders.count;
+
+        for (NSUInteger x = 0; x < count; x++) {
+            VLCOneDriveObject *folder = self.folders[x];
+            if (!folder.hasFullFolderTree) {
+                hasFullTree = NO;
+                break;
+            }
+        }
+    } else
+        hasFullTree = NO;
+
+    return hasFullTree;
+}
+
+#pragma mark - actions
+
+- (void)loadFolderContent
+{
+    NSLog(@"loadFolderContent");
+    if (!self.isFolder) {
+        APLog(@"%@ is no folder, can't load content", self.objectId);
+        return;
+    }
+
+    if (self.folders == nil) {
+        [self.liveClient getWithPath:self.filesPath
+                            delegate:self
+                           userState:@"load-folder-content"];
+    } else {
+        NSUInteger count = self.folders.count;
+
+        for (NSUInteger x = 0; x < count; x++) {
+            VLCOneDriveObject *folder = self.folders[x];
+            if (!folder.hasFullFolderTree) {
+                [folder loadFolderContent];
+                return;
+            }
+        }
+
+        [self.delegate fullFolderTreeLoaded:self];
+    }
+}
+
+- (void)loadFileContent
+{
+}
+
+#pragma mark - live operations
+
+- (void)liveOperationSucceeded:(LiveDownloadOperation *)operation
+{
+    NSString *userState = operation.userState;
+
+    NSLog(@"liveOperationSucceeded: %@", userState);
+
+    if ([userState isEqualToString:@"load-file-content"]) {
+//        LiveDownloadOperation *downloadOperation = (LiveDownloadOperation *)operation;
+
+        //FIXME: handle the incoming data!
+
+        [self.delegate fileContentLoaded:self];
+    } else if ([userState isEqualToString:@"load-folder-content"]) {
+        NSMutableArray *subFolders = [[NSMutableArray alloc] init];
+        NSMutableArray *folderFiles = [[NSMutableArray alloc] init];
+        NSMutableArray *items = [[NSMutableArray alloc] init];
+        NSArray *rawFolderObjects = operation.result[@"data"];
+        BOOL hasSubFolders = NO;
+        NSUInteger count = rawFolderObjects.count;
+
+        for (NSUInteger x = 0; x < count; x++) {
+            NSDictionary *rawObject = rawFolderObjects[x];
+            VLCOneDriveObject *oneDriveObject = [[VLCOneDriveObject alloc] init];
+
+            oneDriveObject.parent = self;
+            oneDriveObject.objectId = rawObject[@"id"];
+            oneDriveObject.name = rawObject[@"name"];
+            oneDriveObject.type = rawObject[@"type"];
+
+            oneDriveObject.liveClient = self.liveClient;
+
+            if (oneDriveObject.isFolder) {
+                hasSubFolders = YES;
+                [subFolders addObject:oneDriveObject];
+            } else {
+                oneDriveObject.size = rawObject[@"size"];
+                oneDriveObject.thumbnailURL = rawObject[@"picture"];
+                [folderFiles addObject:oneDriveObject];
+            }
+            [items addObject:oneDriveObject];
+        }
+
+        NSLog(@"we found %i items", items.count);
+        for (NSUInteger x = 0; x < items.count; x++)
+            NSLog(@"%@", [items[x] name]);
+
+        self.folders = subFolders;
+        self.files = folderFiles;
+        self.items = items;
+        [self.delegate folderContentLoaded:self];
+    }
+}
+
+- (void)liveOperationFailed:(NSError *)error operation:(LiveDownloadOperation *)operation
+{
+    NSString *userState = operation.userState;
+
+    NSLog(@"liveOperationFailed %@ (%@)", userState, error);
+
+    if ([userState isEqualToString:@"load-folder-content"])
+        [self.delegate folderContentLoadingFailed:error sender:self];
+    else if ([userState isEqualToString:@"load-file-content"])
+        [self.delegate fileContentLoadingFailed:error sender:self];
+    else
+        APLog(@"failing live operation with state %@ failed with error %@", userState, error);
+}
+
+#pragma mark - delegation
+
+- (void)folderContentLoaded:(VLCOneDriveObject *)sender
+{
+}
+
+- (void)folderContentLoadingFailed:(NSError *)error sender:(VLCOneDriveObject *)sender
+{
+    if (self.delegate)
+        [self.delegate folderContentLoadingFailed:error sender:self];
+}
+
+- (void)fullFolderTreeLoaded:(VLCOneDriveObject *)sender
+{
+    [self loadFolderContent];
+}
+
+- (void)fileContentLoaded:(VLCOneDriveObject *)sender
+{
+}
+
+- (void)fileContentLoadingFailed:(NSError *)error sender:(VLCOneDriveObject *)sender
+{
+}
+
+@end

+ 79 - 17
Sources/VLCOneDriveTableViewController.m

@@ -2,7 +2,7 @@
  * VLCOneDriveTableViewController.m
  * VLC for iOS
  *****************************************************************************
- * Copyright (c) 2014 VideoLAN. All rights reserved.
+ * Copyright (c) 2014-2015 VideoLAN. All rights reserved.
  * $Id$
  *
  * Authors: Felix Paul Kühne <fkuehne # videolan.org>
@@ -17,7 +17,7 @@
 #import "VLCAppDelegate.h"
 #import "VLCOneDriveController.h"
 
-@interface VLCOneDriveTableViewController () <UITableViewDataSource, UITableViewDelegate>
+@interface VLCOneDriveTableViewController () <UITableViewDataSource, UITableViewDelegate, VLCOneDriveControllerDelegate, VLCCloudStorageTableViewCell>
 {
     UIBarButtonItem *_backButton;
     UIBarButtonItem *_logoutButton;
@@ -25,6 +25,7 @@
     UIActivityIndicatorView *_activityIndicator;
 
     VLCOneDriveController *_oneDriveController;
+    NSString *_currentPath;
 }
 @end
 
@@ -52,10 +53,10 @@
     self.cloudStorageLogo = nil;
     if (!SYSTEM_RUNS_IOS7_OR_LATER) {
         self.flatLoginButton.hidden = YES;
-        [self.loginButton setTitle:NSLocalizedString(@"ONEDRIVE_LOGIN", nil) forState:UIControlStateNormal];
+        [self.loginButton setTitle:NSLocalizedString(@"DROPBOX_LOGIN", nil) forState:UIControlStateNormal];
     } else {
         self.loginButton.hidden = YES;
-        [self.flatLoginButton setTitle:NSLocalizedString(@"ONEDRIVE_LOGIN", nil) forState:UIControlStateNormal];
+        [self.flatLoginButton setTitle:NSLocalizedString(@"DROPBOX_LOGIN", nil) forState:UIControlStateNormal];
     }
 
     _activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
@@ -71,8 +72,11 @@
 {
     [super viewWillAppear:animated];
 
-    // FIXME: we should update the listing...
-    [self _showLoginDialog];
+    if (_oneDriveController.activeSession)
+        [_oneDriveController login];
+
+    if (!_oneDriveController.userAuthenticated)
+        [self _showLoginDialog];
 
     [self.cloudStorageLogo sizeToFit];
     self.cloudStorageLogo.center = self.view.center;
@@ -82,33 +86,54 @@
 
 - (IBAction)goBack:(id)sender
 {
-    //FIXME: handle case for being in a folder
-    [self.navigationController popViewControllerAnimated:YES];
+    if (_oneDriveController.rootFolder != _oneDriveController.currentFolder) {
+        _oneDriveController.currentFolder = _oneDriveController.currentFolder.parent;
+        [_activityIndicator startAnimating];
+        [_oneDriveController loadCurrentFolder];
+    } else
+        [self.navigationController popViewControllerAnimated:YES];
 }
 
 #pragma mark - table view data source
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
 {
-    return 0;
+    return _oneDriveController.currentFolder.items.count;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
-    return nil;
+    static NSString *CellIdentifier = @"OneDriveCell";
+
+    VLCCloudStorageTableViewCell *cell = (VLCCloudStorageTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil)
+        cell = [VLCCloudStorageTableViewCell cellWithReuseIdentifier:CellIdentifier];
+
+    cell.oneDriveFile = _oneDriveController.currentFolder.items[indexPath.row];
+    cell.delegate = self;
+
+    return cell;
 }
 
 #pragma mark - table view delegate
 
-- (void)tableView:(UITableView *)tableView
-  willDisplayCell:(UITableViewCell *)cell
-forRowAtIndexPath:(NSIndexPath *)indexPath
+- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
 {
     cell.backgroundColor = (indexPath.row % 2 == 0)? [UIColor blackColor]: [UIColor VLCDarkBackgroundColor];
 }
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
+    VLCOneDriveObject *selectedObject = _oneDriveController.currentFolder.items[indexPath.row];
+
+    if (selectedObject.isFolder) {
+        /* dive into sub folder */
+        [_activityIndicator startAnimating];
+        _oneDriveController.currentFolder = selectedObject;
+        [_oneDriveController loadCurrentFolder];
+    }
+
+    [self.tableView deselectRowAtIndexPath:indexPath animated:NO];
 }
 
 #pragma mark - login dialog
@@ -128,10 +153,47 @@ forRowAtIndexPath:(NSIndexPath *)indexPath
 
 - (void)loginAction:(id)sender
 {
-    if (![_oneDriveController activeSession])
-        [_oneDriveController login];
-    else
-        [_oneDriveController logout];
+    [_oneDriveController login];
+}
+
+#pragma mark - onedrive controller delegation
+
+- (void)mediaListUpdated
+{
+    [_activityIndicator stopAnimating];
+
+    [self.tableView reloadData];
+}
+
+- (void)sessionWasUpdated
+{
+    [self updateViewAfterSessionChange];
+}
+
+#pragma mark - app delegate
+
+- (void)updateViewAfterSessionChange
+{
+    self.navigationItem.rightBarButtonItem = _logoutButton;
+    if (![_oneDriveController userAuthenticated]) {
+        [self _showLoginDialog];
+        return;
+    } else if (self.loginToCloudStorageView.superview) {
+        [self.loginToCloudStorageView removeFromSuperview];
+    }
+
+    if (_oneDriveController.currentFolder != nil)
+        [self mediaListUpdated];
+    else {
+        [_activityIndicator startAnimating];
+        [_oneDriveController loadCurrentFolder];
+    }
+}
+
+#pragma mark - cell delegationx
+
+- (void)triggerDownloadForCell:(VLCCloudStorageTableViewCell *)cell
+{
 }
 
 @end

+ 6 - 0
VLC for iOS.xcodeproj/project.pbxproj

@@ -342,6 +342,7 @@
 		7DA7C907186324FA00B56120 /* serverIcon@4x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7DA7C904186324FA00B56120 /* serverIcon@4x.png */; };
 		7DA8B0FB173318E80029698C /* SourceCodePro-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7DA8B0F9173318E80029698C /* SourceCodePro-Regular.ttf */; };
 		7DB638AB185BC0890003887C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DB638AA185BC0890003887C /* Images.xcassets */; };
+		7DB847D71A5871570002DC30 /* VLCOneDriveObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DB847D61A5871570002DC30 /* VLCOneDriveObject.m */; };
 		7DBBF182183AB3B80009A339 /* VLCAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DBBF181183AB3B80009A339 /* VLCAppDelegate.m */; };
 		7DBBF19A183AB4300009A339 /* VLCCloudStorageTableViewCell~ipad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7DBBF185183AB4300009A339 /* VLCCloudStorageTableViewCell~ipad.xib */; };
 		7DBBF19B183AB4300009A339 /* VLCCloudStorageTableViewCell~iphone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7DBBF186183AB4300009A339 /* VLCCloudStorageTableViewCell~iphone.xib */; };
@@ -1093,6 +1094,8 @@
 		7DB2487118EA1D6E0097ADD2 /* ro */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ro; path = "ro.lproj/badgeUnread~ipad.png"; sourceTree = "<group>"; };
 		7DB2487218EA1D6E0097ADD2 /* ro */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ro; path = "ro.lproj/badgeUnread~iphone.png"; sourceTree = "<group>"; };
 		7DB638AA185BC0890003887C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = "vlc-ios/Images.xcassets"; sourceTree = "<group>"; };
+		7DB847D51A5871570002DC30 /* VLCOneDriveObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCOneDriveObject.h; path = Sources/VLCOneDriveObject.h; sourceTree = SOURCE_ROOT; };
+		7DB847D61A5871570002DC30 /* VLCOneDriveObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCOneDriveObject.m; path = Sources/VLCOneDriveObject.m; sourceTree = SOURCE_ROOT; };
 		7DBBF180183AB3B80009A339 /* VLCAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCAppDelegate.h; path = Sources/VLCAppDelegate.h; sourceTree = SOURCE_ROOT; };
 		7DBBF181183AB3B80009A339 /* VLCAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCAppDelegate.m; path = Sources/VLCAppDelegate.m; sourceTree = SOURCE_ROOT; };
 		7DBBF185183AB4300009A339 /* VLCCloudStorageTableViewCell~ipad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = "VLCCloudStorageTableViewCell~ipad.xib"; path = "Resources/VLCCloudStorageTableViewCell~ipad.xib"; sourceTree = SOURCE_ROOT; };
@@ -1603,6 +1606,8 @@
 				7D1052E81A4DCC1100295F08 /* VLCOneDriveTableViewController.m */,
 				7D1052EC1A4DCD1E00295F08 /* VLCOneDriveController.h */,
 				7D1052ED1A4DCD1E00295F08 /* VLCOneDriveController.m */,
+				7DB847D51A5871570002DC30 /* VLCOneDriveObject.h */,
+				7DB847D61A5871570002DC30 /* VLCOneDriveObject.m */,
 			);
 			name = OneDrive;
 			sourceTree = "<group>";
@@ -3219,6 +3224,7 @@
 				7D30F3D0183AB2AC00FFC021 /* VLCMediaFileDiscoverer.m in Sources */,
 				493B1A1D195D06B1000A491A /* BasicUPnPDevice+VLC.m in Sources */,
 				265D511D1922746C00E38383 /* VLCPlexParser.m in Sources */,
+				7DB847D71A5871570002DC30 /* VLCOneDriveObject.m in Sources */,
 				7D1052E91A4DCC1100295F08 /* VLCOneDriveTableViewController.m in Sources */,
 				7D30F3D7183AB2F100FFC021 /* VLCLocalNetworkListCell.m in Sources */,
 				265D511C1922746C00E38383 /* VLCLocalPlexFolderListViewController.m in Sources */,