AppDelegate.h 6.9 KB

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