AppDelegate.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. //
  2. // AppDelegate.h
  3. // Crypto Cloud Technology Nextcloud
  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 <CoreData/CoreData.h>
  25. #import <UserNotifications/UserNotifications.h>
  26. #import "BKPasscodeLockScreenManager.h"
  27. #import "REMenu.h"
  28. #import "LMMediaPlayerView.h"
  29. #import "Reachability.h"
  30. #import "TWMessageBarManager.h"
  31. #import "CCBKPasscode.h"
  32. #import "CCUtility.h"
  33. #import "CCActivity.h"
  34. #import "CCDetail.h"
  35. #import "CCQuickActions.h"
  36. #import "CCMain.h"
  37. #import "CCPhotos.h"
  38. #import "CCTransfers.h"
  39. #import "CCSettings.h"
  40. #import "CCFavorites.h"
  41. @class CCLoginWeb;
  42. @interface AppDelegate : UIResponder <UIApplicationDelegate, BKPasscodeLockScreenManagerDelegate, BKPasscodeViewControllerDelegate, LMMediaPlayerViewDelegate, TWMessageBarStyleSheet, CCNetworkingDelegate>
  43. // Timer Process
  44. @property (nonatomic, strong) NSTimer *timerProcessAutoDownloadUpload;
  45. @property (nonatomic, strong) NSTimer *timerUpdateApplicationIconBadgeNumber;
  46. // For LMMediaPlayerView
  47. @property (strong, nonatomic) UIWindow *window;
  48. // User
  49. @property (nonatomic, strong) NSString *activeAccount;
  50. @property (nonatomic, strong) NSString *activeUrl;
  51. @property (nonatomic, strong) NSString *activeUser;
  52. @property (nonatomic, strong) NSString *activePassword;
  53. @property (nonatomic, strong) NSString *directoryUser;
  54. @property (nonatomic, strong) NSString *activeEmail;
  55. // next version ... ? ...
  56. @property double currentLatitude;
  57. @property double currentLongitude;
  58. // Notification
  59. @property (nonatomic, strong) NSMutableArray<OCCommunication *> *listOfNotifications;
  60. // Network Operation
  61. @property (nonatomic, strong) NSOperationQueue *netQueue;
  62. // Networking
  63. @property (nonatomic, copy) void (^backgroundSessionCompletionHandler)(void);
  64. // Network Share
  65. @property (nonatomic, strong) NSMutableDictionary *sharesID;
  66. @property (nonatomic, strong) NSMutableDictionary *sharesLink;
  67. @property (nonatomic, strong) NSMutableDictionary *sharesUserAndGroup;
  68. // UploadFromOtherUpp
  69. @property (nonatomic, strong) NSString *fileNameUpload;
  70. // Passcode lockDirectory
  71. @property (nonatomic, strong) NSDate *sessionePasscodeLock;
  72. // Remenu
  73. @property (nonatomic, strong) REMenu *reMainMenu;
  74. @property (nonatomic, strong) REMenuItem *selezionaItem;
  75. @property (nonatomic, strong) REMenuItem *directoryOnTopItem;
  76. @property (nonatomic, strong) REMenuItem *ordinaItem;
  77. @property (nonatomic, strong) REMenuItem *ascendenteItem;
  78. @property (nonatomic, strong) REMenuItem *alphabeticItem;
  79. @property (nonatomic, strong) REMenuItem *typefileItem;
  80. @property (nonatomic, strong) REMenuItem *dateItem;
  81. @property (nonatomic, strong) REMenu *reSelectMenu;
  82. @property (nonatomic, strong) REMenuItem *deleteItem;
  83. @property (nonatomic, strong) REMenuItem *moveItem;
  84. @property (nonatomic, strong) REMenuItem *encryptItem;
  85. @property (nonatomic, strong) REMenuItem *decryptItem;
  86. @property (nonatomic, strong) REMenuItem *downloadItem;
  87. @property (nonatomic, strong) REMenuItem *saveItem;
  88. // List Change Task
  89. @property (nonatomic, retain) NSMutableDictionary *listChangeTask;
  90. // Player Audio
  91. @property (nonatomic, strong) LMMediaPlayerView *player;
  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) CCPhotos *activePhotos;
  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, strong) NSMutableDictionary *listMainVC;
  106. @property (nonatomic, strong) NSMutableDictionary *listProgressMetadata;
  107. // Is in Crypto Mode
  108. @property BOOL isCryptoCloudMode;
  109. // Maintenance Mode
  110. @property BOOL maintenanceMode;
  111. // Login View
  112. - (void)openLoginView:(id)delegate loginType:(enumLoginType)loginType;
  113. // Setting Active Account
  114. - (void)settingActiveAccount:(NSString *)activeAccount activeUrl:(NSString *)activeUrl activeUser:(NSString *)activeUser activePassword:(NSString *)activePassword;
  115. // initializations
  116. - (void)applicationInitialized;
  117. // Quick Actions - ShotcutItem
  118. - (void)configDynamicShortcutItems;
  119. - (BOOL)handleShortCutItem:(UIApplicationShortcutItem *)shortcutItem;
  120. // StatusBar & ApplicationIconBadgeNumber
  121. - (void)messageNotification:(NSString *)title description:(NSString *)description visible:(BOOL)visible delay:(NSTimeInterval)delay type:(TWMessageBarMessageType)type errorCode:(NSInteger)errorcode;
  122. - (void)updateApplicationIconBadgeNumber;
  123. // TabBarController
  124. - (void)aspectNavigationControllerBar:(UINavigationBar *)nav encrypted:(BOOL)encrypted online:(BOOL)online hidden:(BOOL)hidden;
  125. - (void)aspectTabBar:(UITabBar *)tab hidden:(BOOL)hidden;
  126. - (void)plusButtonVisibile:(BOOL)visible;
  127. - (void)selectedTabBarController:(NSInteger)index;
  128. - (NSString *)getTabBarControllerActiveServerUrl;
  129. // Theming Color
  130. - (void)settingThemingColorBrand;
  131. - (void)changeTheming:(UIViewController *)vc;
  132. // Task Networking
  133. - (void)addNetworkingOperationQueue:(NSOperationQueue *)netQueue delegate:(id)delegate metadataNet:(CCMetadataNet *)metadataNet;
  134. - (void)loadAutoDownloadUpload:(NSNumber *)maxConcurrent;
  135. // Maintenance Mode
  136. - (void)maintenanceMode:(BOOL)mode;
  137. @end