AppDelegate.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. //
  2. // AppDelegate.h
  3. // Crypto Cloud Technology Nextcloud
  4. //
  5. // Created by Marino Faggiana on 04/09/14.
  6. // Copyright (c) 2014 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 <MagicalRecord/MagicalRecord.h>
  26. #import "OCCapabilities.h"
  27. #import "BKPasscodeLockScreenManager.h"
  28. #import "REMenu.h"
  29. #import "LMMediaPlayerView.h"
  30. #import "Reachability.h"
  31. #import "TWMessageBarManager.h"
  32. #import "CCBKPasscode.h"
  33. #import "CCUtility.h"
  34. #import "CCControlCenter.h"
  35. #import "CCDetail.h"
  36. #import "CCQuickActions.h"
  37. #import "CCMain.h"
  38. #import "CCPhotosCameraUpload.h"
  39. #import "CCFavorite.h"
  40. @interface AppDelegate : UIResponder <UIApplicationDelegate, BKPasscodeLockScreenManagerDelegate, BKPasscodeViewControllerDelegate, LMMediaPlayerViewDelegate, TWMessageBarStyleSheet>
  41. // Timer 5 sec.
  42. @property (nonatomic, strong) NSTimer *timerVerifyProcess;
  43. // For LMMediaPlayerView
  44. @property (strong, nonatomic) UIWindow *window;
  45. // User
  46. @property (nonatomic, strong) NSString *activeAccount;
  47. @property (nonatomic, strong) NSString *activeUrl;
  48. @property (nonatomic, strong) NSString *activeUser;
  49. @property (nonatomic, strong) NSString *activePassword;
  50. @property (nonatomic, strong) NSString *activeUID;
  51. @property (nonatomic, strong) NSString *activeAccessToken;
  52. @property (nonatomic, strong) NSString *typeCloud;
  53. @property (nonatomic, strong) NSString *serverUrl;
  54. @property (nonatomic, strong) NSString *directoryUser;
  55. // next version ... ? ...
  56. @property double currentLatitude;
  57. @property double currentLongitude;
  58. // ownCloud & Nextcloud
  59. @property BOOL hasServerForbiddenCharactersSupport;
  60. @property BOOL hasServerShareSupport;
  61. @property BOOL hasServerShareeSupport;
  62. @property BOOL hasServerCapabilitiesSupport;
  63. @property OCCapabilities *capabilities;
  64. // Network Operation
  65. @property (nonatomic, strong) NSOperationQueue *netQueue;
  66. @property (nonatomic, strong) NSOperationQueue *netQueueDownload;
  67. @property (nonatomic, strong) NSOperationQueue *netQueueDownloadWWan;
  68. @property (nonatomic, strong) NSOperationQueue *netQueueUpload;
  69. @property (nonatomic, strong) NSOperationQueue *netQueueUploadWWan;
  70. @property NSUInteger queueNunDownload, queueNumDownloadWWan, queueNumUpload, queueNumUploadWWan;
  71. // Networking
  72. @property (nonatomic, copy) void (^backgroundSessionCompletionHandler)(void);
  73. @property (nonatomic, strong) NSDate *sessionDateLastUploadTasks;
  74. @property (nonatomic, strong) NSDate *sessionDateLastDownloadTasks;
  75. @property (nonatomic, strong) NSTimer *timerVerifySessionInProgress;
  76. // Network Share
  77. @property (nonatomic, strong) NSMutableDictionary *sharesID;
  78. @property (nonatomic, strong) NSMutableDictionary *sharesLink;
  79. @property (nonatomic, strong) NSMutableDictionary *sharesUserAndGroup;
  80. // UploadFromOtherUpp
  81. @property (nonatomic, strong) NSString *fileNameUpload;
  82. // Passcode lockDirectory
  83. @property (nonatomic, strong) NSDate *sessionePasscodeLock;
  84. // Remenu
  85. @property (nonatomic, strong) REMenu *reMainMenu;
  86. @property (nonatomic, strong) REMenuItem *browseItem;
  87. @property (nonatomic, strong) REMenuItem *selezionaItem;
  88. @property (nonatomic, strong) REMenuItem *directoryOnTopItem;
  89. @property (nonatomic, strong) REMenuItem *ordinaItem;
  90. @property (nonatomic, strong) REMenuItem *ascendenteItem;
  91. @property (nonatomic, strong) REMenuItem *alphabeticItem;
  92. @property (nonatomic, strong) REMenuItem *typefileItem;
  93. @property (nonatomic, strong) REMenuItem *dateItem;
  94. @property (nonatomic, strong) REMenu *reSelectMenu;
  95. @property (nonatomic, strong) REMenuItem *deleteItem;
  96. @property (nonatomic, strong) REMenuItem *moveItem;
  97. @property (nonatomic, strong) REMenuItem *encryptItem;
  98. @property (nonatomic, strong) REMenuItem *decryptItem;
  99. @property (nonatomic, strong) REMenuItem *downloadItem;
  100. @property (nonatomic, strong) REMenuItem *saveItem;
  101. // List Transfert
  102. @property (nonatomic, retain) CCControlCenter *controlCenter;
  103. // List Change Task
  104. @property (nonatomic, retain) NSMutableDictionary *listChangeTask;
  105. // Player Audio
  106. @property (nonatomic, strong) LMMediaPlayerView *player;
  107. // Reachability
  108. @property (nonatomic, strong) Reachability *reachability;
  109. @property BOOL lastReachability;
  110. @property (nonatomic, strong) CCMain *activeMain;
  111. @property (nonatomic, strong) CCMain *homeMain;
  112. @property (nonatomic, strong) CCPhotosCameraUpload *activePhotosCameraUpload;
  113. @property (nonatomic, retain) CCDetail *activeDetail;
  114. @property (nonatomic, retain) CCFavorite *activeFavorite;
  115. @property (nonatomic, strong) NSMutableDictionary *listMainVC;
  116. @property (nonatomic, strong) NSMutableDictionary *listProgressMetadata;
  117. // ico Image Cache
  118. @property (nonatomic, strong) NSMutableDictionary *icoImagesCache;
  119. // Favorite - LocalStorage
  120. @property BOOL isLocalStorage;
  121. // check isDeviceJailbroken
  122. @property BOOL isDeviceJailbroken;
  123. // Animated title _brand_
  124. @property BOOL isTitleBrandAnimated;
  125. // Setting Active Account
  126. - (void)settingActiveAccount:(NSString *)activeAccount activeUrl:(NSString *)activeUrl activeUser:(NSString *)activeUser activePassword:(NSString *)activePassword activeUID:(NSString *)activeUID activeAccessToken:(NSString *)activeAccessToken typeCloud:(NSString *)typeCloud;
  127. // initializations
  128. - (void)applicationInitialized;
  129. - (void)messageNotification:(NSString *)title description:(NSString *)description visible:(BOOL)visible delay:(NSTimeInterval)delay type:(TWMessageBarMessageType)type;
  130. - (void)updateApplicationIconBadgeNumber;
  131. - (BOOL)handleShortCutItem:(UIApplicationShortcutItem *)shortcutItem;
  132. - (void)plusButtonVisibile:(BOOL)visible;
  133. // Operation Networking
  134. - (void)cancelAllOperations;
  135. - (void)addNetworkingOperationQueue:(NSOperationQueue *)netQueue delegate:(id)delegate metadataNet:(CCMetadataNet *)metadataNet;
  136. - (NSMutableArray *)verifyExistsInQueuesDownloadSelector:(NSString *)selector;
  137. - (NSMutableArray *)verifyExistsInQueuesUploadSelector:(NSString *)selector;
  138. - (void)loadTableAutomaticUploadForSelector:(NSString *)selector;
  139. - (void)dropAutomaticUploadWithSelector:(NSString *)selector;
  140. @end