AppDelegate.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. //
  2. // AppDelegate.h
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 04/09/14.
  6. // Copyright (c) 2017 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 "Reachability.h"
  30. #import "CCUtility.h"
  31. #import "CCMain.h"
  32. #import "CCSettings.h"
  33. #import "CCFavorites.h"
  34. #import "CCTransfers.h"
  35. @class CCMore;
  36. @class NCMedia;
  37. @class NCOffline;
  38. @class NCAppConfigView;
  39. @class IMImagemeterViewer;
  40. @class NCDetailViewController;
  41. @interface AppDelegate : UIResponder <UIApplicationDelegate, UNUserNotificationCenterDelegate>
  42. // Timer Process
  43. @property (nonatomic, strong) NSTimer *timerProcessAutoDownloadUpload;
  44. @property (nonatomic, strong) NSTimer *timerUpdateApplicationIconBadgeNumber;
  45. @property (nonatomic, strong) NSTimer *timerErrorNetworking;
  46. // For LMMediaPlayerView
  47. @property (strong, nonatomic) UIWindow *window;
  48. // User
  49. @property (nonatomic, strong) NSString *activeAccount;
  50. @property (nonatomic, strong) NSString *activeUrl;
  51. @property (nonatomic, strong) NSString *activeUser;
  52. @property (nonatomic, strong) NSString *activeUserID;
  53. @property (nonatomic, strong) NSString *activePassword;
  54. @property (nonatomic, strong) NSString *activeEmail;
  55. // next version ... ? ...
  56. @property double currentLatitude;
  57. @property double currentLongitude;
  58. // Networking
  59. @property (nonatomic, copy) void (^backgroundSessionCompletionHandler)(void);
  60. // UploadFromOtherUpp
  61. @property (nonatomic, strong) NSString *fileNameUpload;
  62. // Passcode lockDirectory
  63. @property (nonatomic, strong) NSDate *sessionePasscodeLock;
  64. // Audio Video
  65. @property (nonatomic, strong) AVPlayer *player;
  66. @property (nonatomic, strong) AVPlayerViewController *playerController;
  67. @property BOOL isMediaObserver;
  68. // Push Norification Token
  69. @property (nonatomic, strong) NSString *pushKitToken;
  70. // ProgressView Detail
  71. @property (nonatomic, strong) UIProgressView *progressViewDetail;
  72. // Reachability
  73. @property (nonatomic, strong) Reachability *reachability;
  74. @property BOOL lastReachability;
  75. @property (nonatomic, retain) TOPasscodeViewController *passcodeViewController;
  76. @property (nonatomic, strong) CCMain *activeMain;
  77. @property (nonatomic, strong) CCMain *homeMain;
  78. @property (nonatomic, strong) CCFavorites *activeFavorites;
  79. @property (nonatomic, strong) NCMedia *activeMedia;
  80. @property (nonatomic, retain) NCDetailViewController *activeDetail;
  81. @property (nonatomic, retain) CCTransfers *activeTransfers;
  82. @property (nonatomic, retain) CCLogin *activeLogin;
  83. @property (nonatomic, retain) NCLoginWeb *activeLoginWeb;
  84. @property (nonatomic, retain) CCMore *activeMore;
  85. @property (nonatomic, retain) NCOffline *activeOffline;
  86. @property (nonatomic, retain) NCAppConfigView *appConfigView;
  87. @property (nonatomic, retain) IMImagemeterViewer *activeImagemeterView;
  88. @property (nonatomic, strong) NSMutableDictionary *listMainVC;
  89. @property (nonatomic, strong) NSMutableDictionary *listProgressMetadata;
  90. @property (nonatomic, strong) NSMutableArray *arrayDeleteMetadata;
  91. @property (nonatomic, strong) NSMutableArray *arrayMoveMetadata;
  92. @property (nonatomic, strong) NSMutableArray *arrayMoveServerUrlTo;
  93. @property (nonatomic, strong) NSMutableArray *arrayCopyMetadata;
  94. @property (nonatomic, strong) NSMutableArray *arrayCopyServerUrlTo;
  95. @property (nonatomic) UIUserInterfaceStyle preferredUserInterfaceStyle API_AVAILABLE(ios(12.0));
  96. @property (nonatomic, strong) NSMutableArray *sessionPendingStatusInUpload;
  97. // Shares
  98. @property (nonatomic, strong) NSArray *shares;
  99. // Maintenance Mode
  100. @property BOOL maintenanceMode;
  101. // UserDefaults
  102. @property (nonatomic, strong) NSUserDefaults *ncUserDefaults;
  103. // Login
  104. - (void)startTimerErrorNetworking;
  105. - (void)openLoginView:(UIViewController *)viewController selector:(NSInteger)selector openLoginWeb:(BOOL)openLoginWeb;
  106. // Setting Account
  107. - (void)settingActiveAccount:(NSString *)activeAccount activeUrl:(NSString *)activeUrl activeUser:(NSString *)activeUser activeUserID:(NSString *)activeUserID activePassword:(NSString *)activePassword;
  108. - (void)settingWebDavRoot:(NSString *)webdavRoot;
  109. - (void)deleteAccount:(NSString *)account wipe:(BOOL)wipe;
  110. // Quick Actions - ShotcutItem
  111. - (void)configDynamicShortcutItems;
  112. - (BOOL)handleShortCutItem:(UIApplicationShortcutItem *)shortcutItem;
  113. // ApplicationIconBadgeNumber
  114. - (void)updateApplicationIconBadgeNumber;
  115. // TabBarController
  116. - (void)createTabBarController:(UITabBarController *)tabBarController;
  117. - (NSString *)getTabBarControllerActiveServerUrl;
  118. // Push Notification
  119. - (void)pushNotification;
  120. - (void)unsubscribingNextcloudServerPushNotification:(NSString *)account url:(NSString *)url withSubscribing:(BOOL)subscribing;
  121. // Theming Color
  122. - (void)settingThemingColorBrand;
  123. - (void)changeTheming:(UIViewController *)viewController tableView:(UITableView *)tableView collectionView:(UICollectionView *)collectionView form:(BOOL)form;
  124. // Task Networking
  125. - (void)loadAutoDownloadUpload;
  126. - (void)startLoadAutoDownloadUpload;
  127. // Maintenance Mode
  128. - (void)maintenanceMode:(BOOL)mode;
  129. @end