Без опису

FIRAuthNotificationManager.h 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import <UIKit/UIKit.h>
  18. @class FIRAuthAppCredentialManager;
  19. NS_ASSUME_NONNULL_BEGIN
  20. /** @typedef FIRAuthNotificationForwardingCallback
  21. @brief The type of block to receive whether or not remote notifications are being forwarded.
  22. @param isNotificationBeingForwarded Whether or not remote notifications are being forwarded.
  23. */
  24. typedef void (^FIRAuthNotificationForwardingCallback)(BOOL isNotificationBeingForwarded);
  25. /** @class FIRAuthNotificationManager
  26. */
  27. @interface FIRAuthNotificationManager : NSObject
  28. /** @property timeout
  29. @brief The timeout for checking for notification forwarding.
  30. @remarks Only tests should access this property.
  31. */
  32. @property(nonatomic, assign) NSTimeInterval timeout;
  33. /** @fn initWithApplication:appCredentialManager:
  34. @brief Initializes the instance.
  35. @param application The application.
  36. @param appCredentialManager The object to handle app credentials delivered via notification.
  37. @return The initialized instance.
  38. */
  39. - (instancetype)initWithApplication:(UIApplication *)application
  40. appCredentialManager:(FIRAuthAppCredentialManager *)appCredentialManager
  41. NS_DESIGNATED_INITIALIZER;
  42. /** @fn init
  43. @brief please use initWithAppCredentialManager: instead.
  44. */
  45. - (instancetype)init NS_UNAVAILABLE;
  46. /** @fn checkNotificationForwardingWithCallback:
  47. @brief Checks whether or not remote notifications are being forwarded to this class.
  48. @param callback The block to be called either immediately or in future once a result
  49. is available.
  50. */
  51. - (void)checkNotificationForwardingWithCallback:(FIRAuthNotificationForwardingCallback)callback;
  52. /** @fn canHandleNotification:
  53. @brief Attempts to handle the remote notification.
  54. @param notification The notification in question.
  55. @return Whether or the notification has been handled.
  56. */
  57. - (BOOL)canHandleNotification:(NSDictionary *)notification;
  58. @end
  59. NS_ASSUME_NONNULL_END