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.

54 lines
1.9 KiB

6 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. #import <Foundation/Foundation.h>
  17. typedef NS_ENUM(int8_t, FIRMessagingProtoTag) {
  18. kFIRMessagingProtoTagInvalid = -1,
  19. kFIRMessagingProtoTagHeartbeatPing = 0,
  20. kFIRMessagingProtoTagHeartbeatAck = 1,
  21. kFIRMessagingProtoTagLoginRequest = 2,
  22. kFIRMessagingProtoTagLoginResponse = 3,
  23. kFIRMessagingProtoTagClose = 4,
  24. kFIRMessagingProtoTagIqStanza = 7,
  25. kFIRMessagingProtoTagDataMessageStanza = 8,
  26. };
  27. @class GPBMessage;
  28. #pragma mark - Protocol Buffers
  29. FOUNDATION_EXPORT FIRMessagingProtoTag FIRMessagingGetTagForProto(GPBMessage *protoClass);
  30. FOUNDATION_EXPORT Class FIRMessagingGetClassForTag(FIRMessagingProtoTag tag);
  31. #pragma mark - MCS
  32. FOUNDATION_EXPORT NSString *FIRMessagingGetRmq2Id(GPBMessage *proto);
  33. FOUNDATION_EXPORT void FIRMessagingSetRmq2Id(GPBMessage *proto, NSString *pID);
  34. FOUNDATION_EXPORT int FIRMessagingGetLastStreamId(GPBMessage *proto);
  35. FOUNDATION_EXPORT void FIRMessagingSetLastStreamId(GPBMessage *proto, int sid);
  36. #pragma mark - Time
  37. FOUNDATION_EXPORT int64_t FIRMessagingCurrentTimestampInSeconds(void);
  38. FOUNDATION_EXPORT int64_t FIRMessagingCurrentTimestampInMilliseconds(void);
  39. #pragma mark - App Info
  40. FOUNDATION_EXPORT NSString *FIRMessagingCurrentAppVersion(void);
  41. FOUNDATION_EXPORT NSString *FIRMessagingAppIdentifier(void);
  42. FOUNDATION_EXPORT uint64_t FIRMessagingGetFreeDiskSpaceInMB(void);