AppDelegate.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. #import "CCFavorites.h"
  33. #import "CCTransfers.h"
  34. @class CCMore;
  35. @class NCMedia;
  36. @class NCOffline;
  37. @class NCAppConfigView;
  38. @class IMImagemeterViewer;
  39. @class NCDetailViewController;
  40. @class NCNetworkingAutoUpload;
  41. @interface AppDelegate : UIResponder <UIApplicationDelegate, UNUserNotificationCenterDelegate>
  42. // Timer Process
  43. @property (nonatomic, strong) NSTimer *timerUpdateApplicationIconBadgeNumber;
  44. @property (nonatomic, strong) NSTimer *timerErrorNetworking;
  45. // For LMMediaPlayerView
  46. @property (strong, nonatomic) UIWindow *window;
  47. // Paramente account
  48. @property (nonatomic, strong) NSString *account;
  49. @property (nonatomic, strong) NSString *urlBase;
  50. @property (nonatomic, strong) NSString *user;
  51. @property (nonatomic, strong) NSString *userID;
  52. @property (nonatomic, strong) NSString *password;
  53. // next version ... ? ...
  54. @property double currentLatitude;
  55. @property double currentLongitude;
  56. // Networking
  57. @property (nonatomic, copy) void (^backgroundSessionCompletionHandler)(void);
  58. // UploadFromOtherUpp
  59. @property (nonatomic, strong) NSString *fileNameUpload;
  60. // Passcode lockDirectory
  61. @property (nonatomic, strong) NSDate *sessionePasscodeLock;
  62. // Audio Video
  63. @property (nonatomic, strong) AVPlayer *player;
  64. @property (nonatomic, strong) AVPlayerViewController *playerController;
  65. @property BOOL isMediaObserver;
  66. // Push Norification Token
  67. @property (nonatomic, strong) NSString *pushKitToken;
  68. // ProgressView Detail
  69. @property (nonatomic, strong) UIProgressView *progressViewDetail;
  70. @property (nonatomic, retain) TOPasscodeViewController *passcodeViewController;
  71. @property (nonatomic, strong) CCMain *activeMain;
  72. @property (nonatomic, strong) CCMain *homeMain;
  73. @property (nonatomic, strong) CCFavorites *activeFavorites;
  74. @property (nonatomic, strong) NCMedia *activeMedia;
  75. @property (nonatomic, retain) NCDetailViewController *activeDetail;
  76. @property (nonatomic, retain) CCTransfers *activeTransfers;
  77. @property (nonatomic, retain) CCLogin *activeLogin;
  78. @property (nonatomic, retain) NCLoginWeb *activeLoginWeb;
  79. @property (nonatomic, retain) CCMore *activeMore;
  80. @property (nonatomic, retain) NCOffline *activeOffline;
  81. @property (nonatomic, retain) NCAppConfigView *appConfigView;
  82. @property (nonatomic, retain) IMImagemeterViewer *activeImagemeterView;
  83. @property (nonatomic, strong) NSMutableDictionary *listMainVC;
  84. @property (nonatomic, strong) NSMutableDictionary *listProgressMetadata;
  85. @property (nonatomic) UIUserInterfaceStyle preferredUserInterfaceStyle API_AVAILABLE(ios(12.0));
  86. // Shares
  87. @property (nonatomic, strong) NSArray *shares;
  88. // Maintenance Mode
  89. @property BOOL maintenanceMode;
  90. // UserDefaults
  91. @property (nonatomic, strong) NSUserDefaults *ncUserDefaults;
  92. // Network Auto Upload
  93. @property (nonatomic, strong) NCNetworkingAutoUpload *networkingAutoUpload;
  94. // Login
  95. - (void)startTimerErrorNetworking;
  96. - (void)openLoginView:(UIViewController *)viewController selector:(NSInteger)selector openLoginWeb:(BOOL)openLoginWeb;
  97. // Setting Account & Communication
  98. - (void)settingAccount:(NSString *)account urlBase:(NSString *)urlBase user:(NSString *)user userID:(NSString *)userID password:(NSString *)password;
  99. - (void)deleteAccount:(NSString *)account wipe:(BOOL)wipe;
  100. - (void)settingSetupCommunicationCapabilities:(NSString *)account;
  101. // Quick Actions - ShotcutItem
  102. - (void)configDynamicShortcutItems;
  103. - (BOOL)handleShortCutItem:(UIApplicationShortcutItem *)shortcutItem;
  104. // TabBarController
  105. - (void)createTabBarController:(UITabBarController *)tabBarController;
  106. - (NSString *)getTabBarControllerActiveServerUrl;
  107. // Push Notification
  108. - (void)pushNotification;
  109. //- (void)unsubscribingNextcloudServerPushNotification:(NSString *)account url:(NSString *)url withSubscribing:(BOOL)subscribing;
  110. // Theming Color
  111. - (void)settingThemingColorBrand;
  112. - (void)changeTheming:(UIViewController *)viewController tableView:(UITableView *)tableView collectionView:(UICollectionView *)collectionView form:(BOOL)form;
  113. // Maintenance Mode
  114. - (void)maintenanceMode:(BOOL)mode;
  115. @end