AppDelegate.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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 <m.faggiana@twsweb.it>
  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. // Network Operation
  59. @property (nonatomic, strong) NSOperationQueue *netQueue;
  60. // Networking
  61. @property (nonatomic, copy) void (^backgroundSessionCompletionHandler)(void);
  62. // Network Share
  63. @property (nonatomic, strong) NSMutableDictionary *sharesID;
  64. @property (nonatomic, strong) NSMutableDictionary *sharesLink;
  65. @property (nonatomic, strong) NSMutableDictionary *sharesUserAndGroup;
  66. // UploadFromOtherUpp
  67. @property (nonatomic, strong) NSString *fileNameUpload;
  68. // Passcode lockDirectory
  69. @property (nonatomic, strong) NSDate *sessionePasscodeLock;
  70. // Audio Video
  71. @property (nonatomic, strong) AVPlayer *player;
  72. @property (nonatomic, strong) AVPlayerViewController *playerController;
  73. // Remenu
  74. @property (nonatomic, strong) REMenu *reMainMenu;
  75. @property (nonatomic, strong) REMenuItem *selezionaItem;
  76. @property (nonatomic, strong) REMenuItem *sortFileNameAZItem;
  77. @property (nonatomic, strong) REMenuItem *sortFileNameZAItem;
  78. @property (nonatomic, strong) REMenuItem *sortDateMoreRecentItem;
  79. @property (nonatomic, strong) REMenuItem *sortDateLessRecentItem;
  80. @property (nonatomic, strong) REMenuItem *sortSmallestItem;
  81. @property (nonatomic, strong) REMenuItem *sortLargestItem;
  82. @property (nonatomic, strong) REMenuItem *alphabeticItem;
  83. @property (nonatomic, strong) REMenuItem *typefileItem;
  84. @property (nonatomic, strong) REMenuItem *dateItem;
  85. @property (nonatomic, strong) REMenuItem *directoryOnTopItem;
  86. @property (nonatomic, strong) REMenu *reSelectMenu;
  87. @property (nonatomic, strong) REMenuItem *selectAllItem;
  88. @property (nonatomic, strong) REMenuItem *deleteItem;
  89. @property (nonatomic, strong) REMenuItem *moveItem;
  90. @property (nonatomic, strong) REMenuItem *encryptItem;
  91. @property (nonatomic, strong) REMenuItem *decryptItem;
  92. @property (nonatomic, strong) REMenuItem *downloadItem;
  93. @property (nonatomic, strong) REMenuItem *saveItem;
  94. // Reachability
  95. @property (nonatomic, strong) Reachability *reachability;
  96. @property BOOL lastReachability;
  97. @property (nonatomic, strong) CCMain *activeMain;
  98. @property (nonatomic, strong) CCMain *homeMain;
  99. @property (nonatomic, strong) CCFavorites *activeFavorites;
  100. @property (nonatomic, strong) CCMedia *activeMedia;
  101. @property (nonatomic, retain) CCDetail *activeDetail;
  102. @property (nonatomic, retain) CCSettings *activeSettings;
  103. @property (nonatomic, retain) CCActivity *activeActivity;
  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) NSString *pnDeviceIdentifier;
  112. @property (nonatomic, strong) NSString *pnDeviceIdentifierSignature;
  113. @property (nonatomic, strong) NSString *pnPublicKey;
  114. // Maintenance Mode
  115. @property BOOL maintenanceMode;
  116. // UserDefaults
  117. @property (nonatomic, strong) NSUserDefaults *ncUserDefaults;
  118. // Login View
  119. - (void)openLoginView:(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)subscribingNextcloudServerPushNotification;
  137. - (void)unsubscribingNextcloudServerPushNotification;
  138. // Theming Color
  139. - (void)settingThemingColorBrand;
  140. - (void)changeTheming:(UIViewController *)vc;
  141. // Task Networking
  142. - (void)addNetworkingOperationQueue:(NSOperationQueue *)netQueue delegate:(id)delegate metadataNet:(CCMetadataNet *)metadataNet;
  143. - (void)loadAutoDownloadUpload;
  144. // Maintenance Mode
  145. - (void)maintenanceMode:(BOOL)mode;
  146. @end