You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.6 KiB

6 years ago
5 years ago
6 years ago
5 years ago
  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. #include <TargetConditionals.h>
  17. #if !TARGET_OS_OSX
  18. #import <Foundation/Foundation.h>
  19. #import <UIKit/UIKit.h>
  20. @class FIRAuthAppCredentialManager;
  21. NS_ASSUME_NONNULL_BEGIN
  22. /** @typedef FIRAuthNotificationForwardingCallback
  23. @brief The type of block to receive whether or not remote notifications are being forwarded.
  24. @param isNotificationBeingForwarded Whether or not remote notifications are being forwarded.
  25. */
  26. typedef void (^FIRAuthNotificationForwardingCallback)(BOOL isNotificationBeingForwarded);
  27. /** @class FIRAuthNotificationManager
  28. */
  29. @interface FIRAuthNotificationManager : NSObject
  30. /** @property timeout
  31. @brief The timeout for checking for notification forwarding.
  32. @remarks Only tests should access this property.
  33. */
  34. @property(nonatomic, assign) NSTimeInterval timeout;
  35. /** @fn initWithApplication:appCredentialManager:
  36. @brief Initializes the instance.
  37. @param application The application.
  38. @param appCredentialManager The object to handle app credentials delivered via notification.
  39. @return The initialized instance.
  40. */
  41. - (instancetype)initWithApplication:(UIApplication *)application
  42. appCredentialManager:(FIRAuthAppCredentialManager *)appCredentialManager
  43. NS_DESIGNATED_INITIALIZER;
  44. /** @fn init
  45. @brief please use initWithAppCredentialManager: instead.
  46. */
  47. - (instancetype)init NS_UNAVAILABLE;
  48. /** @fn checkNotificationForwardingWithCallback:
  49. @brief Checks whether or not remote notifications are being forwarded to this class.
  50. @param callback The block to be called either immediately or in future once a result
  51. is available.
  52. */
  53. - (void)checkNotificationForwardingWithCallback:(FIRAuthNotificationForwardingCallback)callback;
  54. /** @fn canHandleNotification:
  55. @brief Attempts to handle the remote notification.
  56. @param notification The notification in question.
  57. @return Whether or the notification has been handled.
  58. */
  59. - (BOOL)canHandleNotification:(NSDictionary *)notification;
  60. @end
  61. NS_ASSUME_NONNULL_END
  62. #endif