NCConnectionController.h 954 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: GPL-3.0-or-later
  4. */
  5. #import <Foundation/Foundation.h>
  6. extern NSString * const NCAppStateHasChangedNotification;
  7. extern NSString * const NCConnectionStateHasChangedNotification;
  8. typedef NS_ENUM(NSInteger, AppState) {
  9. kAppStateUnknown = 0,
  10. kAppStateNotServerProvided,
  11. kAppStateAuthenticationNeeded,
  12. kAppStateMissingUserProfile,
  13. kAppStateMissingServerCapabilities,
  14. kAppStateMissingSignalingConfiguration,
  15. kAppStateReady
  16. };
  17. typedef NS_ENUM(NSInteger, ConnectionState) {
  18. kConnectionStateUnknown = 0,
  19. kConnectionStateDisconnected,
  20. kConnectionStateConnected
  21. };
  22. @interface NCConnectionController : NSObject
  23. @property(nonatomic, assign) AppState appState;
  24. @property(nonatomic, assign) ConnectionState connectionState;
  25. + (instancetype)sharedInstance;
  26. - (void)checkAppState;
  27. - (void)checkConnectionState;
  28. @end