AppDelegate.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. //
  2. // AppDelegate.h
  3. // Nextcloud iOS
  4. //
  5. // Created by Marino Faggiana on 04/09/14.
  6. // Copyright (c) 2017 TWS. 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 "CCQuickActions.h"
  34. #import "CCMain.h"
  35. #import "CCPhotos.h"
  36. #import "CCTransfers.h"
  37. #import "CCSettings.h"
  38. #import "CCFavorites.h"
  39. @class CCLoginWeb;
  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 *directoryUser;
  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. // Network Operation
  60. @property (nonatomic, strong) NSOperationQueue *netQueue;
  61. // Networking
  62. @property (nonatomic, copy) void (^backgroundSessionCompletionHandler)(void);
  63. // Network Share
  64. @property (nonatomic, strong) NSMutableDictionary *sharesID;
  65. @property (nonatomic, strong) NSMutableDictionary *sharesLink;
  66. @property (nonatomic, strong) NSMutableDictionary *sharesUserAndGroup;
  67. // UploadFromOtherUpp
  68. @property (nonatomic, strong) NSString *fileNameUpload;
  69. // Passcode lockDirectory
  70. @property (nonatomic, strong) NSDate *sessionePasscodeLock;
  71. // Remenu
  72. @property (nonatomic, strong) REMenu *reMainMenu;
  73. @property (nonatomic, strong) REMenuItem *selezionaItem;
  74. @property (nonatomic, strong) REMenuItem *directoryOnTopItem;
  75. @property (nonatomic, strong) REMenuItem *ordinaItem;
  76. @property (nonatomic, strong) REMenuItem *ascendenteItem;
  77. @property (nonatomic, strong) REMenuItem *alphabeticItem;
  78. @property (nonatomic, strong) REMenuItem *typefileItem;
  79. @property (nonatomic, strong) REMenuItem *dateItem;
  80. @property (nonatomic, strong) REMenu *reSelectMenu;
  81. @property (nonatomic, strong) REMenuItem *deleteItem;
  82. @property (nonatomic, strong) REMenuItem *moveItem;
  83. @property (nonatomic, strong) REMenuItem *encryptItem;
  84. @property (nonatomic, strong) REMenuItem *decryptItem;
  85. @property (nonatomic, strong) REMenuItem *downloadItem;
  86. @property (nonatomic, strong) REMenuItem *saveItem;
  87. // List Change Task
  88. @property (nonatomic, retain) NSMutableDictionary *listChangeTask;
  89. // Reachability
  90. @property (nonatomic, strong) Reachability *reachability;
  91. @property BOOL lastReachability;
  92. @property (nonatomic, strong) CCMain *activeMain;
  93. @property (nonatomic, strong) CCMain *homeMain;
  94. @property (nonatomic, strong) CCFavorites *activeFavorites;
  95. @property (nonatomic, strong) CCPhotos *activePhotos;
  96. @property (nonatomic, retain) CCDetail *activeDetail;
  97. @property (nonatomic, retain) CCSettings *activeSettings;
  98. @property (nonatomic, retain) CCActivity *activeActivity;
  99. @property (nonatomic, retain) CCTransfers *activeTransfers;
  100. @property (nonatomic, retain) CCLogin *activeLogin;
  101. @property (nonatomic, retain) CCLoginWeb *activeLoginWeb;
  102. @property (nonatomic, strong) NSMutableDictionary *listMainVC;
  103. @property (nonatomic, strong) NSMutableDictionary *listProgressMetadata;
  104. // Maintenance Mode
  105. @property BOOL maintenanceMode;
  106. // Login View
  107. - (void)openLoginView:(id)delegate loginType:(enumLoginType)loginType;
  108. // Setting Active Account
  109. - (void)settingActiveAccount:(NSString *)activeAccount activeUrl:(NSString *)activeUrl activeUser:(NSString *)activeUser activeUserID:(NSString *)activeUserID activePassword:(NSString *)activePassword;
  110. // initializations
  111. - (void)applicationInitialized;
  112. // Quick Actions - ShotcutItem
  113. - (void)configDynamicShortcutItems;
  114. - (BOOL)handleShortCutItem:(UIApplicationShortcutItem *)shortcutItem;
  115. // StatusBar & ApplicationIconBadgeNumber
  116. - (void)messageNotification:(NSString *)title description:(NSString *)description visible:(BOOL)visible delay:(NSTimeInterval)delay type:(TWMessageBarMessageType)type errorCode:(NSInteger)errorcode;
  117. - (void)updateApplicationIconBadgeNumber;
  118. // TabBarController
  119. - (void)aspectNavigationControllerBar:(UINavigationBar *)nav online:(BOOL)online hidden:(BOOL)hidden;
  120. - (void)aspectTabBar:(UITabBar *)tab hidden:(BOOL)hidden;
  121. - (void)plusButtonVisibile:(BOOL)visible;
  122. - (void)selectedTabBarController:(NSInteger)index;
  123. - (NSString *)getTabBarControllerActiveServerUrl;
  124. // Theming Color
  125. - (void)settingThemingColorBrand;
  126. - (void)changeTheming:(UIViewController *)vc;
  127. // Task Networking
  128. - (void)addNetworkingOperationQueue:(NSOperationQueue *)netQueue delegate:(id)delegate metadataNet:(CCMetadataNet *)metadataNet;
  129. - (void)loadAutoDownloadUpload:(NSNumber *)maxConcurrent;
  130. // Maintenance Mode
  131. - (void)maintenanceMode:(BOOL)mode;
  132. @end