AppDelegate.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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 "BKPasscodeLockScreenManager.h"
  26. #import "REMenu.h"
  27. #import "Reachability.h"
  28. #import "TWMessageBarManager.h"
  29. #import "CCBKPasscode.h"
  30. #import "CCUtility.h"
  31. #import "CCActivity.h"
  32. #import "CCDetail.h"
  33. #import "CCMain.h"
  34. #import "CCMedia.h"
  35. #import "CCSettings.h"
  36. #import "CCFavorites.h"
  37. #import "CCTransfers.h"
  38. @class CCLoginWeb;
  39. @class CCMore;
  40. @interface AppDelegate : UIResponder <UIApplicationDelegate, BKPasscodeLockScreenManagerDelegate, BKPasscodeViewControllerDelegate, TWMessageBarStyleSheet, CCNetworkingDelegate>
  41. // Timer Process
  42. @property (nonatomic, strong) NSTimer *timerProcessAutoDownloadUpload;
  43. @property (nonatomic, strong) NSTimer *timerUpdateApplicationIconBadgeNumber;
  44. // For LMMediaPlayerView
  45. @property (strong, nonatomic) UIWindow *window;
  46. // User
  47. @property (nonatomic, strong) NSString *activeAccount;
  48. @property (nonatomic, strong) NSString *activeUrl;
  49. @property (nonatomic, strong) NSString *activeUser;
  50. @property (nonatomic, strong) NSString *activeUserID;
  51. @property (nonatomic, strong) NSString *activePassword;
  52. @property (nonatomic, strong) NSString *activeEmail;
  53. // next version ... ? ...
  54. @property double currentLatitude;
  55. @property double currentLongitude;
  56. // Notification
  57. @property (nonatomic, strong) NSMutableArray<OCCommunication *> *listOfNotifications;
  58. // Networking
  59. @property (nonatomic, copy) void (^backgroundSessionCompletionHandler)(void);
  60. // Network Share
  61. @property (nonatomic, strong) NSMutableDictionary *sharesID;
  62. @property (nonatomic, strong) NSMutableDictionary *sharesLink;
  63. @property (nonatomic, strong) NSMutableDictionary *sharesUserAndGroup;
  64. // UploadFromOtherUpp
  65. @property (nonatomic, strong) NSString *fileNameUpload;
  66. // Passcode lockDirectory
  67. @property (nonatomic, strong) NSDate *sessionePasscodeLock;
  68. // Audio Video
  69. @property (nonatomic, strong) AVPlayer *player;
  70. @property (nonatomic, strong) AVPlayerViewController *playerController;
  71. // Remenu
  72. @property (nonatomic, strong) REMenu *reMainMenu;
  73. @property (nonatomic, strong) REMenuItem *selezionaItem;
  74. @property (nonatomic, strong) REMenuItem *sortFileNameAZItem;
  75. @property (nonatomic, strong) REMenuItem *sortFileNameZAItem;
  76. @property (nonatomic, strong) REMenuItem *sortDateMoreRecentItem;
  77. @property (nonatomic, strong) REMenuItem *sortDateLessRecentItem;
  78. @property (nonatomic, strong) REMenuItem *sortSmallestItem;
  79. @property (nonatomic, strong) REMenuItem *sortLargestItem;
  80. @property (nonatomic, strong) REMenuItem *alphabeticItem;
  81. @property (nonatomic, strong) REMenuItem *typefileItem;
  82. @property (nonatomic, strong) REMenuItem *dateItem;
  83. @property (nonatomic, strong) REMenuItem *directoryOnTopItem;
  84. @property (nonatomic, strong) REMenu *reSelectMenu;
  85. @property (nonatomic, strong) REMenuItem *selectAllItem;
  86. @property (nonatomic, strong) REMenuItem *deleteItem;
  87. @property (nonatomic, strong) REMenuItem *moveItem;
  88. @property (nonatomic, strong) REMenuItem *encryptItem;
  89. @property (nonatomic, strong) REMenuItem *decryptItem;
  90. @property (nonatomic, strong) REMenuItem *downloadItem;
  91. @property (nonatomic, strong) REMenuItem *saveItem;
  92. // Reachability
  93. @property (nonatomic, strong) Reachability *reachability;
  94. @property BOOL lastReachability;
  95. @property (nonatomic, strong) CCMain *activeMain;
  96. @property (nonatomic, strong) CCMain *homeMain;
  97. @property (nonatomic, strong) CCFavorites *activeFavorites;
  98. @property (nonatomic, strong) CCMedia *activeMedia;
  99. @property (nonatomic, retain) CCDetail *activeDetail;
  100. @property (nonatomic, retain) CCSettings *activeSettings;
  101. @property (nonatomic, retain) CCActivity *activeActivity;
  102. @property (nonatomic, retain) CCTransfers *activeTransfers;
  103. @property (nonatomic, retain) CCLogin *activeLogin;
  104. @property (nonatomic, retain) CCLoginWeb *activeLoginWeb;
  105. @property (nonatomic, retain) CCMore *activeMore;
  106. @property (nonatomic, strong) NSMutableDictionary *listMainVC;
  107. @property (nonatomic, strong) NSMutableDictionary *listProgressMetadata;
  108. @property (nonatomic, strong) NSMutableArray *filterFileID;
  109. @property (nonatomic, strong) NSMutableArray *sessionPendingStatusInUpload;
  110. @property (nonatomic, strong) NSString *pnDeviceIdentifier;
  111. @property (nonatomic, strong) NSString *pnDeviceIdentifierSignature;
  112. @property (nonatomic, strong) NSString *pnPublicKey;
  113. // Maintenance Mode
  114. @property BOOL maintenanceMode;
  115. // UserDefaults
  116. @property (nonatomic, strong) NSUserDefaults *ncUserDefaults;
  117. // Login View
  118. - (void)openLoginView:(id)delegate loginType:(NSInteger)loginType selector:(NSInteger)selector;
  119. // Setting Active Account
  120. - (void)settingActiveAccount:(NSString *)activeAccount activeUrl:(NSString *)activeUrl activeUser:(NSString *)activeUser activeUserID:(NSString *)activeUserID activePassword:(NSString *)activePassword;
  121. // Quick Actions - ShotcutItem
  122. - (void)configDynamicShortcutItems;
  123. - (BOOL)handleShortCutItem:(UIApplicationShortcutItem *)shortcutItem;
  124. // StatusBar & ApplicationIconBadgeNumber
  125. - (void)messageNotification:(NSString *)title description:(NSString *)description visible:(BOOL)visible delay:(NSTimeInterval)delay type:(TWMessageBarMessageType)type errorCode:(NSInteger)errorcode;
  126. - (void)updateApplicationIconBadgeNumber;
  127. // TabBarController
  128. - (void)createTabBarController:(UITabBarController *)tabBarController;
  129. - (void)aspectNavigationControllerBar:(UINavigationBar *)nav online:(BOOL)online hidden:(BOOL)hidden;
  130. - (void)aspectTabBar:(UITabBar *)tab hidden:(BOOL)hidden;
  131. - (void)plusButtonVisibile:(BOOL)visible;
  132. - (void)selectedTabBarController:(NSInteger)index;
  133. - (NSString *)getTabBarControllerActiveServerUrl;
  134. // Push Notification
  135. - (void)subscribingNextcloudServerPushNotification;
  136. - (void)unsubscribingNextcloudServerPushNotification;
  137. // Theming Color
  138. - (void)settingThemingColorBrand;
  139. - (void)changeTheming:(UIViewController *)vc;
  140. // Task Networking
  141. - (void)loadAutoDownloadUpload;
  142. // Maintenance Mode
  143. - (void)maintenanceMode:(BOOL)mode;
  144. @end