FIRInstanceID+Private.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright 2019 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 "Firebase/InstanceID/Private/FIRInstanceIDCheckinPreferences.h"
  17. #import "Firebase/InstanceID/Public/FIRInstanceID.h"
  18. /**
  19. * @related FIRInstanceIDCheckinService
  20. *
  21. * The completion handler invoked once the fetch from Checkin server finishes.
  22. * For successful fetches we returned checkin information by the checkin service
  23. * and `nil` error, else we return the appropriate error object as reported by the
  24. * Checkin Service.
  25. *
  26. * @param checkinPreferences The checkin preferences as fetched from the server.
  27. * @param error The error object which fetching GServices data.
  28. */
  29. typedef void (^FIRInstanceIDDeviceCheckinCompletion)(
  30. FIRInstanceIDCheckinPreferences *_Nullable checkinPreferences, NSError *_Nullable error);
  31. /**
  32. * Private API used by Firebase SDK teams by calling in reflection or internal teams.
  33. */
  34. @interface FIRInstanceID (Private)
  35. /**
  36. * Fetches checkin info for the app. If the app has valid cached checkin preferences
  37. * they are returned instead of making a network request.
  38. *
  39. * @param handler The completion handler to invoke once the request has completed.
  40. */
  41. - (void)fetchCheckinInfoWithHandler:(nullable FIRInstanceIDDeviceCheckinCompletion)handler;
  42. @end