2 * Copyright 2017 Google
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #import <UIKit/UIKit.h>
19 typedef NS_ENUM(int8_t, FIRMessagingProtoTag) {
20 kFIRMessagingProtoTagInvalid = -1,
21 kFIRMessagingProtoTagHeartbeatPing = 0,
22 kFIRMessagingProtoTagHeartbeatAck = 1,
23 kFIRMessagingProtoTagLoginRequest = 2,
24 kFIRMessagingProtoTagLoginResponse = 3,
25 kFIRMessagingProtoTagClose = 4,
26 kFIRMessagingProtoTagIqStanza = 7,
27 kFIRMessagingProtoTagDataMessageStanza = 8,
32 #pragma mark - Protocol Buffers
34 FOUNDATION_EXPORT FIRMessagingProtoTag FIRMessagingGetTagForProto(GPBMessage *protoClass);
35 FOUNDATION_EXPORT Class FIRMessagingGetClassForTag(FIRMessagingProtoTag tag);
39 FOUNDATION_EXPORT NSString *FIRMessagingGetRmq2Id(GPBMessage *proto);
40 FOUNDATION_EXPORT void FIRMessagingSetRmq2Id(GPBMessage *proto, NSString *pID);
41 FOUNDATION_EXPORT int FIRMessagingGetLastStreamId(GPBMessage *proto);
42 FOUNDATION_EXPORT void FIRMessagingSetLastStreamId(GPBMessage *proto, int sid);
46 FOUNDATION_EXPORT int64_t FIRMessagingCurrentTimestampInSeconds(void);
47 FOUNDATION_EXPORT int64_t FIRMessagingCurrentTimestampInMilliseconds(void);
49 #pragma mark - App Info
51 FOUNDATION_EXPORT NSString *FIRMessagingCurrentAppVersion(void);
52 FOUNDATION_EXPORT NSString *FIRMessagingAppIdentifier(void);
56 FOUNDATION_EXPORT uint64_t FIRMessagingGetFreeDiskSpaceInMB(void);
57 FOUNDATION_EXPORT UIApplication *FIRMessagingUIApplication(void);