AppDelegate.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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 "BKPasscodeLockScreenManager.h"
  27. #import "Reachability.h"
  28. #import "CCBKPasscode.h"
  29. #import "CCUtility.h"
  30. #import "CCDetail.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. @interface AppDelegate : UIResponder <UIApplicationDelegate, BKPasscodeLockScreenManagerDelegate, BKPasscodeViewControllerDelegate, CCNetworkingDelegate, PKPushRegistryDelegate>
  41. // Timer Process
  42. @property (nonatomic, strong) NSTimer *timerProcessAutoDownloadUpload;
  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. // Notification
  58. @property (nonatomic, strong) NSMutableArray<OCCommunication *> *listOfNotifications;
  59. // Networking
  60. @property (nonatomic, copy) void (^backgroundSessionCompletionHandler)(void);
  61. // UploadFromOtherUpp
  62. @property (nonatomic, strong) NSString *fileNameUpload;
  63. // Passcode lockDirectory
  64. @property (nonatomic, strong) NSDate *sessionePasscodeLock;
  65. // Audio Video
  66. @property (nonatomic, strong) AVPlayer *player;
  67. @property (nonatomic, strong) AVPlayerViewController *playerController;
  68. // Push Norification Token
  69. @property (nonatomic, strong) NSString *pushKitToken;
  70. // Reachability
  71. @property (nonatomic, strong) Reachability *reachability;
  72. @property BOOL lastReachability;
  73. @property (nonatomic, strong) CCMain *activeMain;
  74. @property (nonatomic, strong) CCMain *homeMain;
  75. @property (nonatomic, strong) CCFavorites *activeFavorites;
  76. @property (nonatomic, strong) NCMedia *activeMedia;
  77. @property (nonatomic, retain) CCDetail *activeDetail;
  78. @property (nonatomic, retain) CCTransfers *activeTransfers;
  79. @property (nonatomic, retain) CCLogin *activeLogin;
  80. @property (nonatomic, retain) NCLoginWeb *activeLoginWeb;
  81. @property (nonatomic, retain) CCMore *activeMore;
  82. @property (nonatomic, retain) NCOffline *activeOffline;
  83. @property (nonatomic, retain) NCAppConfigView *appConfigView;
  84. @property (nonatomic, retain) IMImagemeterViewer *activeImagemeterView;
  85. @property (nonatomic, strong) NSMutableDictionary *listMainVC;
  86. @property (nonatomic, strong) NSMutableDictionary *listProgressMetadata;
  87. @property (nonatomic, strong) NSMutableArray *filterocId;
  88. @property (nonatomic, strong) NSMutableArray *sessionPendingStatusInUpload;
  89. @property (nonatomic) UIUserInterfaceStyle preferredUserInterfaceStyle API_AVAILABLE(ios(12.0));
  90. // Shares
  91. @property (nonatomic, strong) NSArray *shares;
  92. // Maintenance Mode
  93. @property BOOL maintenanceMode;
  94. // UserDefaults
  95. @property (nonatomic, strong) NSUserDefaults *ncUserDefaults;
  96. // Login
  97. - (void)startTimerErrorNetworking;
  98. - (void)openLoginView:(UIViewController *)viewController selector:(NSInteger)selector openLoginWeb:(BOOL)openLoginWeb;
  99. // Setting Account
  100. - (void)settingActiveAccount:(NSString *)activeAccount activeUrl:(NSString *)activeUrl activeUser:(NSString *)activeUser activeUserID:(NSString *)activeUserID activePassword:(NSString *)activePassword;
  101. - (void)deleteAccount:(NSString *)account wipe:(BOOL)wipe;
  102. // Quick Actions - ShotcutItem
  103. - (void)configDynamicShortcutItems;
  104. - (BOOL)handleShortCutItem:(UIApplicationShortcutItem *)shortcutItem;
  105. // ApplicationIconBadgeNumber
  106. - (void)updateApplicationIconBadgeNumber;
  107. // TabBarController
  108. - (void)createTabBarController:(UITabBarController *)tabBarController;
  109. - (void)plusButtonVisibile:(BOOL)visible;
  110. - (void)selectedTabBarController:(NSInteger)index;
  111. - (NSString *)getTabBarControllerActiveServerUrl;
  112. // Push Notification
  113. - (void)pushNotification;
  114. - (void)unsubscribingNextcloudServerPushNotification:(NSString *)account url:(NSString *)url withSubscribing:(BOOL)subscribing;
  115. // Theming Color
  116. - (void)settingThemingColorBrand;
  117. - (void)changeTheming:(UIViewController *)viewController tableView:(UITableView *)tableView collectionView:(UICollectionView *)collectionView form:(BOOL)form;
  118. // Task Networking
  119. - (void)loadAutoDownloadUpload;
  120. - (void)startLoadAutoDownloadUpload;
  121. // Maintenance Mode
  122. - (void)maintenanceMode:(BOOL)mode;
  123. @end