AppDelegate.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. //
  2. // AppDelegate.h
  3. // Nextcloud iOS
  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 "REMenu.h"
  28. #import "Reachability.h"
  29. #import "TWMessageBarManager.h"
  30. #import "CCBKPasscode.h"
  31. #import "CCUtility.h"
  32. #import "CCDetail.h"
  33. #import "CCMain.h"
  34. #import "CCSettings.h"
  35. #import "CCFavorites.h"
  36. #import "CCTransfers.h"
  37. @class CCLoginWeb;
  38. @class CCMore;
  39. @class NCMedia;
  40. @interface AppDelegate : UIResponder <UIApplicationDelegate, BKPasscodeLockScreenManagerDelegate, BKPasscodeViewControllerDelegate, TWMessageBarStyleSheet, 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. // Network Share
  62. @property (nonatomic, strong) NSMutableDictionary *sharesID;
  63. @property (nonatomic, strong) NSMutableDictionary *sharesLink;
  64. @property (nonatomic, strong) NSMutableDictionary *sharesUserAndGroup;
  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. // Push Norification Token
  73. @property (nonatomic, strong) NSString *pushKitToken;
  74. // Remenu
  75. @property (nonatomic, strong) REMenu *reMainMenu;
  76. @property (nonatomic, strong) REMenuItem *selezionaItem;
  77. @property (nonatomic, strong) REMenuItem *sortFileNameAZItem;
  78. @property (nonatomic, strong) REMenuItem *sortFileNameZAItem;
  79. @property (nonatomic, strong) REMenuItem *sortDateMoreRecentItem;
  80. @property (nonatomic, strong) REMenuItem *sortDateLessRecentItem;
  81. @property (nonatomic, strong) REMenuItem *sortSmallestItem;
  82. @property (nonatomic, strong) REMenuItem *sortLargestItem;
  83. @property (nonatomic, strong) REMenuItem *alphabeticItem;
  84. @property (nonatomic, strong) REMenuItem *typefileItem;
  85. @property (nonatomic, strong) REMenuItem *dateItem;
  86. @property (nonatomic, strong) REMenuItem *directoryOnTopItem;
  87. @property (nonatomic, strong) REMenu *reSelectMenu;
  88. @property (nonatomic, strong) REMenuItem *selectAllItem;
  89. @property (nonatomic, strong) REMenuItem *deleteItem;
  90. @property (nonatomic, strong) REMenuItem *moveItem;
  91. @property (nonatomic, strong) REMenuItem *encryptItem;
  92. @property (nonatomic, strong) REMenuItem *decryptItem;
  93. @property (nonatomic, strong) REMenuItem *downloadItem;
  94. @property (nonatomic, strong) REMenuItem *saveItem;
  95. // Reachability
  96. @property (nonatomic, strong) Reachability *reachability;
  97. @property BOOL lastReachability;
  98. @property (nonatomic, strong) CCMain *activeMain;
  99. @property (nonatomic, strong) CCMain *homeMain;
  100. @property (nonatomic, strong) CCFavorites *activeFavorites;
  101. @property (nonatomic, strong) NCMedia *activeMedia;
  102. @property (nonatomic, retain) CCDetail *activeDetail;
  103. @property (nonatomic, retain) CCSettings *activeSettings;
  104. @property (nonatomic, retain) CCTransfers *activeTransfers;
  105. @property (nonatomic, retain) CCLogin *activeLogin;
  106. @property (nonatomic, retain) CCLoginWeb *activeLoginWeb;
  107. @property (nonatomic, retain) CCMore *activeMore;
  108. @property (nonatomic, strong) NSMutableDictionary *listMainVC;
  109. @property (nonatomic, strong) NSMutableDictionary *listProgressMetadata;
  110. @property (nonatomic, strong) NSMutableArray *filterFileID;
  111. @property (nonatomic, strong) NSMutableArray *sessionPendingStatusInUpload;
  112. // Maintenance Mode
  113. @property BOOL maintenanceMode;
  114. // UserDefaults
  115. @property (nonatomic, strong) NSUserDefaults *ncUserDefaults;
  116. // Timer Error Networking
  117. - (void)startTimerErrorNetworking;
  118. // Login View
  119. - (void)openLoginView:(UIViewController *)viewController delegate:(id)delegate loginType:(NSInteger)loginType selector:(NSInteger)selector;
  120. // Setting Active Account
  121. - (void)settingActiveAccount:(NSString *)activeAccount activeUrl:(NSString *)activeUrl activeUser:(NSString *)activeUser activeUserID:(NSString *)activeUserID activePassword:(NSString *)activePassword;
  122. // Quick Actions - ShotcutItem
  123. - (void)configDynamicShortcutItems;
  124. - (BOOL)handleShortCutItem:(UIApplicationShortcutItem *)shortcutItem;
  125. // StatusBar & ApplicationIconBadgeNumber
  126. - (void)messageNotification:(NSString *)title description:(NSString *)description visible:(BOOL)visible delay:(NSTimeInterval)delay type:(TWMessageBarMessageType)type errorCode:(NSInteger)errorcode;
  127. - (void)updateApplicationIconBadgeNumber;
  128. // TabBarController
  129. - (void)createTabBarController:(UITabBarController *)tabBarController;
  130. - (void)aspectNavigationControllerBar:(UINavigationBar *)nav online:(BOOL)online hidden:(BOOL)hidden;
  131. - (void)aspectTabBar:(UITabBar *)tab hidden:(BOOL)hidden;
  132. - (void)plusButtonVisibile:(BOOL)visible;
  133. - (void)selectedTabBarController:(NSInteger)index;
  134. - (NSString *)getTabBarControllerActiveServerUrl;
  135. // Push Notification
  136. - (void)pushNotification;
  137. - (void)unsubscribingNextcloudServerPushNotification:(NSString *)account url:(NSString *)url withSubscribing:(BOOL)subscribing;
  138. // Theming Color
  139. - (void)settingThemingColorBrand;
  140. - (void)changeTheming:(UIViewController *)vc;
  141. // Task Networking
  142. - (void)loadAutoDownloadUpload;
  143. - (void)startLoadAutoDownloadUpload;
  144. // Maintenance Mode
  145. - (void)maintenanceMode:(BOOL)mode;
  146. @end