AppDelegate.h 5.5 KB

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