AppDelegate.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. //
  2. // AppDelegate.h
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 04/09/14.
  6. // Copyright (c) 2014 Marino Faggiana. All rights reserved.
  7. //
  8. // Author Marino Faggiana <marino.faggiana@nextcloud.com>
  9. //
  10. // This program is free software: you can redistribute it and/or modify
  11. // it under the terms of the GNU General Public License as published by
  12. // the Free Software Foundation, either version 3 of the License, or
  13. // (at your option) any later version.
  14. //
  15. // This program is distributed in the hope that it will be useful,
  16. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. // GNU General Public License for more details.
  19. //
  20. // You should have received a copy of the GNU General Public License
  21. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. //
  23. #import <Foundation/Foundation.h>
  24. #import <UserNotifications/UserNotifications.h>
  25. #import <PushKit/PushKit.h>
  26. #import <AVKit/AVKit.h>
  27. #import <LocalAuthentication/LocalAuthentication.h>
  28. #import <TOPasscodeViewController/TOPasscodeViewController.h>
  29. #import "CCUtility.h"
  30. #import "CCSettings.h"
  31. #import "CCLogin.h"
  32. @class NCFiles;
  33. @class NCFileViewInFolder;
  34. @class NCRecent;
  35. @class CCMore;
  36. @class NCMedia;
  37. @class NCOffline;
  38. @class NCTransfers;
  39. @class NCFavorite;
  40. @class NCShares;
  41. @class NCTrash;
  42. @class NCAppConfigView;
  43. @class IMImagemeterViewer;
  44. @class NCDetailViewController;
  45. @class NCNetworkingAutoUpload;
  46. @class NCDocumentPickerViewController;
  47. @class FileProviderDomain;
  48. @interface AppDelegate : UIResponder <UIApplicationDelegate, UNUserNotificationCenterDelegate>
  49. // Timer Process
  50. @property (nonatomic, strong) NSTimer *timerUpdateApplicationIconBadgeNumber;
  51. @property (nonatomic, strong) NSTimer *timerErrorNetworking;
  52. @property (nonatomic, strong) UIWindow *window;
  53. @property (nonatomic, strong) NCDocumentPickerViewController *documentPickerViewController;
  54. // Parameter account
  55. @property (nonatomic, strong) NSString *account;
  56. @property (nonatomic, strong) NSString *urlBase;
  57. @property (nonatomic, strong) NSString *user;
  58. @property (nonatomic, strong) NSString *userID;
  59. @property (nonatomic, strong) NSString *password;
  60. // next version ... ? ...
  61. @property double currentLatitude;
  62. @property double currentLongitude;
  63. // Networking
  64. @property (nonatomic, copy) void (^backgroundSessionCompletionHandler)(void);
  65. // UploadFromOtherUpp
  66. @property (nonatomic, strong) NSString *fileNameUpload;
  67. // Passcode lockDirectory
  68. @property (nonatomic, strong) NSDate *sessionePasscodeLock;
  69. // Audio Video
  70. @property (nonatomic, strong) AVPlayer *player;
  71. @property (nonatomic, strong) AVPlayerViewController *playerController;
  72. @property BOOL isMediaObserver;
  73. // Push Norification Token
  74. @property (nonatomic, strong) NSString *pushKitToken;
  75. // ProgressView Detail
  76. @property (nonatomic, strong) UIProgressView *progressViewDetail;
  77. @property (nonatomic, retain) TOPasscodeViewController *passcodeViewController;
  78. @property (nonatomic, retain) NSString *activeServerUrl;
  79. @property (nonatomic, retain) UIViewController *activeViewController;
  80. @property (nonatomic, retain) NCFiles *activeFiles;
  81. @property (nonatomic, retain) NCFileViewInFolder *activeFileViewInFolder;
  82. @property (nonatomic, retain) NCFavorite *activeFavorite;
  83. @property (nonatomic, retain) NCRecent *activeRecent;
  84. @property (nonatomic, retain) NCShares *activeShares;
  85. @property (nonatomic, retain) NCMedia *activeMedia;
  86. @property (nonatomic, retain) NCDetailViewController *activeDetail;
  87. @property (nonatomic, retain) NCTransfers *activeTransfers;
  88. @property (nonatomic, retain) CCLogin *activeLogin;
  89. @property (nonatomic, retain) NCLoginWeb *activeLoginWeb;
  90. @property (nonatomic, retain) CCMore *activeMore;
  91. @property (nonatomic, retain) NCOffline *activeOffline;
  92. @property (nonatomic, retain) NCTrash *activeTrash;
  93. @property (nonatomic, retain) NCAppConfigView *appConfigView;
  94. @property (nonatomic, retain) IMImagemeterViewer *activeImagemeterView;
  95. @property (nonatomic, strong) NSMutableDictionary *listMainVC;
  96. @property (nonatomic, strong) NSMutableDictionary *listFilesVC;
  97. @property (nonatomic, strong) NSMutableDictionary *listFavoriteVC;
  98. @property (nonatomic, strong) NSMutableDictionary *listOfflineVC;
  99. @property (nonatomic, strong) NSMutableDictionary *listProgressMetadata;
  100. @property (nonatomic) UIUserInterfaceStyle preferredUserInterfaceStyle API_AVAILABLE(ios(12.0));
  101. // Shares
  102. @property (nonatomic, strong) NSArray *shares;
  103. // Maintenance Mode
  104. @property BOOL maintenanceMode;
  105. // UserDefaults
  106. @property (nonatomic, strong) NSUserDefaults *ncUserDefaults;
  107. // Network Auto Upload
  108. @property (nonatomic, strong) NCNetworkingAutoUpload *networkingAutoUpload;
  109. // Login
  110. - (void)startTimerErrorNetworking;
  111. - (void)openLoginView:(UIViewController *)viewController selector:(NSInteger)selector openLoginWeb:(BOOL)openLoginWeb;
  112. // Setting Account & Communication
  113. - (void)settingAccount:(NSString *)account urlBase:(NSString *)urlBase user:(NSString *)user userID:(NSString *)userID password:(NSString *)password;
  114. - (void)deleteAccount:(NSString *)account wipe:(BOOL)wipe;
  115. - (void)settingSetupCommunication:(NSString *)account;
  116. // Quick Actions - ShotcutItem
  117. - (void)configDynamicShortcutItems;
  118. - (BOOL)handleShortCutItem:(UIApplicationShortcutItem *)shortcutItem;
  119. // TabBarController
  120. - (void)createTabBarController:(UITabBarController *)tabBarController;
  121. // Push Notification
  122. - (void)pushNotification;
  123. // Theming Color
  124. - (void)settingThemingColorBrand;
  125. - (void)changeTheming:(UIViewController *)viewController tableView:(UITableView *)tableView collectionView:(UICollectionView *)collectionView form:(BOOL)form;
  126. // Maintenance Mode
  127. - (void)maintenanceMode:(BOOL)mode;
  128. @end