added iOS source code
[wl-app.git] / iOS / Pods / FirebaseMessaging / Firebase / Messaging / FIRMessagingUtilities.h
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
17 #import <UIKit/UIKit.h>
18
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,
28 };
29
30 @class GPBMessage;
31
32 #pragma mark - Protocol Buffers
33
34 FOUNDATION_EXPORT FIRMessagingProtoTag FIRMessagingGetTagForProto(GPBMessage *protoClass);
35 FOUNDATION_EXPORT Class FIRMessagingGetClassForTag(FIRMessagingProtoTag tag);
36
37 #pragma mark - MCS
38
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);
43
44 #pragma mark - Time
45
46 FOUNDATION_EXPORT int64_t FIRMessagingCurrentTimestampInSeconds(void);
47 FOUNDATION_EXPORT int64_t FIRMessagingCurrentTimestampInMilliseconds(void);
48
49 #pragma mark - App Info
50
51 FOUNDATION_EXPORT NSString *FIRMessagingCurrentAppVersion(void);
52 FOUNDATION_EXPORT NSString *FIRMessagingAppIdentifier(void);
53
54 #pragma mark - Others
55
56 FOUNDATION_EXPORT uint64_t FIRMessagingGetFreeDiskSpaceInMB(void);
57 FOUNDATION_EXPORT UIApplication *FIRMessagingUIApplication(void);
58