AppDelegate.h 7.0 KB

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