aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firebase/Messaging
diff options
context:
space:
mode:
authorGravatar Chen Liang <chliang@google.com>2018-01-24 12:26:08 -0800
committerGravatar GitHub <noreply@github.com>2018-01-24 12:26:08 -0800
commitfa81c488551575d65fd681e08ff417f354f54e75 (patch)
tree3544f4504c196bf1244a527596a65f66a9f43d30 /Firebase/Messaging
parent4125066bb468f130fe5165cb9188c1ab53c99384 (diff)
parent8f0c3254632db38ad1dd040b395aaf8f55042fd9 (diff)
Merge branch 'master' into messaging-copy
Diffstat (limited to 'Firebase/Messaging')
-rw-r--r--Firebase/Messaging/FIRMessaging.m10
-rw-r--r--Firebase/Messaging/FIRMessagingClient.m3
-rw-r--r--Firebase/Messaging/FIRMessagingContextManagerService.m5
-rw-r--r--Firebase/Messaging/FIRMessagingLogger.m2
-rw-r--r--Firebase/Messaging/FIRMessagingRmq2PersistentStore.m3
-rw-r--r--Firebase/Messaging/Protos/GtalkCore.pbobjc.h56
-rw-r--r--Firebase/Messaging/Protos/GtalkCore.pbobjc.m122
7 files changed, 158 insertions, 43 deletions
diff --git a/Firebase/Messaging/FIRMessaging.m b/Firebase/Messaging/FIRMessaging.m
index 5e46a80..11cacb3 100644
--- a/Firebase/Messaging/FIRMessaging.m
+++ b/Firebase/Messaging/FIRMessaging.m
@@ -36,7 +36,9 @@
#import "FIRMessagingSyncMessageManager.h"
#import "FIRMessagingUtilities.h"
#import "FIRMessagingVersionUtilities.h"
-#import "FIRReachabilityChecker.h"
+
+#import <FirebaseCore/FIRReachabilityChecker.h>
+
#import "NSError+FIRMessaging.h"
static NSString *const kFIRMessagingMessageViaAPNSRootKey = @"aps";
@@ -412,7 +414,10 @@ static NSString *const kFIRMessagingPlistAutoInitEnabled =
}];
} else if ([appDelegate respondsToSelector:openURLWithOptionsSelector]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability"
[appDelegate application:application openURL:url options:@{}];
+#pragma clang diagnostic pop
// Similarly, |application:openURL:sourceApplication:annotation:| will also always be called, due
// to the default swizzling done by FIRAAppDelegateProxy in Firebase Analytics
@@ -763,7 +768,10 @@ static NSString *const kFIRMessagingPlistAutoInitEnabled =
- (void)receiver:(FIRMessagingReceiver *)receiver
receivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {
if ([self.delegate respondsToSelector:@selector(messaging:didReceiveMessage:)]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability"
[self.delegate messaging:self didReceiveMessage:remoteMessage];
+#pragma pop
} else if ([self.delegate respondsToSelector:@selector(applicationReceivedRemoteMessage:)]) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
diff --git a/Firebase/Messaging/FIRMessagingClient.m b/Firebase/Messaging/FIRMessagingClient.m
index 13e1775..51a62b7 100644
--- a/Firebase/Messaging/FIRMessagingClient.m
+++ b/Firebase/Messaging/FIRMessagingClient.m
@@ -16,6 +16,8 @@
#import "FIRMessagingClient.h"
+#import <FirebaseCore/FIRReachabilityChecker.h>
+
#import "FIRMessagingConnection.h"
#import "FIRMessagingConstants.h"
#import "FIRMessagingDataMessageManager.h"
@@ -25,7 +27,6 @@
#import "FIRMessagingRmqManager.h"
#import "FIRMessagingTopicsCommon.h"
#import "FIRMessagingUtilities.h"
-#import "FIRReachabilityChecker.h"
#import "NSError+FIRMessaging.h"
static const NSTimeInterval kConnectTimeoutInterval = 40.0;
diff --git a/Firebase/Messaging/FIRMessagingContextManagerService.m b/Firebase/Messaging/FIRMessagingContextManagerService.m
index 1c9f653..65f64ad 100644
--- a/Firebase/Messaging/FIRMessagingContextManagerService.m
+++ b/Firebase/Messaging/FIRMessagingContextManagerService.m
@@ -143,8 +143,11 @@ typedef NS_ENUM(NSUInteger, FIRMessagingContextManagerMessageType) {
}
if ([apsDictionary[kFIRMessagingContextManagerTitleKey] length]) {
// |alertTitle| is iOS 8.2+, so check if we can set it
- if ([notification respondsToSelector:@selector(setAlertTitle:)]) {
+ if ([notification respondsToSelector:@selector(setAlertTitle:)]) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability"
notification.alertTitle = apsDictionary[kFIRMessagingContextManagerTitleKey];
+#pragma pop
}
}
diff --git a/Firebase/Messaging/FIRMessagingLogger.m b/Firebase/Messaging/FIRMessagingLogger.m
index ee4e771..62eb8da 100644
--- a/Firebase/Messaging/FIRMessagingLogger.m
+++ b/Firebase/Messaging/FIRMessagingLogger.m
@@ -16,7 +16,7 @@
#import "FIRMessagingLogger.h"
-#import "FIRLogger.h"
+#import <FirebaseCore/FIRLogger.h>
@implementation FIRMessagingLogger
diff --git a/Firebase/Messaging/FIRMessagingRmq2PersistentStore.m b/Firebase/Messaging/FIRMessagingRmq2PersistentStore.m
index 189f366..f58bd52 100644
--- a/Firebase/Messaging/FIRMessagingRmq2PersistentStore.m
+++ b/Firebase/Messaging/FIRMessagingRmq2PersistentStore.m
@@ -104,7 +104,10 @@ typedef void(^FCMOutgoingRmqMessagesTableHandler)(int64_t rmqId, int8_t tag, NSD
// Utility to create an NSString from a sqlite3 result code
NSString * _Nonnull FIRMessagingStringFromSQLiteResult(int result) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunguarded-availability"
const char *errorStr = sqlite3_errstr(result);
+#pragma pop
NSString *errorString = [NSString stringWithFormat:@"%d - %s", result, errorStr];
return errorString;
}
diff --git a/Firebase/Messaging/Protos/GtalkCore.pbobjc.h b/Firebase/Messaging/Protos/GtalkCore.pbobjc.h
index d4c8c8c..46d2d9c 100644
--- a/Firebase/Messaging/Protos/GtalkCore.pbobjc.h
+++ b/Firebase/Messaging/Protos/GtalkCore.pbobjc.h
@@ -197,6 +197,9 @@ typedef GPB_ENUM(GtalkClientEvent_Type) {
GtalkClientEvent_Type_DiscardedEvents = 1,
GtalkClientEvent_Type_FailedConnection = 2,
GtalkClientEvent_Type_SuccessfulConnection = 3,
+ GtalkClientEvent_Type_McsReconnectRequest = 4,
+ GtalkClientEvent_Type_FailedSocketCreationMcsReconnect = 5,
+ GtalkClientEvent_Type_McsReconnectLimited = 6,
};
GPBEnumDescriptor *GtalkClientEvent_Type_EnumDescriptor(void);
@@ -207,6 +210,22 @@ GPBEnumDescriptor *GtalkClientEvent_Type_EnumDescriptor(void);
**/
BOOL GtalkClientEvent_Type_IsValidValue(int32_t value);
+#pragma mark - Enum GtalkClientEvent_McsReconnectAction
+
+typedef GPB_ENUM(GtalkClientEvent_McsReconnectAction) {
+ GtalkClientEvent_McsReconnectAction_None = 0,
+ GtalkClientEvent_McsReconnectAction_NotConnected = 1,
+ GtalkClientEvent_McsReconnectAction_TooSoon = 2,
+};
+
+GPBEnumDescriptor *GtalkClientEvent_McsReconnectAction_EnumDescriptor(void);
+
+/**
+ * Checks to see if the given value is defined by the enum or was not known at
+ * the time this source was generated.
+ **/
+BOOL GtalkClientEvent_McsReconnectAction_IsValidValue(int32_t value);
+
#pragma mark - GtalkGtalkCoreRoot
/**
@@ -247,9 +266,9 @@ typedef GPB_ENUM(GtalkHeartbeatPing_FieldNumber) {
@property(nonatomic, readwrite) BOOL hasStatus;
-@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower;
+@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower DEPRECATED_ATTRIBUTE;
/** Test to see if @c cellTower has been set. */
-@property(nonatomic, readwrite) BOOL hasCellTower;
+@property(nonatomic, readwrite) BOOL hasCellTower DEPRECATED_ATTRIBUTE;
@property(nonatomic, readwrite) int32_t intervalMs;
@@ -282,9 +301,9 @@ typedef GPB_ENUM(GtalkHeartbeatAck_FieldNumber) {
@property(nonatomic, readwrite) BOOL hasStatus;
-@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower;
+@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower DEPRECATED_ATTRIBUTE;
/** Test to see if @c cellTower has been set. */
-@property(nonatomic, readwrite) BOOL hasCellTower;
+@property(nonatomic, readwrite) BOOL hasCellTower DEPRECATED_ATTRIBUTE;
@property(nonatomic, readwrite) int32_t intervalMs;
@@ -406,7 +425,6 @@ typedef GPB_ENUM(GtalkLoginRequest_FieldNumber) {
GtalkLoginRequest_FieldNumber_DeviceId = 6,
GtalkLoginRequest_FieldNumber_LastRmqId = 7,
GtalkLoginRequest_FieldNumber_SettingArray = 8,
- GtalkLoginRequest_FieldNumber_Compress = 9,
GtalkLoginRequest_FieldNumber_ReceivedPersistentIdArray = 10,
GtalkLoginRequest_FieldNumber_IncludeStreamIds = 11,
GtalkLoginRequest_FieldNumber_HeartbeatStat = 13,
@@ -420,6 +438,8 @@ typedef GPB_ENUM(GtalkLoginRequest_FieldNumber) {
GtalkLoginRequest_FieldNumber_GcmStartTimeMs = 21,
GtalkLoginRequest_FieldNumber_ClientEventArray = 22,
GtalkLoginRequest_FieldNumber_OnFallback = 23,
+ GtalkLoginRequest_FieldNumber_NoPendingUpstream = 24,
+ GtalkLoginRequest_FieldNumber_ReconnectRequestId = 25,
};
@interface GtalkLoginRequest : GPBMessage
@@ -464,10 +484,6 @@ typedef GPB_ENUM(GtalkLoginRequest_FieldNumber) {
@property(nonatomic, readonly) NSUInteger settingArray_Count;
-@property(nonatomic, readwrite) int32_t compress;
-
-@property(nonatomic, readwrite) BOOL hasCompress;
-
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *receivedPersistentIdArray;
/** The number of items in @c receivedPersistentIdArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger receivedPersistentIdArray_Count;
@@ -507,9 +523,9 @@ typedef GPB_ENUM(GtalkLoginRequest_FieldNumber) {
@property(nonatomic, readwrite) BOOL hasTokenVersionInfo;
-@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower;
+@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower DEPRECATED_ATTRIBUTE;
/** Test to see if @c cellTower has been set. */
-@property(nonatomic, readwrite) BOOL hasCellTower;
+@property(nonatomic, readwrite) BOOL hasCellTower DEPRECATED_ATTRIBUTE;
@property(nonatomic, readwrite) uint64_t gcmStartTimeMs;
@@ -524,6 +540,14 @@ typedef GPB_ENUM(GtalkLoginRequest_FieldNumber) {
@property(nonatomic, readwrite) BOOL onFallback;
@property(nonatomic, readwrite) BOOL hasOnFallback;
+
+@property(nonatomic, readwrite) BOOL noPendingUpstream;
+
+@property(nonatomic, readwrite) BOOL hasNoPendingUpstream;
+
+@property(nonatomic, readwrite) int32_t reconnectRequestId;
+
+@property(nonatomic, readwrite) BOOL hasReconnectRequestId;
@end
#pragma mark - GtalkLoginResponse
@@ -1242,9 +1266,9 @@ typedef GPB_ENUM(GtalkDataMessageStanza_FieldNumber) {
@property(nonatomic, readwrite) BOOL hasFlags;
-@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower;
+@property(nonatomic, readwrite, strong, null_resettable) GtalkCellTower *cellTower DEPRECATED_ATTRIBUTE;
/** Test to see if @c cellTower has been set. */
-@property(nonatomic, readwrite) BOOL hasCellTower;
+@property(nonatomic, readwrite) BOOL hasCellTower DEPRECATED_ATTRIBUTE;
@property(nonatomic, readwrite) int32_t priority;
@@ -1273,6 +1297,7 @@ typedef GPB_ENUM(GtalkCellTower_FieldNumber) {
GtalkCellTower_FieldNumber_KnownCongestionStatus = 2,
};
+DEPRECATED_ATTRIBUTE
@interface GtalkCellTower : GPBMessage
@@ -1297,6 +1322,7 @@ typedef GPB_ENUM(GtalkClientEvent_FieldNumber) {
GtalkClientEvent_FieldNumber_TimeConnectionEndedMs = 203,
GtalkClientEvent_FieldNumber_ErrorCode = 204,
GtalkClientEvent_FieldNumber_TimeConnectionEstablishedMs = 300,
+ GtalkClientEvent_FieldNumber_McsReconnectAction = 400,
};
@interface GtalkClientEvent : GPBMessage
@@ -1333,6 +1359,10 @@ typedef GPB_ENUM(GtalkClientEvent_FieldNumber) {
@property(nonatomic, readwrite) uint64_t timeConnectionEstablishedMs;
@property(nonatomic, readwrite) BOOL hasTimeConnectionEstablishedMs;
+
+@property(nonatomic, readwrite) GtalkClientEvent_McsReconnectAction mcsReconnectAction;
+
+@property(nonatomic, readwrite) BOOL hasMcsReconnectAction;
@end
NS_ASSUME_NONNULL_END
diff --git a/Firebase/Messaging/Protos/GtalkCore.pbobjc.m b/Firebase/Messaging/Protos/GtalkCore.pbobjc.m
index f4efe22..06c9134 100644
--- a/Firebase/Messaging/Protos/GtalkCore.pbobjc.m
+++ b/Firebase/Messaging/Protos/GtalkCore.pbobjc.m
@@ -503,7 +503,6 @@ typedef struct GtalkHeartbeatConfig__storage_ {
@dynamic hasDeviceId, deviceId;
@dynamic hasLastRmqId, lastRmqId;
@dynamic settingArray, settingArray_Count;
-@dynamic hasCompress, compress;
@dynamic receivedPersistentIdArray, receivedPersistentIdArray_Count;
@dynamic hasIncludeStreamIds, includeStreamIds;
@dynamic hasHeartbeatStat, heartbeatStat;
@@ -517,12 +516,14 @@ typedef struct GtalkHeartbeatConfig__storage_ {
@dynamic hasGcmStartTimeMs, gcmStartTimeMs;
@dynamic clientEventArray, clientEventArray_Count;
@dynamic hasOnFallback, onFallback;
+@dynamic hasNoPendingUpstream, noPendingUpstream;
+@dynamic hasReconnectRequestId, reconnectRequestId;
typedef struct GtalkLoginRequest__storage_ {
uint32_t _has_storage_[1];
- int32_t compress;
GtalkLoginRequest_AuthService authService;
int32_t networkType;
+ int32_t reconnectRequestId;
NSString *id_p;
NSString *domain;
NSString *user;
@@ -620,15 +621,6 @@ typedef struct GtalkLoginRequest__storage_ {
.dataType = GPBDataTypeMessage,
},
{
- .name = "compress",
- .dataTypeSpecific.className = NULL,
- .number = GtalkLoginRequest_FieldNumber_Compress,
- .hasIndex = 7,
- .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, compress),
- .flags = GPBFieldOptional,
- .dataType = GPBDataTypeInt32,
- },
- {
.name = "receivedPersistentIdArray",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_ReceivedPersistentIdArray,
@@ -641,8 +633,8 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "includeStreamIds",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_IncludeStreamIds,
- .hasIndex = 8,
- .offset = 9, // Stored in _has_storage_ to save space.
+ .hasIndex = 7,
+ .offset = 8, // Stored in _has_storage_ to save space.
.flags = GPBFieldOptional,
.dataType = GPBDataTypeBool,
},
@@ -650,7 +642,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "heartbeatStat",
.dataTypeSpecific.className = GPBStringifySymbol(GtalkHeartbeatStat),
.number = GtalkLoginRequest_FieldNumber_HeartbeatStat,
- .hasIndex = 10,
+ .hasIndex = 9,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, heartbeatStat),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeMessage,
@@ -659,8 +651,8 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "useRmq2",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_UseRmq2,
- .hasIndex = 11,
- .offset = 12, // Stored in _has_storage_ to save space.
+ .hasIndex = 10,
+ .offset = 11, // Stored in _has_storage_ to save space.
.flags = GPBFieldOptional,
.dataType = GPBDataTypeBool,
},
@@ -668,7 +660,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "accountId",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_AccountId,
- .hasIndex = 13,
+ .hasIndex = 12,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, accountId),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeInt64,
@@ -677,7 +669,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "authService",
.dataTypeSpecific.enumDescFunc = GtalkLoginRequest_AuthService_EnumDescriptor,
.number = GtalkLoginRequest_FieldNumber_AuthService,
- .hasIndex = 14,
+ .hasIndex = 13,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, authService),
.flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
.dataType = GPBDataTypeEnum,
@@ -686,7 +678,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "networkType",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_NetworkType,
- .hasIndex = 15,
+ .hasIndex = 14,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, networkType),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeInt32,
@@ -695,7 +687,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "status",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_Status,
- .hasIndex = 16,
+ .hasIndex = 15,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, status),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeInt64,
@@ -704,7 +696,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "tokenVersionInfo",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_TokenVersionInfo,
- .hasIndex = 17,
+ .hasIndex = 16,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, tokenVersionInfo),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeString,
@@ -713,7 +705,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "cellTower",
.dataTypeSpecific.className = GPBStringifySymbol(GtalkCellTower),
.number = GtalkLoginRequest_FieldNumber_CellTower,
- .hasIndex = 18,
+ .hasIndex = 17,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, cellTower),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeMessage,
@@ -722,7 +714,7 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "gcmStartTimeMs",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_GcmStartTimeMs,
- .hasIndex = 19,
+ .hasIndex = 18,
.offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, gcmStartTimeMs),
.flags = GPBFieldOptional,
.dataType = GPBDataTypeUInt64,
@@ -740,11 +732,29 @@ typedef struct GtalkLoginRequest__storage_ {
.name = "onFallback",
.dataTypeSpecific.className = NULL,
.number = GtalkLoginRequest_FieldNumber_OnFallback,
- .hasIndex = 20,
- .offset = 21, // Stored in _has_storage_ to save space.
+ .hasIndex = 19,
+ .offset = 20, // Stored in _has_storage_ to save space.
.flags = GPBFieldOptional,
.dataType = GPBDataTypeBool,
},
+ {
+ .name = "noPendingUpstream",
+ .dataTypeSpecific.className = NULL,
+ .number = GtalkLoginRequest_FieldNumber_NoPendingUpstream,
+ .hasIndex = 21,
+ .offset = 22, // Stored in _has_storage_ to save space.
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBool,
+ },
+ {
+ .name = "reconnectRequestId",
+ .dataTypeSpecific.className = NULL,
+ .number = GtalkLoginRequest_FieldNumber_ReconnectRequestId,
+ .hasIndex = 23,
+ .offset = (uint32_t)offsetof(GtalkLoginRequest__storage_, reconnectRequestId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
};
GPBDescriptor *localDescriptor =
[GPBDescriptor allocDescriptorForClass:[GtalkLoginRequest class]
@@ -2730,6 +2740,9 @@ typedef struct GtalkTalkMetadata__storage_ {
#pragma mark - GtalkCellTower
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-implementations"
+
@implementation GtalkCellTower
@dynamic hasId_p, id_p;
@@ -2782,6 +2795,8 @@ typedef struct GtalkCellTower__storage_ {
@end
+#pragma clang diagnostic pop
+
#pragma mark - GtalkClientEvent
@implementation GtalkClientEvent
@@ -2794,6 +2809,7 @@ typedef struct GtalkCellTower__storage_ {
@dynamic hasTimeConnectionEndedMs, timeConnectionEndedMs;
@dynamic hasErrorCode, errorCode;
@dynamic hasTimeConnectionEstablishedMs, timeConnectionEstablishedMs;
+@dynamic hasMcsReconnectAction, mcsReconnectAction;
typedef struct GtalkClientEvent__storage_ {
uint32_t _has_storage_[1];
@@ -2802,6 +2818,7 @@ typedef struct GtalkClientEvent__storage_ {
int32_t networkType;
int32_t networkPort;
int32_t errorCode;
+ GtalkClientEvent_McsReconnectAction mcsReconnectAction;
uint64_t timeConnectionStartedMs;
uint64_t timeConnectionEndedMs;
uint64_t timeConnectionEstablishedMs;
@@ -2885,6 +2902,15 @@ typedef struct GtalkClientEvent__storage_ {
.flags = GPBFieldOptional,
.dataType = GPBDataTypeUInt64,
},
+ {
+ .name = "mcsReconnectAction",
+ .dataTypeSpecific.enumDescFunc = GtalkClientEvent_McsReconnectAction_EnumDescriptor,
+ .number = GtalkClientEvent_FieldNumber_McsReconnectAction,
+ .hasIndex = 8,
+ .offset = (uint32_t)offsetof(GtalkClientEvent__storage_, mcsReconnectAction),
+ .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
+ .dataType = GPBDataTypeEnum,
+ },
};
GPBDescriptor *localDescriptor =
[GPBDescriptor allocDescriptorForClass:[GtalkClientEvent class]
@@ -2909,12 +2935,17 @@ GPBEnumDescriptor *GtalkClientEvent_Type_EnumDescriptor(void) {
if (!descriptor) {
static const char *valueNames =
"Unknown\000DiscardedEvents\000FailedConnection"
- "\000SuccessfulConnection\000";
+ "\000SuccessfulConnection\000McsReconnectReques"
+ "t\000FailedSocketCreationMcsReconnect\000McsRe"
+ "connectLimited\000";
static const int32_t values[] = {
GtalkClientEvent_Type_Unknown,
GtalkClientEvent_Type_DiscardedEvents,
GtalkClientEvent_Type_FailedConnection,
GtalkClientEvent_Type_SuccessfulConnection,
+ GtalkClientEvent_Type_McsReconnectRequest,
+ GtalkClientEvent_Type_FailedSocketCreationMcsReconnect,
+ GtalkClientEvent_Type_McsReconnectLimited,
};
GPBEnumDescriptor *worker =
[GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkClientEvent_Type)
@@ -2935,6 +2966,45 @@ BOOL GtalkClientEvent_Type_IsValidValue(int32_t value__) {
case GtalkClientEvent_Type_DiscardedEvents:
case GtalkClientEvent_Type_FailedConnection:
case GtalkClientEvent_Type_SuccessfulConnection:
+ case GtalkClientEvent_Type_McsReconnectRequest:
+ case GtalkClientEvent_Type_FailedSocketCreationMcsReconnect:
+ case GtalkClientEvent_Type_McsReconnectLimited:
+ return YES;
+ default:
+ return NO;
+ }
+}
+
+#pragma mark - Enum GtalkClientEvent_McsReconnectAction
+
+GPBEnumDescriptor *GtalkClientEvent_McsReconnectAction_EnumDescriptor(void) {
+ static GPBEnumDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static const char *valueNames =
+ "None\000NotConnected\000TooSoon\000";
+ static const int32_t values[] = {
+ GtalkClientEvent_McsReconnectAction_None,
+ GtalkClientEvent_McsReconnectAction_NotConnected,
+ GtalkClientEvent_McsReconnectAction_TooSoon,
+ };
+ GPBEnumDescriptor *worker =
+ [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GtalkClientEvent_McsReconnectAction)
+ valueNames:valueNames
+ values:values
+ count:(uint32_t)(sizeof(values) / sizeof(int32_t))
+ enumVerifier:GtalkClientEvent_McsReconnectAction_IsValidValue];
+ if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
+ [worker release];
+ }
+ }
+ return descriptor;
+}
+
+BOOL GtalkClientEvent_McsReconnectAction_IsValidValue(int32_t value__) {
+ switch (value__) {
+ case GtalkClientEvent_McsReconnectAction_None:
+ case GtalkClientEvent_McsReconnectAction_NotConnected:
+ case GtalkClientEvent_McsReconnectAction_TooSoon:
return YES;
default:
return NO;