AppDelegate.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. //
  2. // AppDelegate.h
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 04/09/14.
  6. // Copyright (c) 2014 Marino Faggiana. All rights reserved.
  7. //
  8. // Author Marino Faggiana <marino.faggiana@nextcloud.com>
  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 <PushKit/PushKit.h>
  26. #import <AVKit/AVKit.h>
  27. #import <LocalAuthentication/LocalAuthentication.h>
  28. #import <TOPasscodeViewController/TOPasscodeViewController.h>
  29. #import "CCUtility.h"
  30. #import "CCMain.h"
  31. #import "CCSettings.h"
  32. @class CCMore;
  33. @class NCMedia;
  34. @class NCOffline;
  35. @class NCTransfers;
  36. @class NCFavorite;
  37. @class NCTrash;
  38. @class NCAppConfigView;
  39. @class IMImagemeterViewer;
  40. @class NCDetailViewController;
  41. @class NCNetworkingAutoUpload;
  42. @class NCDocumentPickerViewController;
  43. @interface AppDelegate : UIResponder <UIApplicationDelegate, UNUserNotificationCenterDelegate>
  44. // Timer Process
  45. @property (nonatomic, strong) NSTimer *timerUpdateApplicationIconBadgeNumber;
  46. @property (nonatomic, strong) NSTimer *timerErrorNetworking;
  47. @property (nonatomic, strong) UIWindow *window;
  48. @property (nonatomic, strong) NCDocumentPickerViewController *documentPickerViewController;
  49. // Parameter account
  50. @property (nonatomic, strong) NSString *account;
  51. @property (nonatomic, strong) NSString *urlBase;
  52. @property (nonatomic, strong) NSString *user;
  53. @property (nonatomic, strong) NSString *userID;
  54. @property (nonatomic, strong) NSString *password;
  55. // next version ... ? ...
  56. @property double currentLatitude;
  57. @property double currentLongitude;
  58. // Networking
  59. @property (nonatomic, copy) void (^backgroundSessionCompletionHandler)(void);
  60. // UploadFromOtherUpp
  61. @property (nonatomic, strong) NSString *fileNameUpload;
  62. // Passcode lockDirectory
  63. @property (nonatomic, strong) NSDate *sessionePasscodeLock;
  64. // Audio Video
  65. @property (nonatomic, strong) AVPlayer *player;
  66. @property (nonatomic, strong) AVPlayerViewController *playerController;
  67. @property BOOL isMediaObserver;
  68. // Push Norification Token
  69. @property (nonatomic, strong) NSString *pushKitToken;
  70. // ProgressView Detail
  71. @property (nonatomic, strong) UIProgressView *progressViewDetail;
  72. @property (nonatomic, retain) TOPasscodeViewController *passcodeViewController;
  73. @property (nonatomic, retain) NSString *activeServerUrl;
  74. @property (nonatomic, retain) id activeViewController;
  75. @property (nonatomic, strong) CCMain *activeMain;
  76. @property (nonatomic, strong) CCMain *homeMain;
  77. @property (nonatomic, strong) NCFavorite *activeFavorite;
  78. @property (nonatomic, strong) NCMedia *activeMedia;
  79. @property (nonatomic, retain) NCDetailViewController *activeDetail;
  80. @property (nonatomic, retain) NCTransfers *activeTransfers;
  81. @property (nonatomic, retain) CCLogin *activeLogin;
  82. @property (nonatomic, retain) NCLoginWeb *activeLoginWeb;
  83. @property (nonatomic, retain) CCMore *activeMore;
  84. @property (nonatomic, retain) NCOffline *activeOffline;
  85. @property (nonatomic, retain) NCTrash *activeTrash;
  86. @property (nonatomic, retain) NCAppConfigView *appConfigView;
  87. @property (nonatomic, retain) IMImagemeterViewer *activeImagemeterView;
  88. @property (nonatomic, strong) NSMutableDictionary *listMainVC;
  89. @property (nonatomic, strong) NSMutableDictionary *listProgressMetadata;
  90. @property (nonatomic) UIUserInterfaceStyle preferredUserInterfaceStyle API_AVAILABLE(ios(12.0));
  91. // Shares
  92. @property (nonatomic, strong) NSArray *shares;
  93. // Maintenance Mode
  94. @property BOOL maintenanceMode;
  95. // UserDefaults
  96. @property (nonatomic, strong) NSUserDefaults *ncUserDefaults;
  97. // Network Auto Upload
  98. @property (nonatomic, strong) NCNetworkingAutoUpload *networkingAutoUpload;
  99. // Login
  100. - (void)startTimerErrorNetworking;
  101. - (void)openLoginView:(UIViewController *)viewController selector:(NSInteger)selector openLoginWeb:(BOOL)openLoginWeb;
  102. // Setting Account & Communication
  103. - (void)settingAccount:(NSString *)account urlBase:(NSString *)urlBase user:(NSString *)user userID:(NSString *)userID password:(NSString *)password;
  104. - (void)deleteAccount:(NSString *)account wipe:(BOOL)wipe;
  105. - (void)settingSetupCommunication:(NSString *)account;
  106. // Quick Actions - ShotcutItem
  107. - (void)configDynamicShortcutItems;
  108. - (BOOL)handleShortCutItem:(UIApplicationShortcutItem *)shortcutItem;
  109. // TabBarController
  110. - (void)createTabBarController:(UITabBarController *)tabBarController;
  111. // Push Notification
  112. - (void)pushNotification;
  113. // Theming Color
  114. - (void)settingThemingColorBrand;
  115. - (void)changeTheming:(UIViewController *)viewController tableView:(UITableView *)tableView collectionView:(UICollectionView *)collectionView form:(BOOL)form;
  116. // Maintenance Mode
  117. - (void)maintenanceMode:(BOOL)mode;
  118. @end