FIRMessaging_Private.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 "FIRMessaging.h"
  17. @class FIRMessagingClient;
  18. @class FIRMessagingPubSub;
  19. typedef NS_ENUM(int8_t, FIRMessagingNetworkStatus) {
  20. kFIRMessagingReachabilityNotReachable = 0,
  21. kFIRMessagingReachabilityReachableViaWiFi,
  22. kFIRMessagingReachabilityReachableViaWWAN,
  23. };
  24. @interface FIRMessagingRemoteMessage ()
  25. @property(nonatomic, strong) NSDictionary *appData;
  26. @end
  27. @interface FIRMessaging ()
  28. #pragma mark - Private API
  29. - (NSString *)defaultFcmToken;
  30. - (FIRMessagingClient *)client;
  31. - (FIRMessagingPubSub *)pubsub;
  32. // Create a sample message to be sent over the wire using FIRMessaging. Look at
  33. // FIRMessagingService.h to see what each param signifies.
  34. + (NSMutableDictionary *)createFIRMessagingMessageWithMessage:(NSDictionary *)message
  35. to:(NSString *)to
  36. withID:(NSString *)msgID
  37. timeToLive:(int64_t)ttl
  38. delay:(int)delay;
  39. - (BOOL)isNetworkAvailable;
  40. - (FIRMessagingNetworkStatus)networkType;
  41. // Set the APNS token for FCM.
  42. - (void)setAPNSToken:(NSData *)apnsToken error:(NSError *)error;
  43. @end