com.beamable 5.0.0-PREVIEW.RC1 → 5.0.0-PREVIEW.RC10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.attestation.p7m +0 -0
- package/CHANGELOG.md +11 -0
- package/Common/Runtime/AgnosticAttribute.cs +52 -52
- package/Common/Runtime/AgnosticAttribute.cs.meta +11 -11
- package/Common/Runtime/Api/AliasHelper.cs +55 -55
- package/Common/Runtime/Api/AliasHelper.cs.meta +11 -11
- package/Common/Runtime/Api/Analytics/AnalyticsEventRequest.cs +2 -2
- package/Common/Runtime/Api/Analytics/AnalyticsEventRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Analytics/AnalyticsService.cs +2 -2
- package/Common/Runtime/Api/Analytics/AnalyticsService.cs.meta +11 -11
- package/Common/Runtime/Api/Analytics/IBeamAnalyticsService.cs +2 -2
- package/Common/Runtime/Api/Analytics/IBeamAnalyticsService.cs.meta +11 -11
- package/Common/Runtime/Api/Analytics/Models/CoreEvent.cs +2 -2
- package/Common/Runtime/Api/Analytics/Models/CoreEvent.cs.meta +11 -11
- package/Common/Runtime/Api/Analytics/Models/IAnalyticsEvent.cs +2 -2
- package/Common/Runtime/Api/Analytics/Models/IAnalyticsEvent.cs.meta +11 -11
- package/Common/Runtime/Api/Analytics/Models/SampleCustomEvent.cs +2 -2
- package/Common/Runtime/Api/Analytics/Models/SampleCustomEvent.cs.meta +11 -11
- package/Common/Runtime/Api/Analytics/Models.meta +11 -11
- package/Common/Runtime/Api/Analytics.meta +11 -11
- package/Common/Runtime/Api/Announcements/AbsAnnouncementsApi.cs +68 -68
- package/Common/Runtime/Api/Announcements/AbsAnnouncementsApi.cs.meta +11 -11
- package/Common/Runtime/Api/Announcements/IAnnouncementsApi.cs +388 -388
- package/Common/Runtime/Api/Announcements/IAnnouncementsApi.cs.meta +11 -11
- package/Common/Runtime/Api/Announcements.meta +11 -11
- package/Common/Runtime/Api/Auth/AuthApi.cs +981 -981
- package/Common/Runtime/Api/Auth/AuthApi.cs.meta +11 -11
- package/Common/Runtime/Api/Auth/IAuthApi.cs +343 -343
- package/Common/Runtime/Api/Auth/IAuthApi.cs.meta +11 -11
- package/Common/Runtime/Api/Auth.meta +11 -11
- package/Common/Runtime/Api/Calendars/AbsCalendarApi.cs +41 -41
- package/Common/Runtime/Api/Calendars/AbsCalendarApi.cs.meta +11 -11
- package/Common/Runtime/Api/Calendars/ICalendarApi.cs +120 -120
- package/Common/Runtime/Api/Calendars/ICalendarApi.cs.meta +11 -11
- package/Common/Runtime/Api/Calendars.meta +11 -11
- package/Common/Runtime/Api/Chat/ChatApi.cs +70 -70
- package/Common/Runtime/Api/Chat/ChatApi.cs.meta +11 -11
- package/Common/Runtime/Api/Chat/IChatApi.cs +184 -184
- package/Common/Runtime/Api/Chat/IChatApi.cs.meta +11 -11
- package/Common/Runtime/Api/Chat.meta +11 -11
- package/Common/Runtime/Api/CloudData/CloudDataApi.cs +127 -127
- package/Common/Runtime/Api/CloudData/CloudDataApi.cs.meta +11 -11
- package/Common/Runtime/Api/CloudData/ICloudDataApi.cs +42 -42
- package/Common/Runtime/Api/CloudData/ICloudDataApi.cs.meta +11 -11
- package/Common/Runtime/Api/CloudData.meta +11 -11
- package/Common/Runtime/Api/CometClientData.cs +69 -69
- package/Common/Runtime/Api/CometClientData.cs.meta +11 -11
- package/Common/Runtime/Api/Commerce/ICommerceApi.cs +10 -10
- package/Common/Runtime/Api/Commerce/ICommerceApi.cs.meta +11 -11
- package/Common/Runtime/Api/Commerce.meta +11 -11
- package/Common/Runtime/Api/Content/IContentApi.cs +167 -167
- package/Common/Runtime/Api/Content/IContentApi.cs.meta +11 -11
- package/Common/Runtime/Api/Content.meta +11 -11
- package/Common/Runtime/Api/Events/AbsEventsApi.cs +50 -50
- package/Common/Runtime/Api/Events/AbsEventsApi.cs.meta +11 -11
- package/Common/Runtime/Api/Events/IEventsApi.cs +166 -166
- package/Common/Runtime/Api/Events/IEventsApi.cs.meta +11 -11
- package/Common/Runtime/Api/Events.meta +11 -11
- package/Common/Runtime/Api/Groups/GroupsApi.cs +762 -762
- package/Common/Runtime/Api/Groups/GroupsApi.cs.meta +11 -11
- package/Common/Runtime/Api/Groups/IGroupsApi.cs +211 -211
- package/Common/Runtime/Api/Groups/IGroupsApi.cs.meta +11 -11
- package/Common/Runtime/Api/Groups.meta +11 -11
- package/Common/Runtime/Api/IAccessToken.cs +48 -48
- package/Common/Runtime/Api/IAccessToken.cs.meta +11 -11
- package/Common/Runtime/Api/IBeamableFilesystemAccessor.cs +13 -13
- package/Common/Runtime/Api/IBeamableFilesystemAccessor.cs.meta +11 -11
- package/Common/Runtime/Api/IBeamableRequester.cs +770 -770
- package/Common/Runtime/Api/IBeamableRequester.cs.meta +11 -11
- package/Common/Runtime/Api/IConnectivityChecker.cs +49 -49
- package/Common/Runtime/Api/IConnectivityChecker.cs.meta +11 -11
- package/Common/Runtime/Api/IHasBeamableRequester.cs +12 -12
- package/Common/Runtime/Api/IHasBeamableRequester.cs.meta +11 -11
- package/Common/Runtime/Api/IServiceRoutingStrategy.cs +123 -123
- package/Common/Runtime/Api/IServiceRoutingStrategy.cs.meta +11 -11
- package/Common/Runtime/Api/ISupportsGet.cs +160 -160
- package/Common/Runtime/Api/ISupportsGet.cs.meta +11 -11
- package/Common/Runtime/Api/IUserContext.cs +22 -22
- package/Common/Runtime/Api/IUserContext.cs.meta +11 -11
- package/Common/Runtime/Api/IUserDataCache.cs +88 -88
- package/Common/Runtime/Api/IUserDataCache.cs.meta +11 -11
- package/Common/Runtime/Api/Inventory/IInventoryApi.cs +796 -796
- package/Common/Runtime/Api/Inventory/IInventoryApi.cs.meta +11 -11
- package/Common/Runtime/Api/Inventory/InventoryApi.cs +308 -308
- package/Common/Runtime/Api/Inventory/InventoryApi.cs.meta +11 -11
- package/Common/Runtime/Api/Inventory/InventoryUpdateBuilder.cs +712 -712
- package/Common/Runtime/Api/Inventory/InventoryUpdateBuilder.cs.meta +11 -11
- package/Common/Runtime/Api/Inventory.meta +11 -11
- package/Common/Runtime/Api/Leaderboards/ILeaderboardApi.cs +509 -509
- package/Common/Runtime/Api/Leaderboards/ILeaderboardApi.cs.meta +11 -11
- package/Common/Runtime/Api/Leaderboards/LeaderboardApi.cs +237 -237
- package/Common/Runtime/Api/Leaderboards/LeaderboardApi.cs.meta +11 -11
- package/Common/Runtime/Api/Leaderboards.meta +11 -11
- package/Common/Runtime/Api/Lobbies/ILobbyApi.cs +153 -153
- package/Common/Runtime/Api/Lobbies/ILobbyApi.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/Lobby.cs +92 -92
- package/Common/Runtime/Api/Lobbies/Lobby.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/LobbyNotification.cs +15 -15
- package/Common/Runtime/Api/Lobbies/LobbyNotification.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/LobbyPlayer.cs +59 -59
- package/Common/Runtime/Api/Lobbies/LobbyPlayer.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/LobbyRestriction.cs +19 -19
- package/Common/Runtime/Api/Lobbies/LobbyRestriction.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/LobbyService.cs +191 -191
- package/Common/Runtime/Api/Lobbies/LobbyService.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/LobbyUtils.cs +157 -157
- package/Common/Runtime/Api/Lobbies/LobbyUtils.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/NotInLobby.cs +12 -12
- package/Common/Runtime/Api/Lobbies/NotInLobby.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/Requests/AddTagsRequest.cs +36 -36
- package/Common/Runtime/Api/Lobbies/Requests/AddTagsRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/Requests/CreateLobbyRequest.cs +70 -70
- package/Common/Runtime/Api/Lobbies/Requests/CreateLobbyRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/Requests/JoinByPasscodeRequest.cs +30 -30
- package/Common/Runtime/Api/Lobbies/Requests/JoinByPasscodeRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/Requests/JoinLobbyRequest.cs +24 -24
- package/Common/Runtime/Api/Lobbies/Requests/JoinLobbyRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/Requests/LobbyQueryRequest.cs +35 -35
- package/Common/Runtime/Api/Lobbies/Requests/LobbyQueryRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/Requests/LobbyQueryResponse.cs +19 -19
- package/Common/Runtime/Api/Lobbies/Requests/LobbyQueryResponse.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/Requests/RemoveFromLobbyRequest.cs +24 -24
- package/Common/Runtime/Api/Lobbies/Requests/RemoveFromLobbyRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/Requests/RemoveTagsRequest.cs +30 -30
- package/Common/Runtime/Api/Lobbies/Requests/RemoveTagsRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/Requests/UpdateLobbyRequest.cs +62 -62
- package/Common/Runtime/Api/Lobbies/Requests/UpdateLobbyRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Lobbies/Requests.meta +11 -11
- package/Common/Runtime/Api/Lobbies.meta +11 -11
- package/Common/Runtime/Api/Mail/AbsMailApi.cs +704 -704
- package/Common/Runtime/Api/Mail/AbsMailApi.cs.meta +11 -11
- package/Common/Runtime/Api/Mail/IMailApi.cs +48 -48
- package/Common/Runtime/Api/Mail/IMailApi.cs.meta +11 -11
- package/Common/Runtime/Api/Mail.meta +11 -11
- package/Common/Runtime/Api/Notifications/INotificationService.cs +113 -113
- package/Common/Runtime/Api/Notifications/INotificationService.cs.meta +11 -11
- package/Common/Runtime/Api/Notifications/PrimitiveStringPayload.cs +13 -13
- package/Common/Runtime/Api/Notifications/PrimitiveStringPayload.cs.meta +11 -11
- package/Common/Runtime/Api/Notifications.meta +11 -11
- package/Common/Runtime/Api/Parties/IPartyApi.cs +96 -96
- package/Common/Runtime/Api/Parties/IPartyApi.cs.meta +11 -11
- package/Common/Runtime/Api/Parties/NotInParty.cs +11 -11
- package/Common/Runtime/Api/Parties/NotInParty.cs.meta +11 -11
- package/Common/Runtime/Api/Parties/Party.cs +59 -59
- package/Common/Runtime/Api/Parties/Party.cs.meta +11 -11
- package/Common/Runtime/Api/Parties/PartyNotifications.cs +55 -55
- package/Common/Runtime/Api/Parties/PartyNotifications.cs.meta +11 -11
- package/Common/Runtime/Api/Parties/PartyRestriction.cs +13 -13
- package/Common/Runtime/Api/Parties/PartyRestriction.cs.meta +11 -11
- package/Common/Runtime/Api/Parties/PartyService.cs +124 -124
- package/Common/Runtime/Api/Parties/PartyService.cs.meta +11 -11
- package/Common/Runtime/Api/Parties/Requests/CreatePartyRequest.cs +43 -43
- package/Common/Runtime/Api/Parties/Requests/CreatePartyRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Parties/Requests/PartyQueryResponse.cs +19 -19
- package/Common/Runtime/Api/Parties/Requests/PartyQueryResponse.cs.meta +11 -11
- package/Common/Runtime/Api/Parties/Requests/PlayerRequest.cs +24 -24
- package/Common/Runtime/Api/Parties/Requests/PlayerRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Parties/Requests/UpdatePartyRequest.cs +37 -37
- package/Common/Runtime/Api/Parties/Requests/UpdatePartyRequest.cs.meta +11 -11
- package/Common/Runtime/Api/Parties/Requests.meta +11 -11
- package/Common/Runtime/Api/Parties.meta +11 -11
- package/Common/Runtime/Api/Payments/IPaymentsApi.cs +14 -14
- package/Common/Runtime/Api/Payments/IPaymentsApi.cs.meta +11 -11
- package/Common/Runtime/Api/Payments/PaymentsApi.cs +33 -33
- package/Common/Runtime/Api/Payments/PaymentsApi.cs.meta +11 -11
- package/Common/Runtime/Api/Payments.meta +11 -11
- package/Common/Runtime/Api/Presence/IPresenceApi.cs +31 -31
- package/Common/Runtime/Api/Presence/IPresenceApi.cs.meta +11 -11
- package/Common/Runtime/Api/Presence/PresenceService.cs +165 -165
- package/Common/Runtime/Api/Presence/PresenceService.cs.meta +11 -11
- package/Common/Runtime/Api/Presence.meta +11 -11
- package/Common/Runtime/Api/Push/IPushApi.cs +9 -9
- package/Common/Runtime/Api/Push/IPushApi.cs.meta +11 -11
- package/Common/Runtime/Api/Push.meta +11 -11
- package/Common/Runtime/Api/QueryBuilder.cs +85 -85
- package/Common/Runtime/Api/QueryBuilder.cs.meta +11 -11
- package/Common/Runtime/Api/Realms/IAliasService.cs +98 -98
- package/Common/Runtime/Api/Realms/IAliasService.cs.meta +11 -11
- package/Common/Runtime/Api/Realms/IRealmApi.cs +17 -17
- package/Common/Runtime/Api/Realms/IRealmApi.cs.meta +11 -11
- package/Common/Runtime/Api/Realms/RealmService.cs +378 -378
- package/Common/Runtime/Api/Realms/RealmService.cs.meta +11 -11
- package/Common/Runtime/Api/Realms.meta +11 -11
- package/Common/Runtime/Api/SignedRequesterHelper.cs +2 -2
- package/Common/Runtime/Api/SignedRequesterHelper.cs.meta +11 -11
- package/Common/Runtime/Api/Social/ISocialApi.cs +76 -76
- package/Common/Runtime/Api/Social/ISocialApi.cs.meta +11 -11
- package/Common/Runtime/Api/Social/SocialApi.cs +329 -329
- package/Common/Runtime/Api/Social/SocialApi.cs.meta +11 -11
- package/Common/Runtime/Api/Social.meta +11 -11
- package/Common/Runtime/Api/Stats/AbsStatsApi.cs +345 -345
- package/Common/Runtime/Api/Stats/AbsStatsApi.cs.meta +11 -11
- package/Common/Runtime/Api/Stats/IStatsApi.cs +199 -199
- package/Common/Runtime/Api/Stats/IStatsApi.cs.meta +11 -11
- package/Common/Runtime/Api/Stats/StatsAccessType.cs +2 -2
- package/Common/Runtime/Api/Stats/StatsAccessType.cs.meta +11 -11
- package/Common/Runtime/Api/Stats/StatsApiHelper.cs +2 -2
- package/Common/Runtime/Api/Stats/StatsApiHelper.cs.meta +11 -11
- package/Common/Runtime/Api/Stats/StatsDomainType.cs +2 -2
- package/Common/Runtime/Api/Stats/StatsDomainType.cs.meta +11 -11
- package/Common/Runtime/Api/Stats.meta +11 -11
- package/Common/Runtime/Api/Tournaments/ITournamentApi.cs +626 -626
- package/Common/Runtime/Api/Tournaments/ITournamentApi.cs.meta +11 -11
- package/Common/Runtime/Api/Tournaments/TournamentApi.cs +284 -284
- package/Common/Runtime/Api/Tournaments/TournamentApi.cs.meta +11 -11
- package/Common/Runtime/Api/Tournaments.meta +11 -11
- package/Common/Runtime/Api.meta +11 -11
- package/Common/Runtime/BeamCli/CliContractTypeAttribute.cs +12 -12
- package/Common/Runtime/BeamCli/CliContractTypeAttribute.cs.meta +11 -11
- package/Common/Runtime/BeamCli/CliOtelData.cs +25 -25
- package/Common/Runtime/BeamCli/CliOtelData.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/CliLogMessage.cs +32 -32
- package/Common/Runtime/BeamCli/Contracts/CliLogMessage.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/CollectorStatus.cs +2 -2
- package/Common/Runtime/BeamCli/Contracts/CollectorStatus.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/Constants.cs +33 -33
- package/Common/Runtime/BeamCli/Contracts/Constants.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/ContentService/AutoSnapshotActionType.cs +2 -2
- package/Common/Runtime/BeamCli/Contracts/ContentService/AutoSnapshotActionType.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/ContentService/AutoSnapshotType.cs +2 -2
- package/Common/Runtime/BeamCli/Contracts/ContentService/AutoSnapshotType.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/ContentService/ContentSnapshotType.cs +2 -2
- package/Common/Runtime/BeamCli/Contracts/ContentService/ContentSnapshotType.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/ContentService/ContentStatus.cs +2 -2
- package/Common/Runtime/BeamCli/Contracts/ContentService/ContentStatus.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/ContentService/LocalContentManifest.cs +2 -2
- package/Common/Runtime/BeamCli/Contracts/ContentService/LocalContentManifest.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/ContentService/LocalContentManifestEntry.cs +2 -2
- package/Common/Runtime/BeamCli/Contracts/ContentService/LocalContentManifestEntry.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/ContentService/ManifestAuthor.cs +2 -2
- package/Common/Runtime/BeamCli/Contracts/ContentService/ManifestAuthor.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/ContentService/ManifestProjectData.cs +2 -2
- package/Common/Runtime/BeamCli/Contracts/ContentService/ManifestProjectData.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/ContentService/TagStatus.cs +2 -2
- package/Common/Runtime/BeamCli/Contracts/ContentService/TagStatus.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/ContentService.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/EnvironmentVersionData.cs +14 -14
- package/Common/Runtime/BeamCli/Contracts/EnvironmentVersionData.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/GenerateEnvOutput.cs +23 -23
- package/Common/Runtime/BeamCli/Contracts/GenerateEnvOutput.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts/ServiceInfo.cs +15 -15
- package/Common/Runtime/BeamCli/Contracts/ServiceInfo.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Contracts.meta +11 -11
- package/Common/Runtime/BeamCli/ErrorOutput.cs +38 -38
- package/Common/Runtime/BeamCli/ErrorOutput.cs.meta +11 -11
- package/Common/Runtime/BeamCli/IBeamCommand.cs +51 -51
- package/Common/Runtime/BeamCli/IBeamCommand.cs.meta +11 -11
- package/Common/Runtime/BeamCli/Reporting.cs +51 -51
- package/Common/Runtime/BeamCli/Reporting.cs.meta +11 -11
- package/Common/Runtime/BeamCli/ServiceInfoHelper.cs +31 -31
- package/Common/Runtime/BeamCli/ServiceInfoHelper.cs.meta +11 -11
- package/Common/Runtime/BeamCli.meta +11 -11
- package/Common/Runtime/BeamGenerateSchemaAttribute.cs +2 -2
- package/Common/Runtime/BeamGenerateSchemaAttribute.cs.meta +11 -11
- package/Common/Runtime/BeamableColorUtil.cs +25 -25
- package/Common/Runtime/BeamableColorUtil.cs.meta +11 -11
- package/Common/Runtime/BeamableEnumExtensions.cs +35 -35
- package/Common/Runtime/BeamableEnumExtensions.cs.meta +11 -11
- package/Common/Runtime/BeamableTaskExtensions.cs +27 -27
- package/Common/Runtime/BeamableTaskExtensions.cs.meta +11 -11
- package/Common/Runtime/Collections/ConcurrentBag.cs +49 -49
- package/Common/Runtime/Collections/ConcurrentBag.cs.meta +11 -11
- package/Common/Runtime/Collections/ConcurrentDictionary.cs +109 -109
- package/Common/Runtime/Collections/ConcurrentDictionary.cs.meta +11 -11
- package/Common/Runtime/Collections.meta +11 -11
- package/Common/Runtime/Constants/Constants.cs +184 -184
- package/Common/Runtime/Constants/Constants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/ArchiveConstants.cs +24 -24
- package/Common/Runtime/Constants/Implementations/ArchiveConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/ConfigConstants.cs +25 -25
- package/Common/Runtime/Constants/Implementations/ConfigConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/ContentConstants.cs +28 -28
- package/Common/Runtime/Constants/Implementations/ContentConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/ContentManagerConstants.cs +113 -113
- package/Common/Runtime/Constants/Implementations/ContentManagerConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/CronConstants.cs +19 -19
- package/Common/Runtime/Constants/Implementations/CronConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/DockerConstants.cs +21 -21
- package/Common/Runtime/Constants/Implementations/DockerConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/EnvironmentConstants.cs +23 -23
- package/Common/Runtime/Constants/Implementations/EnvironmentConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/LoginBaseConstants.cs +45 -45
- package/Common/Runtime/Constants/Implementations/LoginBaseConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/MigrationConstants.cs +14 -14
- package/Common/Runtime/Constants/Implementations/MigrationConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/NotificationConstants.cs +18 -18
- package/Common/Runtime/Constants/Implementations/NotificationConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/OtelConstants.cs +2 -2
- package/Common/Runtime/Constants/Implementations/OtelConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/RequesterConstants.cs +90 -90
- package/Common/Runtime/Constants/Implementations/RequesterConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/SchedulesConstants.cs +20 -20
- package/Common/Runtime/Constants/Implementations/SchedulesConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/ServiceConstants.cs +161 -161
- package/Common/Runtime/Constants/Implementations/ServiceConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/SpewConstants.cs +38 -38
- package/Common/Runtime/Constants/Implementations/SpewConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/TestingToolConstants.cs +40 -40
- package/Common/Runtime/Constants/Implementations/TestingToolConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/ToolbarConstants.cs +16 -16
- package/Common/Runtime/Constants/Implementations/ToolbarConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/ToolboxConstants.cs +25 -25
- package/Common/Runtime/Constants/Implementations/ToolboxConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations/TooltipConstants.cs +82 -82
- package/Common/Runtime/Constants/Implementations/TooltipConstants.cs.meta +11 -11
- package/Common/Runtime/Constants/Implementations.meta +11 -11
- package/Common/Runtime/Constants.meta +11 -11
- package/Common/Runtime/Content/ClientContentSerializer.cs +45 -45
- package/Common/Runtime/Content/ClientContentSerializer.cs.meta +11 -11
- package/Common/Runtime/Content/ClientManifest.cs +303 -303
- package/Common/Runtime/Content/ClientManifest.cs.meta +11 -11
- package/Common/Runtime/Content/ClientPermissions.cs +30 -30
- package/Common/Runtime/Content/ClientPermissions.cs.meta +11 -11
- package/Common/Runtime/Content/ContentCorruptedException.cs +15 -15
- package/Common/Runtime/Content/ContentCorruptedException.cs.meta +11 -11
- package/Common/Runtime/Content/ContentDataInfo.cs +147 -147
- package/Common/Runtime/Content/ContentDataInfo.cs.meta +11 -11
- package/Common/Runtime/Content/ContentDeserializationException.cs +14 -14
- package/Common/Runtime/Content/ContentDeserializationException.cs.meta +11 -11
- package/Common/Runtime/Content/ContentFieldAttribute.cs +30 -30
- package/Common/Runtime/Content/ContentFieldAttribute.cs.meta +11 -11
- package/Common/Runtime/Content/ContentFilterType.cs +2 -2
- package/Common/Runtime/Content/ContentFilterType.cs.meta +11 -11
- package/Common/Runtime/Content/ContentNotFoundException.cs +19 -19
- package/Common/Runtime/Content/ContentNotFoundException.cs.meta +11 -11
- package/Common/Runtime/Content/ContentObject.cs +644 -644
- package/Common/Runtime/Content/ContentObject.cs.meta +11 -11
- package/Common/Runtime/Content/ContentQuery.cs +333 -333
- package/Common/Runtime/Content/ContentQuery.cs.meta +11 -11
- package/Common/Runtime/Content/ContentQueryExtensions.cs +42 -42
- package/Common/Runtime/Content/ContentQueryExtensions.cs.meta +11 -11
- package/Common/Runtime/Content/ContentRef.cs +307 -307
- package/Common/Runtime/Content/ContentRef.cs.meta +11 -11
- package/Common/Runtime/Content/ContentSerializer.cs +776 -770
- package/Common/Runtime/Content/ContentSerializer.cs.meta +11 -11
- package/Common/Runtime/Content/ContentTypeAttribute.cs +137 -137
- package/Common/Runtime/Content/ContentTypeAttribute.cs.meta +11 -11
- package/Common/Runtime/Content/ContentTypeReflectionCache.cs +601 -601
- package/Common/Runtime/Content/ContentTypeReflectionCache.cs.meta +11 -11
- package/Common/Runtime/Content/ContentVisibility.cs +24 -24
- package/Common/Runtime/Content/ContentVisibility.cs.meta +11 -11
- package/Common/Runtime/Content/Federation.cs +32 -32
- package/Common/Runtime/Content/Federation.cs.meta +11 -11
- package/Common/Runtime/Content/IContentObject.cs +51 -51
- package/Common/Runtime/Content/IContentObject.cs.meta +11 -11
- package/Common/Runtime/Content/IContentService.cs +20 -20
- package/Common/Runtime/Content/IContentService.cs.meta +11 -11
- package/Common/Runtime/Content/IIgnoreSerializationCallbacks.cs +10 -10
- package/Common/Runtime/Content/IIgnoreSerializationCallbacks.cs.meta +11 -11
- package/Common/Runtime/Content/IgnoreContentFieldAttribute.cs +24 -24
- package/Common/Runtime/Content/IgnoreContentFieldAttribute.cs.meta +11 -11
- package/Common/Runtime/Content/Optionals.cs +582 -582
- package/Common/Runtime/Content/Optionals.cs.meta +11 -11
- package/Common/Runtime/Content/PropertyAttributes/FilePathSelectorAttribute.cs +22 -22
- package/Common/Runtime/Content/PropertyAttributes/FilePathSelectorAttribute.cs.meta +11 -11
- package/Common/Runtime/Content/PropertyAttributes/HideUnlessServerPackageInstalled.cs +14 -14
- package/Common/Runtime/Content/PropertyAttributes/HideUnlessServerPackageInstalled.cs.meta +11 -11
- package/Common/Runtime/Content/PropertyAttributes/ReadonlyIfAttribute.cs +24 -24
- package/Common/Runtime/Content/PropertyAttributes/ReadonlyIfAttribute.cs.meta +11 -11
- package/Common/Runtime/Content/PropertyAttributes/ShowOnlyAttribute.cs +10 -10
- package/Common/Runtime/Content/PropertyAttributes/ShowOnlyAttribute.cs.meta +11 -11
- package/Common/Runtime/Content/PropertyAttributes.meta +11 -11
- package/Common/Runtime/Content/RenderAsRefAttribute.cs +33 -33
- package/Common/Runtime/Content/RenderAsRefAttribute.cs.meta +11 -11
- package/Common/Runtime/Content/SerializableDictionary.cs +183 -183
- package/Common/Runtime/Content/SerializableDictionary.cs.meta +11 -11
- package/Common/Runtime/Content/Utility/DateUtility.cs +120 -120
- package/Common/Runtime/Content/Utility/DateUtility.cs.meta +11 -11
- package/Common/Runtime/Content/Utility.meta +11 -11
- package/Common/Runtime/Content/Validation/AggregateContentValidationException.cs +12 -12
- package/Common/Runtime/Content/Validation/AggregateContentValidationException.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/CannotBeBlank.cs +115 -115
- package/Common/Runtime/Content/Validation/CannotBeBlank.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/CannotBeEmpty.cs +43 -43
- package/Common/Runtime/Content/Validation/CannotBeEmpty.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/ContentValidationException.cs +122 -122
- package/Common/Runtime/Content/Validation/ContentValidationException.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/FederationMustBeValid.cs +58 -58
- package/Common/Runtime/Content/Validation/FederationMustBeValid.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeComparatorString.cs +29 -29
- package/Common/Runtime/Content/Validation/MustBeComparatorString.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeCurrency.cs +25 -25
- package/Common/Runtime/Content/Validation/MustBeCurrency.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeCurrencyOrItem.cs +25 -25
- package/Common/Runtime/Content/Validation/MustBeCurrencyOrItem.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeDateString.cs +85 -85
- package/Common/Runtime/Content/Validation/MustBeDateString.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeItem.cs +25 -25
- package/Common/Runtime/Content/Validation/MustBeItem.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeLeaderboard.cs +26 -26
- package/Common/Runtime/Content/Validation/MustBeLeaderboard.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeNonDefault.cs +30 -30
- package/Common/Runtime/Content/Validation/MustBeNonDefault.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeNonNegative.cs +20 -20
- package/Common/Runtime/Content/Validation/MustBeNonNegative.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeOneOf.cs +64 -64
- package/Common/Runtime/Content/Validation/MustBeOneOf.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBePositive.cs +106 -106
- package/Common/Runtime/Content/Validation/MustBePositive.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeSlugString.cs +86 -86
- package/Common/Runtime/Content/Validation/MustBeSlugString.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeTimeSpanDuration.cs +106 -106
- package/Common/Runtime/Content/Validation/MustBeTimeSpanDuration.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustBeValidCron.cs +2 -2
- package/Common/Runtime/Content/Validation/MustBeValidCron.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustContain.cs +53 -53
- package/Common/Runtime/Content/Validation/MustContain.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/MustReferenceContent.cs +237 -237
- package/Common/Runtime/Content/Validation/MustReferenceContent.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/RouteParametersMustBeValid.cs +51 -51
- package/Common/Runtime/Content/Validation/RouteParametersMustBeValid.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/ServiceRouteMustBeValid.cs +43 -43
- package/Common/Runtime/Content/Validation/ServiceRouteMustBeValid.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/TimeSpanDisplayAttribute.cs +18 -18
- package/Common/Runtime/Content/Validation/TimeSpanDisplayAttribute.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/ValidationAttribute.cs +110 -110
- package/Common/Runtime/Content/Validation/ValidationAttribute.cs.meta +11 -11
- package/Common/Runtime/Content/Validation/ValidationContext.cs +104 -104
- package/Common/Runtime/Content/Validation/ValidationContext.cs.meta +11 -11
- package/Common/Runtime/Content/Validation.meta +11 -11
- package/Common/Runtime/Content.meta +11 -11
- package/Common/Runtime/CronExpression/CronLocale.cs +2 -2
- package/Common/Runtime/CronExpression/CronLocale.cs.meta +11 -11
- package/Common/Runtime/CronExpression/ErrorData.cs +2 -2
- package/Common/Runtime/CronExpression/ErrorData.cs.meta +11 -11
- package/Common/Runtime/CronExpression/ExpressionParser.cs +2 -2
- package/Common/Runtime/CronExpression/ExpressionParser.cs.meta +11 -11
- package/Common/Runtime/CronExpression/Options.cs +2 -2
- package/Common/Runtime/CronExpression/Options.cs.meta +11 -11
- package/Common/Runtime/CronExpression.meta +11 -11
- package/Common/Runtime/Debug.cs +180 -180
- package/Common/Runtime/Debug.cs.meta +11 -11
- package/Common/Runtime/DefaultQuery.cs +248 -248
- package/Common/Runtime/DefaultQuery.cs.meta +11 -11
- package/Common/Runtime/Dependencies/DependencyBuilder.cs +776 -776
- package/Common/Runtime/Dependencies/DependencyBuilder.cs.meta +11 -11
- package/Common/Runtime/Dependencies/DependencyProvider.cs +560 -560
- package/Common/Runtime/Dependencies/DependencyProvider.cs.meta +11 -11
- package/Common/Runtime/Dependencies/Exceptions.cs +21 -21
- package/Common/Runtime/Dependencies/Exceptions.cs.meta +11 -11
- package/Common/Runtime/Dependencies/IDependencyList.cs +23 -23
- package/Common/Runtime/Dependencies/IDependencyList.cs.meta +11 -11
- package/Common/Runtime/Dependencies/IDependencyNameProvider.cs +14 -14
- package/Common/Runtime/Dependencies/IDependencyNameProvider.cs.meta +11 -11
- package/Common/Runtime/Dependencies/RegisterBeamableDependenciesAttribute.cs +74 -74
- package/Common/Runtime/Dependencies/RegisterBeamableDependenciesAttribute.cs.meta +11 -11
- package/Common/Runtime/Dependencies/ServiceStorage.cs +258 -258
- package/Common/Runtime/Dependencies/ServiceStorage.cs.meta +11 -11
- package/Common/Runtime/Dependencies/Utils.cs +49 -49
- package/Common/Runtime/Dependencies/Utils.cs.meta +11 -11
- package/Common/Runtime/Dependencies.meta +11 -11
- package/Common/Runtime/DocUtils.cs +24 -24
- package/Common/Runtime/DocUtils.cs.meta +11 -11
- package/Common/Runtime/Environment/PackageVersion.cs +366 -366
- package/Common/Runtime/Environment/PackageVersion.cs.meta +11 -11
- package/Common/Runtime/Environment.meta +11 -11
- package/Common/Runtime/Federation/FederatedGameServer.cs +2 -2
- package/Common/Runtime/Federation/FederatedGameServer.cs.meta +11 -11
- package/Common/Runtime/Federation/FederatedInventory.cs +2 -2
- package/Common/Runtime/Federation/FederatedInventory.cs.meta +11 -11
- package/Common/Runtime/Federation/FederatedLogin.cs +2 -2
- package/Common/Runtime/Federation/FederatedLogin.cs.meta +11 -11
- package/Common/Runtime/Federation/FederatedPlayerInit.cs +36 -36
- package/Common/Runtime/Federation/FederatedPlayerInit.cs.meta +11 -11
- package/Common/Runtime/Federation/Federation.cs +2 -2
- package/Common/Runtime/Federation/Federation.cs.meta +11 -11
- package/Common/Runtime/Federation.meta +11 -11
- package/Common/Runtime/IRuntimeConfigProvider.cs +74 -74
- package/Common/Runtime/IRuntimeConfigProvider.cs.meta +11 -11
- package/Common/Runtime/ISearchableElement.cs +14 -14
- package/Common/Runtime/ISearchableElement.cs.meta +11 -11
- package/Common/Runtime/JsonSerializable/DeleteStream.cs +438 -438
- package/Common/Runtime/JsonSerializable/DeleteStream.cs.meta +11 -11
- package/Common/Runtime/JsonSerializable/DiffStream.cs +367 -367
- package/Common/Runtime/JsonSerializable/DiffStream.cs.meta +11 -11
- package/Common/Runtime/JsonSerializable/JsonData.cs +102 -102
- package/Common/Runtime/JsonSerializable/JsonData.cs.meta +11 -11
- package/Common/Runtime/JsonSerializable/JsonSaveStream.cs +765 -765
- package/Common/Runtime/JsonSerializable/JsonSaveStream.cs.meta +11 -11
- package/Common/Runtime/JsonSerializable/JsonSerializable.cs +386 -386
- package/Common/Runtime/JsonSerializable/JsonSerializable.cs.meta +11 -11
- package/Common/Runtime/JsonSerializable/LoadStream.cs +1103 -1103
- package/Common/Runtime/JsonSerializable/LoadStream.cs.meta +11 -11
- package/Common/Runtime/JsonSerializable/MessagePackStream.cs +2 -2
- package/Common/Runtime/JsonSerializable/MessagePackStream.cs.meta +11 -11
- package/Common/Runtime/JsonSerializable/SaveStream.cs +419 -419
- package/Common/Runtime/JsonSerializable/SaveStream.cs.meta +11 -11
- package/Common/Runtime/JsonSerializable/TypeLookupFactory.cs +58 -58
- package/Common/Runtime/JsonSerializable/TypeLookupFactory.cs.meta +11 -11
- package/Common/Runtime/JsonSerializable.meta +11 -11
- package/Common/Runtime/Modules/Announcements/AnnouncementApiContent.cs +42 -42
- package/Common/Runtime/Modules/Announcements/AnnouncementApiContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Announcements/AnnouncementContent.cs +120 -120
- package/Common/Runtime/Modules/Announcements/AnnouncementContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Announcements/AnnouncementRef.cs +96 -96
- package/Common/Runtime/Modules/Announcements/AnnouncementRef.cs.meta +11 -11
- package/Common/Runtime/Modules/Announcements.meta +11 -11
- package/Common/Runtime/Modules/Calendars/CalendarContent.cs +41 -41
- package/Common/Runtime/Modules/Calendars/CalendarContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Calendars/CalendarRef.cs +67 -67
- package/Common/Runtime/Modules/Calendars/CalendarRef.cs.meta +11 -11
- package/Common/Runtime/Modules/Calendars.meta +11 -11
- package/Common/Runtime/Modules/Groups/GroupDonationContentRef.cs +76 -76
- package/Common/Runtime/Modules/Groups/GroupDonationContentRef.cs.meta +11 -11
- package/Common/Runtime/Modules/Groups/GroupDonationsContent.cs +39 -39
- package/Common/Runtime/Modules/Groups/GroupDonationsContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Groups.meta +11 -11
- package/Common/Runtime/Modules/Inventory/CurrencyContent.cs +79 -79
- package/Common/Runtime/Modules/Inventory/CurrencyContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Inventory/CurrencyRef.cs +82 -82
- package/Common/Runtime/Modules/Inventory/CurrencyRef.cs.meta +11 -11
- package/Common/Runtime/Modules/Inventory/ItemContent.cs +66 -66
- package/Common/Runtime/Modules/Inventory/ItemContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Inventory/ItemRef.cs +79 -79
- package/Common/Runtime/Modules/Inventory/ItemRef.cs.meta +11 -11
- package/Common/Runtime/Modules/Inventory/VipContent.cs +103 -103
- package/Common/Runtime/Modules/Inventory/VipContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Inventory.meta +11 -11
- package/Common/Runtime/Modules/Leaderboards/LeaderboardContent.cs +67 -67
- package/Common/Runtime/Modules/Leaderboards/LeaderboardContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Leaderboards/LeaderboardRef.cs +77 -77
- package/Common/Runtime/Modules/Leaderboards/LeaderboardRef.cs.meta +11 -11
- package/Common/Runtime/Modules/Leaderboards.meta +11 -11
- package/Common/Runtime/Modules/SharedContent/ApiContent.cs +282 -282
- package/Common/Runtime/Modules/SharedContent/ApiContent.cs.meta +11 -11
- package/Common/Runtime/Modules/SharedContent/EmailContent.cs +104 -104
- package/Common/Runtime/Modules/SharedContent/EmailContent.cs.meta +11 -11
- package/Common/Runtime/Modules/SharedContent/EventContent.cs +273 -273
- package/Common/Runtime/Modules/SharedContent/EventContent.cs.meta +11 -11
- package/Common/Runtime/Modules/SharedContent/PlayerReward.cs +63 -63
- package/Common/Runtime/Modules/SharedContent/PlayerReward.cs.meta +11 -11
- package/Common/Runtime/Modules/SharedContent/ScheduleDefinition.cs +129 -129
- package/Common/Runtime/Modules/SharedContent/ScheduleDefinition.cs.meta +11 -11
- package/Common/Runtime/Modules/SharedContent/ScheduleExtensions.cs +35 -35
- package/Common/Runtime/Modules/SharedContent/ScheduleExtensions.cs.meta +11 -11
- package/Common/Runtime/Modules/SharedContent/SimGameType.cs +300 -300
- package/Common/Runtime/Modules/SharedContent/SimGameType.cs.meta +11 -11
- package/Common/Runtime/Modules/SharedContent.meta +11 -11
- package/Common/Runtime/Modules/Shop/ListingContent.cs +329 -329
- package/Common/Runtime/Modules/Shop/ListingContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Shop/ListingLink.cs +23 -23
- package/Common/Runtime/Modules/Shop/ListingLink.cs.meta +11 -11
- package/Common/Runtime/Modules/Shop/ListingRef.cs +33 -33
- package/Common/Runtime/Modules/Shop/ListingRef.cs.meta +11 -11
- package/Common/Runtime/Modules/Shop/SKUContent.cs +105 -105
- package/Common/Runtime/Modules/Shop/SKUContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Shop/SKURef.cs +49 -49
- package/Common/Runtime/Modules/Shop/SKURef.cs.meta +11 -11
- package/Common/Runtime/Modules/Shop/StoreContent.cs +47 -47
- package/Common/Runtime/Modules/Shop/StoreContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Shop/StoreRef.cs +50 -50
- package/Common/Runtime/Modules/Shop/StoreRef.cs.meta +11 -11
- package/Common/Runtime/Modules/Shop.meta +11 -11
- package/Common/Runtime/Modules/Steam/ISteamService.cs +68 -68
- package/Common/Runtime/Modules/Steam/ISteamService.cs.meta +11 -11
- package/Common/Runtime/Modules/Steam.meta +11 -11
- package/Common/Runtime/Modules/Tournaments/TournamentColorConstants.cs +20 -20
- package/Common/Runtime/Modules/Tournaments/TournamentColorConstants.cs.meta +11 -11
- package/Common/Runtime/Modules/Tournaments/TournamentContent.cs +317 -317
- package/Common/Runtime/Modules/Tournaments/TournamentContent.cs.meta +11 -11
- package/Common/Runtime/Modules/Tournaments.meta +11 -11
- package/Common/Runtime/ObjectExtensions.cs +50 -50
- package/Common/Runtime/ObjectExtensions.cs.meta +11 -11
- package/Common/Runtime/OpenApi/AccountsBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/AccountsBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/AccountsBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/AccountsBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/AccountsObject.gs.cs +2 -2
- package/Common/Runtime/OpenApi/AccountsObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/AnnouncementsBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/AnnouncementsBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/AnnouncementsBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/AnnouncementsBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/AnnouncementsObject.gs.cs +2 -2
- package/Common/Runtime/OpenApi/AnnouncementsObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/AuthBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/AuthBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/AuthBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/AuthBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamAdmin.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamAdmin.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamAdminCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamAdminCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamAuth.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamAuth.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamAuthCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamAuthCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamBeamo.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamBeamo.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamBeamoCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamBeamoCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamBeamootel.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamBeamootel.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamBeamootelCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamBeamootelCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamCustomer.gs.cs +157 -85
- package/Common/Runtime/OpenApi/BeamCustomer.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamCustomerCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamCustomerCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamLobby.gs.cs +320 -318
- package/Common/Runtime/OpenApi/BeamLobby.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamLobbyCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamLobbyCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamMailbox.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamMailbox.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamMailboxCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamMailboxCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamMatchmaking.gs.cs +169 -169
- package/Common/Runtime/OpenApi/BeamMatchmaking.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamMatchmakingCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamMatchmakingCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamParty.gs.cs +270 -219
- package/Common/Runtime/OpenApi/BeamParty.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamPartyCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamPartyCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamPlayer.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamPlayer.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamPlayerCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamPlayerCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamPlayerlobby.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamPlayerlobby.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamPlayerlobbyCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamPlayerlobbyCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamPlayerparty.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamPlayerparty.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamPlayerpartyCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamPlayerpartyCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamPlayerticket.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamPlayerticket.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamPlayerticketCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamPlayerticketCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamPresence.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamPresence.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamPresenceCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamPresenceCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamScheduler.gs.cs +6 -6
- package/Common/Runtime/OpenApi/BeamScheduler.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamSchedulerCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamSchedulerCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamServiceplan.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamServiceplan.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamServiceplanCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamServiceplanCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamoBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamoBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/BeamoBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/BeamoBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/CalendarsObject.gs.cs +2 -2
- package/Common/Runtime/OpenApi/CalendarsObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/CalendarsObjectCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/CalendarsObjectCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/CloudsavingBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/CloudsavingBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/CloudsavingBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/CloudsavingBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/CommerceBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/CommerceBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/CommerceBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/CommerceBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/CommerceObject.gs.cs +7 -7
- package/Common/Runtime/OpenApi/CommerceObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/ContentBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/ContentBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/ContentBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/ContentBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/Event-playersObject.gs.cs +2 -2
- package/Common/Runtime/OpenApi/Event-playersObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/Event-playersObjectCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/Event-playersObjectCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/EventsBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/EventsBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/EventsBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/EventsBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/EventsObject.gs.cs +2 -2
- package/Common/Runtime/OpenApi/EventsObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/Group-usersObject.gs.cs +2 -2
- package/Common/Runtime/OpenApi/Group-usersObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/Group-usersObjectCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/Group-usersObjectCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/GroupsObject.gs.cs +2 -2
- package/Common/Runtime/OpenApi/GroupsObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/GroupsObjectCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/GroupsObjectCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/InventoryBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/InventoryBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/InventoryBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/InventoryBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/InventoryObject.gs.cs +7 -7
- package/Common/Runtime/OpenApi/InventoryObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/LeaderboardsBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/LeaderboardsBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/LeaderboardsBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/LeaderboardsBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/LeaderboardsObject.gs.cs +54 -34
- package/Common/Runtime/OpenApi/LeaderboardsObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/MailBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/MailBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/MailBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/MailBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/MailObject.gs.cs +2 -2
- package/Common/Runtime/OpenApi/MailObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/Models.gs.cs +366 -187
- package/Common/Runtime/OpenApi/Models.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/NotificationBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/NotificationBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/NotificationBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/NotificationBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/PaymentsBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/PaymentsBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/PaymentsBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/PaymentsBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/PaymentsObject.gs.cs +4 -4
- package/Common/Runtime/OpenApi/PaymentsObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/PushBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/PushBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/PushBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/PushBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/RealmsBasic.gs.cs +6 -6
- package/Common/Runtime/OpenApi/RealmsBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/RealmsBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/RealmsBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/SessionBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/SessionBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/SessionBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/SessionBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/SocialBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/SocialBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/SocialBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/SocialBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/StatsBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/StatsBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/StatsBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/StatsBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/StatsObject.gs.cs +2 -2
- package/Common/Runtime/OpenApi/StatsObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/TournamentsBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/TournamentsBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/TournamentsBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/TournamentsBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/TournamentsObject.gs.cs +2 -2
- package/Common/Runtime/OpenApi/TournamentsObject.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/TrialsBasic.gs.cs +2 -2
- package/Common/Runtime/OpenApi/TrialsBasic.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi/TrialsBasicCommon.gs.cs +2 -2
- package/Common/Runtime/OpenApi/TrialsBasicCommon.gs.cs.meta +11 -11
- package/Common/Runtime/OpenApi.meta +11 -11
- package/Common/Runtime/OpenApiExtensions/BeamoExtensions.cs +48 -48
- package/Common/Runtime/OpenApiExtensions/BeamoExtensions.cs.meta +11 -11
- package/Common/Runtime/OpenApiExtensions/LegacyConverterExtensions.cs +2 -2
- package/Common/Runtime/OpenApiExtensions/LegacyConverterExtensions.cs.meta +11 -11
- package/Common/Runtime/OpenApiExtensions.meta +11 -11
- package/Common/Runtime/OpenApiSystem.cs +236 -236
- package/Common/Runtime/OpenApiSystem.cs.meta +11 -11
- package/Common/Runtime/Player/Lazy.cs +26 -26
- package/Common/Runtime/Player/Lazy.cs.meta +11 -11
- package/Common/Runtime/Player/Observables.cs +449 -449
- package/Common/Runtime/Player/Observables.cs.meta +11 -11
- package/Common/Runtime/Player.meta +11 -11
- package/Common/Runtime/Pooling/ClassPool.cs +142 -142
- package/Common/Runtime/Pooling/ClassPool.cs.meta +11 -11
- package/Common/Runtime/Pooling/StringBuilderPool.cs +171 -171
- package/Common/Runtime/Pooling/StringBuilderPool.cs.meta +11 -11
- package/Common/Runtime/Pooling.meta +11 -11
- package/Common/Runtime/Promise.cs +1329 -1329
- package/Common/Runtime/Promise.cs.meta +11 -11
- package/Common/Runtime/ReflectionCache/BeamContextSystemAttribute.cs +11 -11
- package/Common/Runtime/ReflectionCache/BeamContextSystemAttribute.cs.meta +11 -11
- package/Common/Runtime/ReflectionCache/INamingAttribute.cs +143 -143
- package/Common/Runtime/ReflectionCache/INamingAttribute.cs.meta +11 -11
- package/Common/Runtime/ReflectionCache/IReflectionAttribute.cs +154 -154
- package/Common/Runtime/ReflectionCache/IReflectionAttribute.cs.meta +11 -11
- package/Common/Runtime/ReflectionCache/PreserveAttribute.cs +22 -22
- package/Common/Runtime/ReflectionCache/PreserveAttribute.cs.meta +11 -11
- package/Common/Runtime/ReflectionCache/ReflectionCache.cs +457 -457
- package/Common/Runtime/ReflectionCache/ReflectionCache.cs.meta +11 -11
- package/Common/Runtime/ReflectionCache/ReflectionCache_Attributes.cs +289 -289
- package/Common/Runtime/ReflectionCache/ReflectionCache_Attributes.cs.meta +11 -11
- package/Common/Runtime/ReflectionCache/ReflectionCache_BaseTypes.cs +111 -111
- package/Common/Runtime/ReflectionCache/ReflectionCache_BaseTypes.cs.meta +11 -11
- package/Common/Runtime/ReflectionCache/ReflectionCache_SignatureMatching.cs +247 -247
- package/Common/Runtime/ReflectionCache/ReflectionCache_SignatureMatching.cs.meta +11 -11
- package/Common/Runtime/ReflectionCache.meta +11 -11
- package/Common/Runtime/Scheduler/BeamScheduler.cs +962 -962
- package/Common/Runtime/Scheduler/BeamScheduler.cs.meta +11 -11
- package/Common/Runtime/Scheduler/Cron.cs +557 -557
- package/Common/Runtime/Scheduler/Cron.cs.meta +11 -11
- package/Common/Runtime/Scheduler/CronValidation.cs +63 -63
- package/Common/Runtime/Scheduler/CronValidation.cs.meta +11 -11
- package/Common/Runtime/Scheduler.meta +11 -11
- package/Common/Runtime/Semantics/ServiceName.cs +38 -38
- package/Common/Runtime/Semantics/ServiceName.cs.meta +11 -11
- package/Common/Runtime/Semantics.meta +11 -11
- package/Common/Runtime/SmallerJSON/IRawJsonProvider.cs +41 -41
- package/Common/Runtime/SmallerJSON/IRawJsonProvider.cs.meta +11 -11
- package/Common/Runtime/SmallerJSON/SmallerJSON.ArrayDict.cs +479 -479
- package/Common/Runtime/SmallerJSON/SmallerJSON.ArrayDict.cs.meta +11 -11
- package/Common/Runtime/SmallerJSON/SmallerJSON.FromString.cs +627 -627
- package/Common/Runtime/SmallerJSON/SmallerJSON.FromString.cs.meta +11 -11
- package/Common/Runtime/SmallerJSON/SmallerJSON.cs +1056 -1056
- package/Common/Runtime/SmallerJSON/SmallerJSON.cs.meta +11 -11
- package/Common/Runtime/SmallerJSON.meta +11 -11
- package/Common/Runtime/Spew/Logger.cs +418 -418
- package/Common/Runtime/Spew/Logger.cs.meta +11 -11
- package/Common/Runtime/Spew/SpewLoggerAttribute.cs +14 -14
- package/Common/Runtime/Spew/SpewLoggerAttribute.cs.meta +11 -11
- package/Common/Runtime/Spew.meta +11 -11
- package/Common/Runtime/Trie.cs +463 -463
- package/Common/Runtime/Trie.cs.meta +11 -11
- package/Common/Runtime/TypeExtensions.cs +66 -66
- package/Common/Runtime/TypeExtensions.cs.meta +11 -11
- package/Common/Runtime/Util/BeamAssemblyVersionUtil.cs +52 -52
- package/Common/Runtime/Util/BeamAssemblyVersionUtil.cs.meta +11 -11
- package/Common/Runtime/Util/BeamFileUtil.cs +27 -27
- package/Common/Runtime/Util/BeamFileUtil.cs.meta +11 -11
- package/Common/Runtime/Util/DocsPageHelper.cs +2 -2
- package/Common/Runtime/Util/DocsPageHelper.cs.meta +11 -11
- package/Common/Runtime/Util/NaturalStringComparer.cs +2 -2
- package/Common/Runtime/Util/NaturalStringComparer.cs.meta +11 -11
- package/Common/Runtime/Util.meta +11 -11
- package/Common/Runtime.meta +11 -11
- package/Editor/3rdParty/Splitter/SplitterGUILayout2.cs +194 -194
- package/Editor/BeamCli/BeamCli.cs +449 -417
- package/Editor/BeamCli/BeamCliUtil.cs +254 -254
- package/Editor/BeamCli/BeamCommand.cs +555 -552
- package/Editor/BeamCli/BeamWebCommand.cs +534 -534
- package/Editor/BeamCli/BeamWebHistory.cs +267 -267
- package/Editor/BeamCli/CliSpewLogger.cs +17 -17
- package/Editor/BeamCli/Commands/Beam.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamAccountMeCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamAccountMeExternalIdentity.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamBuildProjectCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamBuildSolutionCommandResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCheckFixedResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCheckGrafanaCommandResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCheckPerfCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCheckRegistryCommandResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCheckResultsForBeamoId.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCheckStatusServiceResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamChecksScan.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamClearTempLogFilesCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCliServiceComponent.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCliServiceDependency.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCliServiceManifest.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCliServiceReference.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCliServiceStorageReference.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCollectorStatusResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamConfig.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamConfigCommandResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamConfigRealm.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamConfigRealmRemove.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamConfigRealmSet.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamConfigRoutes.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamConfigRoutesCommandResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamConfigRoutesCommandWebsocketResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamConstructVersionOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentArchiveManifest.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentArchiveManifestCommandResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentCreateLocalManifestCommandResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentListManifests.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentListManifestsCommandResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentNewManifest.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentProgressUpdateData.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentPs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentPsCommandEvent.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentPsProgressMessage.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentPublish.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentPublishResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentResolve.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentResolveConflictResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentRestore.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentRestoreErrorReport.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentRestoreResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentSave.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentSnapshot.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentSnapshotList.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentSnapshotListItem.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentSnapshotListResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentSnapshotResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentSync.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentSyncReport.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentSyncResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentTagAdd.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentTagRm.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamContentTagSet.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamCopyProjectSrcToUnityCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeleteProjectCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDependencyData.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeployMode.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeployablePlan.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeploymentDiffSummary.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeploymentGet.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeploymentList.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeploymentManifestJsonDiff.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeploymentPlan.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeploymentPlanMetadata.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeploymentRegistry.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeploymentRelease.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeploymentStatus.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeveloperUserData.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeveloperUserManagerCleanCapturedUserBuffer.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeveloperUserManagerCreateUser.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeveloperUserManagerCreateUserBatch.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeveloperUserManagerPs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeveloperUserManagerRemoveUser.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeveloperUserManagerSaveUser.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeveloperUserManagerUpdateInfo.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeveloperUserPsCommandEvent.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDeveloperUserResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDisableFederationCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDockerServiceDescriptor.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDockerStatusCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDownloadAllNugetDepsToUnityCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDownloadCollectorCommandResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamDownloadNugetDepToUnityCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamEraseStorageObjectCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamFederationDisable.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamFederationEnable.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamFederationEntry.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamFederationList.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamFederationLocalKey.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamFederationLocalSettingsGetIFederatedGameServer.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamFederationLocalSettingsSetIFederatedGameServer.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamFetchCommandLogRecord.cs +1 -0
- package/Editor/BeamCli/Commands/BeamFetchCommandLogRecord.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamFetchTelemetryLogsResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGameListCommandResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGenerateClientFileEvent.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGenerateClientOapiCommandArgsResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGenerateMkDocsCommandResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGenerateOApiCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGenerateWebClientCommandArgsResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetBeamOtelConfigCommandResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetClickhouseCredentialsResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetDeploymentCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetLocalRoutingKeyCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetLogsUrlHeader.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetSignedUrlResponse.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetTokenDetailsCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetTokenForGuestCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetTokenListCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetTokenListElement.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetTokenViaRefreshCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGetUnityVersionInfoCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGrafanaOpen.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGrafanaPs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamGrafanaStop.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamHostServiceDescriptor.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamInit.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamInitCommandResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamInvalidCidError.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamInvalidTokenError.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamInvalidTokenErrorOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamListCommandResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamListDeploymentsCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamListDepsCommandResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamListServicesCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamListenPlayer.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamListenServer.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamLogin.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamLoginFailedError.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamLoginResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamLogout.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamLogoutCommandResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamManifestChecksum.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamManifestChecksums.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamManifestServiceEntry.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamManifestSnapshotItem.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamManifestStorageEntry.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamMe.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamMkdocs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamNoTokenError.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamNotificationPlayerOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamNotificationServerOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamOapiDownload.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamOrgGames.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamOrgRealmData.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamOrgRealms.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamPlanReleaseProgress.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProfileCheckCounters.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProfileCheckNbomber.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectAddPaths.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectAddUnityProject.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectBuild.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectBuildSln.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectDeps.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectDepsAdd.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectDepsList.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectDepsRemove.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectDisable.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectEnable.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectErrorReport.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectErrorResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectGenerateClient.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectGenerateClientOapi.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectGenerateEnv.cs +7 -0
- package/Editor/BeamCli/Commands/BeamProjectGenerateEnv.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectGenerateProperties.cs +2 -2
- package/Editor/BeamCli/Commands/BeamProjectGenerateProperties.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectGenerateWebClient.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectList.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectLogs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectNewCommonLib.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectNewService.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectNewStorage.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectOapi.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectOpen.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectOpenMongo.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectOpenSwagger.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectPs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectReadSettings.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectRegenerate.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectRemoteLogs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectRemove.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectRun.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectSettingsOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectStop.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectStorageErase.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectStorageRestore.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectStorageSnapshot.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamProjectWriteSetting.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamReadProjectSettingsCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRealmConfigOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRealmRole.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRealmsListCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamReleaseSharedUnityCodeCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRemoteServiceDescriptor.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRemoteStorageDescriptor.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamReportTelemetryResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRequestCliCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRequiredFileEdit.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRestoreProjectCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRestoreStorageObjectCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRunFailErrorOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRunProjectBuildErrorStream.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamRunProjectResultStream.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamSaveProjectPathsCommandResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServeCliCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServerClear.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServerDescriptor.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServerKillCommandResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServerPs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServerPsCommandResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServerReq.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServerServe.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceDependenciesPair.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceDeployReportResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceFederationChange.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceFederations.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceImageIdChange.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceInstance.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceListResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceLogProviderChange.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceManifestOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceRemoteDeployProgressResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceRunProgressResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceRunReportResult.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceStatus.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServiceTemplate.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesBuild.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesBuildCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesBuiltProgress.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesDeploy.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesDockerStart.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesDockerStatus.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesForRouteCollection.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesGetConnectionString.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesGetConnectionStringCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesManifests.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesPromote.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesPs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesRegistry.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesRegistryOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesResetContainer.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesResetContainerCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesResetImage.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesResetImageCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesRun.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesServiceLogs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesServiceMetrics.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesStop.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesTemplates.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesTemplatesCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesUpdateDockerfile.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesUploadApi.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamServicesUploadApiOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamSetBeamOtelConfigCommandResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamSetEnabledCommandArgsOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamSetEnabledCommandComponent.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamSettingOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamShowCurrentBeamoStatusCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamShowManifestCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamSnapshotStorageObjectCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamStartDockerCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamStartGrafanaCommandResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamStopProjectCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTailLogMessageForClient.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTelemetryCollector.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTelemetryCollectorGet.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTelemetryCollectorPs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTelemetryConfig.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTelemetryGetCreds.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTelemetryLogs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTelemetryPrune.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTelemetryPush.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTelemetryReport.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTelemetrySetConfig.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTempClearLogs.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTokenFromRefresh.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTokenInspect.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTokenList.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamTokenNewGuest.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamUnityAssemblyReferenceData.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamUnityCopyDotnetSrc.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamUnityDownloadAllNugetPackages.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamUnityDownloadNugetPackage.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamUnityGetVersionInfo.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamUnityManifest.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamUnityReleaseSharedCode.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamUnityRestore.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamUnityUpdateDlls.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamUnityUpdateReferences.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamVersion.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamVersionConstruct.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamVersionResults.cs.meta +11 -11
- package/Editor/BeamCli/Commands/BeamWriteProjectSettingsCommandOutput.cs.meta +11 -11
- package/Editor/BeamCli/Extensions/BeamManifestServiceEntry_ComputedTypes.cs +53 -53
- package/Editor/BeamCli/Extensions/BeamManifestStorageEntry_ComputedTypes.cs +10 -10
- package/Editor/BeamCli/Extensions/DiscoveryExtensions.cs +57 -41
- package/Editor/BeamCli/Extensions/FederationsConfig.cs +22 -22
- package/Editor/BeamCli/UI/BeamCliJsonPopup.cs +29 -29
- package/Editor/BeamCli/UI/BeamCliTextPopup.cs +32 -32
- package/Editor/BeamCli/UI/BeamCliWindow.cs +174 -174
- package/Editor/BeamCli/UI/BeamCliWindow_Commands.cs +539 -512
- package/Editor/BeamCli/UI/BeamCliWindow_Overrides.cs +117 -117
- package/Editor/BeamCli/UI/BeamCliWindow_Server.cs +156 -156
- package/Editor/BeamCli/UI/BeamCliWindow_Terminal.cs +207 -207
- package/Editor/BeamCli/UI/BeamCliWindow_Util.cs +336 -336
- package/Editor/BeamCli/UI/JsonHighlighterUtil.cs +143 -143
- package/Editor/BeamCli/UI/LogUtil/LogViewUtil.cs +727 -727
- package/Editor/BeamCli/UI/TimeDisplayUtil.cs +22 -22
- package/Editor/BeamEditor.cs +733 -733
- package/Editor/BeamableLinker.cs +77 -77
- package/Editor/BuildPostProcessor.cs +44 -44
- package/Editor/BuildPreProcessor.cs +264 -264
- package/Editor/ContentService/CliContentService.cs +49 -18
- package/Editor/Dotnet/DotnetService.cs +193 -193
- package/Editor/Dotnet/DotnetUtil.cs +296 -296
- package/Editor/EditorAPI.cs +4 -4
- package/Editor/EditorPlatformRequesterErrorHandler.cs +28 -28
- package/Editor/EditorRuntimeConfigProvider.cs +19 -19
- package/Editor/EditorStorageLayer.cs +40 -40
- package/Editor/Eggs/EggEntry.cs +38 -38
- package/Editor/Eggs/Serpent/EggSerpent.cs +209 -209
- package/Editor/Environment/BeamableDiagnosticData.cs +198 -198
- package/Editor/Environment/BeamableEditorWebRequester.cs +62 -62
- package/Editor/Environment/BeamablePackages.cs +90 -90
- package/Editor/Environment/IEditorHttpRequester.cs +49 -49
- package/Editor/FileAssetModificationProcessor.cs +49 -49
- package/Editor/LibraryService.cs +297 -297
- package/Editor/Modules/Account/BeamableSocialsImporter.cs +59 -59
- package/Editor/Modules/Account/EditorAuthService.cs +244 -244
- package/Editor/Modules/Account/PortalCommand.cs +37 -37
- package/Editor/Modules/Content/CalendarWindow.cs +185 -185
- package/Editor/Modules/Content/ContentObjectPropertyDrawer.cs +26 -26
- package/Editor/Modules/Content/ContentPropertyDrawer.cs +372 -372
- package/Editor/Modules/Content/ContentValidationPropertyDrawer.cs +307 -307
- package/Editor/Modules/Content/DatePropertyDrawer.cs +355 -355
- package/Editor/Modules/Content/OptionalPropertyDrawer.cs +80 -80
- package/Editor/Modules/Content/PropertyDrawerHelper.cs +44 -44
- package/Editor/Modules/Content/ScheduleDefinitionPropertyDrawer.cs +554 -554
- package/Editor/Modules/Content/SerializedContentObject.cs +12 -12
- package/Editor/Modules/Content/UI/ContentObjectEditor.cs +395 -390
- package/Editor/Modules/Content/UI/DisplayableListPropertyDrawer.cs +47 -47
- package/Editor/Modules/Content/UI/EditorValidationContext.cs +7 -7
- package/Editor/Modules/Content/UI/SerializedDictionaryEditor.cs +208 -208
- package/Editor/Modules/ContentTypes/ContentTypesCreator.cs +58 -58
- package/Editor/Modules/EditorConfig/EditorConfiguration.cs +209 -209
- package/Editor/Modules/Input/InputActionPropertyDrawer.cs +138 -138
- package/Editor/Modules/Player/ObservableReadonlyListPropertyDrawer.cs +21 -21
- package/Editor/Modules/Purchasing/BeamablePurchaserImporter.cs +74 -74
- package/Editor/Modules/Sessions/DeviceOptionPropertyDrawer.cs +56 -56
- package/Editor/Modules/Sessions/SessionParameterProviderCreator.cs +111 -111
- package/Editor/Modules/Sessions/SessionParameterProviderEditor.cs +25 -25
- package/Editor/Modules/Stats/StatEditor.cs +18 -18
- package/Editor/Modules/Theme/ButtonStyleObject.cs +9 -9
- package/Editor/Modules/Theme/CanHideDrawer.cs +34 -34
- package/Editor/Modules/Theme/ColorStyleObject.cs +9 -9
- package/Editor/Modules/Theme/FilterSelection.cs +41 -41
- package/Editor/Modules/Theme/FontStyleObject.cs +9 -9
- package/Editor/Modules/Theme/GradientStyleObject.cs +9 -9
- package/Editor/Modules/Theme/ImageStyleObject.cs +9 -9
- package/Editor/Modules/Theme/LayoutStyleObject.cs +9 -9
- package/Editor/Modules/Theme/PaletteStyleObject.cs +30 -30
- package/Editor/Modules/Theme/SelectableStyleObject.cs +9 -9
- package/Editor/Modules/Theme/SoundStyleObject.cs +9 -9
- package/Editor/Modules/Theme/StringStyleObject.cs +9 -9
- package/Editor/Modules/Theme/Style/ButtonStyleObjectPropertyDrawer.cs +61 -61
- package/Editor/Modules/Theme/Style/GeneralPaletteBindingOptionDrawer.cs +25 -25
- package/Editor/Modules/Theme/Style/ThemeSelectorEditor.cs +79 -79
- package/Editor/Modules/Theme/TextStyleObject.cs +9 -9
- package/Editor/Modules/Theme/ThemeConfigurationPropertyDrawer.cs +64 -64
- package/Editor/Modules/Theme/TransformStyleObject.cs +9 -9
- package/Editor/Modules/Theme/WindowStyleObject.cs +9 -9
- package/Editor/NoOpAnalyticsTracker.cs +22 -22
- package/Editor/ReflectionCache/ReflectionCacheAssetPostProcessor.cs +68 -68
- package/Editor/ResetPlayerAccessTokenEditor.cs +63 -63
- package/Editor/Server/AssemblyDefinitionHelper.cs +237 -237
- package/Editor/Server/CommonAreaService.cs +198 -189
- package/Editor/Server/DependencyResolver.cs +177 -177
- package/Editor/Server/ExtensionMethods.cs +40 -40
- package/Editor/Server/MicroserviceConfiguration.cs +87 -87
- package/Editor/Server/RegisterDependencies.cs +33 -33
- package/Editor/Server/UI/Configs/BeamFederationSetting.cs +160 -160
- package/Editor/Server/UI/Configs/BeamStorageDependencySetting.cs +55 -55
- package/Editor/Server/UI/Configs/BeamableMicroservicesSettings.cs +180 -180
- package/Editor/Server/UI/Configs/BeamableStorageSettings.cs +83 -83
- package/Editor/Server/UI/FederationPropertyDrawer.cs +209 -209
- package/Editor/Server/UI/PublishWindow/UsamPublishWindow.cs +442 -442
- package/Editor/Server/UI/PublishWindow/UsamPublishWindow_FatalError.cs +39 -39
- package/Editor/Server/UI/PublishWindow/UsamPublishWindow_Plan.cs +125 -125
- package/Editor/Server/UI/PublishWindow/UsamPublishWindow_Review.cs +247 -247
- package/Editor/Server/UI/UsamWindow/ServicePickerWindow.cs +308 -308
- package/Editor/Server/UI/UsamWindow/UsamWindow.cs +94 -94
- package/Editor/Server/UI/UsamWindow/UsamWindow_Badges.cs +55 -55
- package/Editor/Server/UI/UsamWindow/UsamWindow_Create.cs +325 -325
- package/Editor/Server/UI/UsamWindow/UsamWindow_Docker.cs +111 -111
- package/Editor/Server/UI/UsamWindow/UsamWindow_Main.cs +321 -321
- package/Editor/Server/UI/UsamWindow/UsamWindow_Service.cs +313 -313
- package/Editor/Server/UI/UsamWindow/UsamWindow_Settings.cs +405 -405
- package/Editor/Server/UI/UsamWindow/UsamWindow_Storage.cs +237 -237
- package/Editor/Server/Usam/AssemblyUtil.cs +136 -136
- package/Editor/Server/Usam/CsProjUtil.cs +12 -12
- package/Editor/Server/Usam/CsharpProjectUtil.cs +325 -325
- package/Editor/Server/Usam/ServiceRoutingStrategy.cs +81 -81
- package/Editor/Server/Usam/UsamLogger.cs +46 -46
- package/Editor/Server/Usam/UsamService.cs +1152 -1150
- package/Editor/Server/Usam/UsamService_GenerateClient.cs +243 -243
- package/Editor/Server/Usam/UsamService_Reload.cs +119 -119
- package/Editor/Server/WebhookContentEditor/RouteParametersPropertyDrawer.cs +309 -309
- package/Editor/Server/WebhookContentEditor/RouteVariablesPropertyDrawer.cs +56 -56
- package/Editor/Server/WebhookContentEditor/ServiceRoutePropertyDrawer.cs +137 -137
- package/Editor/ServiceStorage.cs +128 -128
- package/Editor/SessionStorageLayer.cs +29 -29
- package/Editor/TextMeshProImporter.cs +101 -101
- package/Editor/Toolbar/BeamableToolbarAssetPostProcessor.cs +32 -32
- package/Editor/Toolbar/BeamableToolbarButton.cs +45 -45
- package/Editor/Toolbar/BeamableToolbarCallbacks.cs +153 -153
- package/Editor/Toolbar/BeamableToolbarExtender.cs +137 -137
- package/Editor/Toolbar/BeamableToolbarMenuItem.cs +40 -40
- package/Editor/Toolbar/MenuItems/AccountMenuItem.cs +51 -51
- package/Editor/Toolbar/MenuItems/BeamableConfigurationManagerMenuItem.cs +21 -21
- package/Editor/Toolbar/MenuItems/BeamableContentManagerMenuItem.cs +20 -20
- package/Editor/Toolbar/MenuItems/BeamableMicroserviceManagerMenuItem.cs +20 -20
- package/Editor/Toolbar/MenuItems/BeamablePortalMenuItem.cs +18 -18
- package/Editor/Toolbar/MenuItems/BeamableRealmMenuItem.cs +100 -100
- package/Editor/Toolbar/MenuItems/BeamableToolbarMenuItemSeparator.cs +17 -17
- package/Editor/Toolbar/MenuItems/BeamableToolboxWindowMenuItem.cs +20 -20
- package/Editor/Toolbar/ToolbarButtons/SampleBeamableButton.cs +27 -27
- package/Editor/UI/AccountWindow/AccountWindow.cs +3 -2
- package/Editor/UI/BeamEditorWindow.cs +393 -393
- package/Editor/UI/BeamGUI/BeamGUI_Dropdowns.cs +205 -205
- package/Editor/UI/BeamGUI/BeamGUI_Enabled.cs +31 -31
- package/Editor/UI/BeamGUI/BeamGUI_Header.cs +148 -148
- package/Editor/UI/BeamGUI/BeamGUI_Icons.cs +330 -330
- package/Editor/UI/BeamGUI/BeamGUI_LoadingBars.cs +105 -105
- package/Editor/UI/BeamGUI/BeamGUI_PlaceholdTextField.cs +64 -64
- package/Editor/UI/BeamGUI/BeamGUI_PrimaryButton.cs +178 -178
- package/Editor/UI/BeamGUI/BeamGUI_Spinner.cs +30 -30
- package/Editor/UI/BeamGUI/BeamGUI_StaticConstructor.cs +17 -17
- package/Editor/UI/BeamGUI/BeamGUI_Toggle.cs +41 -41
- package/Editor/UI/BeamGUI/PropertyDrawers/HelpBoxDecoratorDrawer.cs +32 -32
- package/Editor/UI/Common/FormConstraint.cs +53 -53
- package/Editor/UI/Common/MediaQueryObjectPropertyDrawer.cs +42 -42
- package/Editor/UI/Common/ReparenterCustomEditor.cs +24 -24
- package/Editor/UI/Config/BeamableSettingsProvider.cs +222 -222
- package/Editor/UI/Config/BeamableSpewSettingsProvider.cs +163 -163
- package/Editor/UI/Config/ConfigManager.cs +207 -207
- package/Editor/UI/Config/Model/ConfigOption.cs +26 -26
- package/Editor/UI/Config/Model/ConfigQuery.cs +114 -114
- package/Editor/UI/ContentWindow/ContentWindow.cs +6 -2
- package/Editor/UI/ContentWindow/ContentWindow_ItemsPanel.cs +24 -19
- package/Editor/UI/ContentWindow/ContentWindow_SnapshotManager.cs +2 -2
- package/Editor/UI/CronExpression/Common/Extensions.cs +23 -23
- package/Editor/UI/CronExpression/DescriptionTypeEnum.cs +18 -18
- package/Editor/UI/CronExpression/ExpressionDescriptor.cs +761 -761
- package/Editor/UI/CronExpression/Localization/CronLocalizationData.cs +77 -77
- package/Editor/UI/CronExpression/Localization/CronLocalizationDatabase.cs +15 -15
- package/Editor/UI/HelpMenuItems.cs +29 -29
- package/Editor/UI/IDelayedActionWindow.cs +10 -10
- package/Editor/UI/LibraryWindow/BeamLibraryWindow.cs +71 -71
- package/Editor/UI/LibraryWindow/BeamLibraryWindow_Main.cs +35 -35
- package/Editor/UI/LibraryWindow/BeamLibraryWindow_Samples.cs +330 -330
- package/Editor/UI/Toolbox/ToolboxWindow.cs +19 -19
- package/Editor/Utility/BeamableAssetDatabase.cs +30 -30
- package/Editor/Utility/BeamableDispatcher.cs +222 -222
- package/Editor/Utility/EditorDebouncer.cs +78 -78
- package/Editor/Utility/EditorFilesystemAccessor.cs +13 -13
- package/Editor/Utility/EditorGUIExtension.cs +148 -148
- package/Editor/Utility/EditorGUIRectController.cs +72 -72
- package/Editor/Utility/FilePathSelectorDrawer.cs +81 -81
- package/Editor/Utility/FileUtils.cs +76 -76
- package/Editor/Utility/PlayerSettingsExtensions.cs +54 -54
- package/Editor/Utility/PromiseEditor.cs +22 -22
- package/Editor/Utility/PropertyDrawerFinder.cs +235 -235
- package/Editor/Utility/ReadonlyIfDrawer.cs +56 -56
- package/Editor/Utility/ShowOnlyDrawer.cs +36 -36
- package/Editor/Utility/TaskUtil.cs +58 -58
- package/Editor/Utility/UnityOtelManager.cs +8 -4
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/BuildRequests.cs +961 -961
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/CoroutineClass.cs +1396 -1396
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/ExceptionHandlers.cs +295 -295
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/Helpers.cs +1337 -1337
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/IPubnubUnitTest.cs +31 -31
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/JSONSerializer.cs +62 -62
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/LoggingMethod.cs +661 -661
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/MD5.cs +723 -723
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/Pubnub.cs +1164 -1164
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/PubnubCallbacks.cs +464 -464
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/PubnubCrypto.cs +77 -77
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/PubnubUnity.cs +2080 -2080
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/ReconnectState.cs +180 -180
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/SafeDictionary.cs +204 -204
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/SharedStringBuilder.cs +23 -23
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/SharedStringBuilder.cs.meta +2 -2
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/SubscribeEnvelope.cs +226 -226
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/Subscription.cs +421 -421
- package/Runtime/3rdParty/PubNub/Scripts/Pubnub/Utility.cs +350 -350
- package/Runtime/3rdParty/UnityUIExtensions/ExtentionMethods.cs +19 -19
- package/Runtime/3rdParty/UnityUIExtensions/Gradient.cs +122 -122
- package/Runtime/3rdParty/UnityUIExtensions/HorizontalScrollSnap.cs +317 -317
- package/Runtime/3rdParty/UnityUIExtensions/IScrollSnap.cs +15 -15
- package/Runtime/3rdParty/UnityUIExtensions/ScrollSnap.cs +573 -573
- package/Runtime/3rdParty/UnityUIExtensions/ScrollSnapBase.cs +615 -615
- package/Runtime/3rdParty/UnityUIExtensions/ScrollSnapScrollbarHelper.cs +56 -56
- package/Runtime/3rdParty/UnityUIExtensions/UI_InfiniteScroll.cs +175 -175
- package/Runtime/3rdParty/VirtualList/Editor/AbstractVirtualListEditor.cs +43 -43
- package/Runtime/3rdParty/VirtualList/Runtime/AbstractVirtualList.cs +388 -388
- package/Runtime/3rdParty/VirtualList/Runtime/IListSource.cs +50 -50
- package/Runtime/3rdParty/VirtualList/Runtime/SimpleSource.cs +81 -81
- package/Runtime/3rdParty/VirtualList/Runtime/VirtualGridList.cs +123 -123
- package/Runtime/3rdParty/VirtualList/Runtime/VirtualHorizontalList.cs +84 -84
- package/Runtime/3rdParty/VirtualList/Runtime/VirtualVerticalList.cs +84 -84
- package/Runtime/3rdParty/WebSocket/WebSocket.cs +866 -866
- package/Runtime/API.cs +267 -267
- package/Runtime/Beam.cs +528 -528
- package/Runtime/BeamContext.cs +1037 -1037
- package/Runtime/Commands/CommandExtensions.cs +26 -26
- package/Runtime/Commands/ICommand.cs +7 -7
- package/Runtime/Connection/BeamableSubscriptionManager.cs +38 -38
- package/Runtime/Connection/IBeamableConnection.cs +30 -30
- package/Runtime/Connection/WebSocketConnection.cs +285 -285
- package/Runtime/Connection/WebSocketConnectionException.cs +9 -9
- package/Runtime/Core/Config/ConfigConsoleCommands.cs +69 -69
- package/Runtime/Core/Config/ConfigConsoleCommands.cs.meta +2 -2
- package/Runtime/Core/Config/ConfigDatabase.cs +253 -253
- package/Runtime/Core/Config/RuntimeConfigProvider.cs +86 -86
- package/Runtime/Core/ConsoleCommands/BeamableConsole.cs +169 -169
- package/Runtime/Core/ConsoleCommands/BeamableConsole.cs.meta +2 -2
- package/Runtime/Core/ConsoleCommands/BeamableConsoleCommandAttribute.cs +27 -27
- package/Runtime/Core/ConsoleCommands/BeamableConsoleCommandProviderAttribute.cs +15 -15
- package/Runtime/Core/ConsoleCommands/BeamableConsoleCommandProviderAttribute.cs.meta +2 -2
- package/Runtime/Core/ConsoleCommands/DefaultConsoleCommands.cs +45 -45
- package/Runtime/Core/ConsoleCommands/DefaultConsoleCommands.cs.meta +2 -2
- package/Runtime/Core/Coroutines/CompletedYieldInstruction.cs +14 -14
- package/Runtime/Core/Coroutines/CoroutineService.cs +115 -115
- package/Runtime/Core/Coroutines/Debouncer.cs +147 -147
- package/Runtime/Core/Coroutines/Yielders.cs +40 -40
- package/Runtime/Core/Extensions/TransformExtensions.cs +118 -118
- package/Runtime/Core/Platform/SDK/AccessToken.cs +151 -151
- package/Runtime/Core/Platform/SDK/AccessTokenStorage.cs +225 -225
- package/Runtime/Core/Platform/SDK/AdvertisingIdentifier/AdvertisingIdentifier.cs +30 -30
- package/Runtime/Core/Platform/SDK/Analytics/AnalyticsTracker.cs +200 -200
- package/Runtime/Core/Platform/SDK/Analytics/Batch/BatchContainer.cs +107 -107
- package/Runtime/Core/Platform/SDK/Analytics/Batch/BatchManager.cs +207 -207
- package/Runtime/Core/Platform/SDK/Analytics/Batch/IBatchContainer.cs +66 -66
- package/Runtime/Core/Platform/SDK/Analytics/Batch/PersistentBatchManager.cs +143 -143
- package/Runtime/Core/Platform/SDK/Analytics/Batch/SerializableBatch.cs +33 -33
- package/Runtime/Core/Platform/SDK/Analytics/Models/BillerPurchaseFailedEvent.cs +16 -16
- package/Runtime/Core/Platform/SDK/Analytics/Models/LoginPanicEvent.cs +19 -19
- package/Runtime/Core/Platform/SDK/Announcements/AnnouncementsService.cs +121 -121
- package/Runtime/Core/Platform/SDK/Auth/AuthService.cs +230 -230
- package/Runtime/Core/Platform/SDK/Auth/DeviceIdResolver.cs +24 -24
- package/Runtime/Core/Platform/SDK/Auth/GCIdentity.cs +24 -24
- package/Runtime/Core/Platform/SDK/Auth/GoogleSignIn.cs +89 -89
- package/Runtime/Core/Platform/SDK/Auth/SignInWithApple.cs +263 -263
- package/Runtime/Core/Platform/SDK/Auth/SignInWithFacebookLimited.cs +112 -112
- package/Runtime/Core/Platform/SDK/Auth/SignInWithGPG.cs +109 -109
- package/Runtime/Core/Platform/SDK/Auth/SignInWithGameCenter.cs +107 -107
- package/Runtime/Core/Platform/SDK/BeamableApiRequester.cs +112 -112
- package/Runtime/Core/Platform/SDK/Caches/OfflineCache.cs +319 -319
- package/Runtime/Core/Platform/SDK/Calendars/CalendarsService.cs +123 -123
- package/Runtime/Core/Platform/SDK/Chat/ChatProvider.cs +190 -190
- package/Runtime/Core/Platform/SDK/Chat/ChatService.cs +61 -61
- package/Runtime/Core/Platform/SDK/Chat/ChatView.cs +292 -292
- package/Runtime/Core/Platform/SDK/Chat/PubNubChatProvider.cs +51 -51
- package/Runtime/Core/Platform/SDK/Chat/PubNubRoom.cs +135 -135
- package/Runtime/Core/Platform/SDK/Chat/Room.cs +121 -121
- package/Runtime/Core/Platform/SDK/CloudData/CloudDataConsoleCommands.cs +52 -52
- package/Runtime/Core/Platform/SDK/CloudData/CloudDataService.cs +24 -24
- package/Runtime/Core/Platform/SDK/CloudSaving/CloudSavingError.cs +14 -14
- package/Runtime/Core/Platform/SDK/CloudSaving/CloudSavingExtensions.cs +82 -82
- package/Runtime/Core/Platform/SDK/CometClientData.cs +44 -44
- package/Runtime/Core/Platform/SDK/CometClientData.cs.meta +2 -2
- package/Runtime/Core/Platform/SDK/Commerce/CommerceConsoleCommands.cs +45 -45
- package/Runtime/Core/Platform/SDK/Commerce/CommerceService.cs +101 -101
- package/Runtime/Core/Platform/SDK/Commerce/ICommerceConfig.cs +19 -19
- package/Runtime/Core/Platform/SDK/Connectivity/Connectivity.cs +238 -238
- package/Runtime/Core/Platform/SDK/Connectivity/IConnectivityChecker.cs +109 -109
- package/Runtime/Core/Platform/SDK/ErrorCode.cs +62 -62
- package/Runtime/Core/Platform/SDK/Events/EventsService.cs +129 -129
- package/Runtime/Core/Platform/SDK/Groups/GroupsService.cs +58 -58
- package/Runtime/Core/Platform/SDK/Gzip.cs +51 -51
- package/Runtime/Core/Platform/SDK/Inventory/InventoryConsoleCommands.cs +65 -65
- package/Runtime/Core/Platform/SDK/Inventory/InventoryService.cs +149 -149
- package/Runtime/Core/Platform/SDK/Inventory/InventoryService.cs.meta +2 -2
- package/Runtime/Core/Platform/SDK/Inventory.meta +2 -2
- package/Runtime/Core/Platform/SDK/Leaderboard/LeaderboardService.cs +31 -31
- package/Runtime/Core/Platform/SDK/Mail/MailService.cs +44 -44
- package/Runtime/Core/Platform/SDK/Matchmaking/Match.cs +46 -46
- package/Runtime/Core/Platform/SDK/Matchmaking/MatchmakingService.cs +450 -450
- package/Runtime/Core/Platform/SDK/Matchmaking/Ticket.cs +36 -36
- package/Runtime/Core/Platform/SDK/Matchmaking/TicketReservationRequest.cs +43 -43
- package/Runtime/Core/Platform/SDK/Matchmaking/TicketReservationResponse.cs +21 -21
- package/Runtime/Core/Platform/SDK/Notification/Internal/AppleLocalNotificationRelay.cs +117 -117
- package/Runtime/Core/Platform/SDK/Notification/Internal/DummyLocalNotificationRelay.cs +33 -33
- package/Runtime/Core/Platform/SDK/Notification/Internal/GoogleLocalNotificationRelay.cs +86 -86
- package/Runtime/Core/Platform/SDK/Notification/Internal/ILocalNotificationRelay.cs +40 -40
- package/Runtime/Core/Platform/SDK/Notification/Internal/IMessageHandler.cs +11 -11
- package/Runtime/Core/Platform/SDK/Notification/Internal/InGameNotification.cs +39 -39
- package/Runtime/Core/Platform/SDK/Notification/Internal/MultiChannelSubscriptionHandler.cs +90 -90
- package/Runtime/Core/Platform/SDK/Notification/NotificationService.cs +505 -505
- package/Runtime/Core/Platform/SDK/Notification/PubnubData.cs +50 -50
- package/Runtime/Core/Platform/SDK/Notification/PubnubSubscriptionManager.cs +668 -668
- package/Runtime/Core/Platform/SDK/Notification/PushProvider.cs +25 -25
- package/Runtime/Core/Platform/SDK/Notification/PushService.cs +74 -74
- package/Runtime/Core/Platform/SDK/Payments/IBeamablePurchaser.cs +62 -62
- package/Runtime/Core/Platform/SDK/Payments/IPaymentServiceOptions.cs +38 -38
- package/Runtime/Core/Platform/SDK/Payments/PaymentErrorCodes.cs +17 -17
- package/Runtime/Core/Platform/SDK/Payments/PaymentModel.cs +75 -75
- package/Runtime/Core/Platform/SDK/Payments/PaymentService.cs +445 -445
- package/Runtime/Core/Platform/SDK/Payments/PaymentTransaction.cs +138 -138
- package/Runtime/Core/Platform/SDK/Payments/TransactionManager.cs +348 -348
- package/Runtime/Core/Platform/SDK/PlatformFilesystemAccessor.cs +14 -14
- package/Runtime/Core/Platform/SDK/PlatformRequester.cs +761 -761
- package/Runtime/Core/Platform/SDK/PlatformRequesterExceptions.cs +31 -31
- package/Runtime/Core/Platform/SDK/PlatformRequesterExtensions.cs +21 -21
- package/Runtime/Core/Platform/SDK/PlatformRequesterInterfaces.cs +29 -29
- package/Runtime/Core/Platform/SDK/PlatformService.cs +81 -81
- package/Runtime/Core/Platform/SDK/PlatformSubscribable.cs +621 -621
- package/Runtime/Core/Platform/SDK/Polyfill.cs +25 -25
- package/Runtime/Core/Platform/SDK/PubnubNotificationService.cs +42 -42
- package/Runtime/Core/Platform/SDK/Session/Heartbeat.cs +127 -127
- package/Runtime/Core/Platform/SDK/Session/SessionDeviceOptions.cs +213 -213
- package/Runtime/Core/Platform/SDK/Session/SessionParameterProvider.cs +61 -61
- package/Runtime/Core/Platform/SDK/Session/SessionService.cs +292 -292
- package/Runtime/Core/Platform/SDK/Session/SessionServiceHelper.cs +192 -192
- package/Runtime/Core/Platform/SDK/Sim/GameRelayService.cs +243 -243
- package/Runtime/Core/Platform/SDK/Sim/SimBehavior.cs +73 -73
- package/Runtime/Core/Platform/SDK/Sim/SimClient.cs +427 -427
- package/Runtime/Core/Platform/SDK/Sim/SimEvent.cs +39 -39
- package/Runtime/Core/Platform/SDK/Sim/SimFaultHandler.cs +172 -172
- package/Runtime/Core/Platform/SDK/Sim/SimFrame.cs +76 -76
- package/Runtime/Core/Platform/SDK/Sim/SimLog.cs +113 -113
- package/Runtime/Core/Platform/SDK/Sim/SimNetworkInterface.cs +79 -79
- package/Runtime/Core/Platform/SDK/Sim/network/eventStream/SimNetworkEventStream.cs +186 -186
- package/Runtime/Core/Platform/SDK/Sim/network/local/SimNetworkLocal.cs +62 -62
- package/Runtime/Core/Platform/SDK/Social/SocialService.cs +22 -22
- package/Runtime/Core/Platform/SDK/Stats/StatsService.cs +96 -96
- package/Runtime/Core/Platform/SDK/TokenAnalyticsUtil.cs +65 -65
- package/Runtime/Core/Platform/SDK/Tournaments/TournamentConsoleCommands.cs +87 -87
- package/Runtime/Core/Platform/SDK/Tournaments/TournamentService.cs +26 -26
- package/Runtime/Core/Platform/SDK/UnityUserDataCache.cs +169 -169
- package/Runtime/Core/Platform/TaskLikeExtensions.cs +26 -26
- package/Runtime/Core/Pooling/DisablePool.cs +104 -104
- package/Runtime/Core/Pooling/HidePool.cs +203 -203
- package/Runtime/Core/Pooling/HidePoolObject.cs +15 -15
- package/Runtime/Core/Pooling/HidePoolService.cs +64 -64
- package/Runtime/Core/Pooling/StaticClassPool.cs +82 -82
- package/Runtime/Core/Pooling/StringBuilderPool.cs +116 -116
- package/Runtime/Dependencies/GameObjectContext.cs +36 -36
- package/Runtime/Dependencies/ILoadWithContext.cs +12 -12
- package/Runtime/Environment/BeamableEnvironment.cs +134 -134
- package/Runtime/Environment/Resources/env-default.json +1 -1
- package/Runtime/Environment/Resources/versions-default.json +1 -1
- package/Runtime/ExperimentalAPI.cs +49 -49
- package/Runtime/GlobalServices/BeamableGlobalGameObject.cs +37 -37
- package/Runtime/HelpBoxDecoratorAttribute.cs +16 -16
- package/Runtime/InventoryViewEx.cs +171 -171
- package/Runtime/Modules/AccountManagement/Scripts/AccountAvatarBehaviour.cs +51 -51
- package/Runtime/Modules/AccountManagement/Scripts/AccountCustomizationBehaviour.cs +185 -185
- package/Runtime/Modules/AccountManagement/Scripts/AccountDisplayItem.cs +245 -245
- package/Runtime/Modules/AccountManagement/Scripts/AccountEmailLogin.cs +126 -126
- package/Runtime/Modules/AccountManagement/Scripts/AccountExistsSelect.cs +27 -27
- package/Runtime/Modules/AccountManagement/Scripts/AccountForgotPassword.cs +63 -63
- package/Runtime/Modules/AccountManagement/Scripts/AccountGeneralErrorBehaviour.cs +15 -15
- package/Runtime/Modules/AccountManagement/Scripts/AccountMainMenu.cs +315 -315
- package/Runtime/Modules/AccountManagement/Scripts/AccountManagementAdapter.cs +75 -75
- package/Runtime/Modules/AccountManagement/Scripts/AccountManagementBehaviour.cs +68 -68
- package/Runtime/Modules/AccountManagement/Scripts/AccountManagementCommands.cs +50 -50
- package/Runtime/Modules/AccountManagement/Scripts/AccountManagementConfiguration.cs +172 -172
- package/Runtime/Modules/AccountManagement/Scripts/AccountManagementHelper.cs +40 -40
- package/Runtime/Modules/AccountManagement/Scripts/AccountManagementSignals.cs +716 -716
- package/Runtime/Modules/AccountManagement/Scripts/AccountPlayerDataMenu.cs +94 -94
- package/Runtime/Modules/AccountManagement/Scripts/AccountSwitch.cs +55 -55
- package/Runtime/Modules/AccountManagement/Scripts/AccountThirdPartyWaitingMenu.cs +22 -22
- package/Runtime/Modules/AccountManagement/Scripts/AppleSignInBehavior.cs +64 -64
- package/Runtime/Modules/AccountManagement/Scripts/ForgotPasswordArguments.cs +10 -10
- package/Runtime/Modules/AccountManagement/Scripts/GoogleGameServicesBehavior.cs +67 -67
- package/Runtime/Modules/AccountManagement/Scripts/GoogleSignInBehavior.cs +70 -70
- package/Runtime/Modules/AccountManagement/Scripts/LoadingPopup.cs +34 -34
- package/Runtime/Modules/AccountManagement/Scripts/LoginArguments.cs +10 -10
- package/Runtime/Modules/AccountManagement/Scripts/ThirdPartyLoginArgument.cs +10 -10
- package/Runtime/Modules/AccountManagement/Scripts/TokenReference.cs +10 -10
- package/Runtime/Modules/Announcements/Rework/AnnouncementsCollection.cs +53 -53
- package/Runtime/Modules/Announcements/Rework/AnnouncementsPresenter.cs +70 -70
- package/Runtime/Modules/Announcements/Scripts/AnnouncementBehavior.cs +22 -22
- package/Runtime/Modules/Announcements/Scripts/AnnouncementMainMenu.cs +79 -79
- package/Runtime/Modules/Announcements/Scripts/AnnouncementReadMenu.cs +47 -47
- package/Runtime/Modules/Announcements/Scripts/AnnouncementSignals.cs +39 -39
- package/Runtime/Modules/Announcements/Scripts/AnnouncementSummary.cs +19 -19
- package/Runtime/Modules/Avatars/Scripts/AvatarConfiguration.cs +33 -33
- package/Runtime/Modules/Avatars/Scripts/AvatarPickerBehaviour.cs +99 -99
- package/Runtime/Modules/BeamableDisplayModule.cs +83 -83
- package/Runtime/Modules/BeamableModule.cs +17 -17
- package/Runtime/Modules/Calendars/Scripts/CalendarBehaviour.cs +85 -85
- package/Runtime/Modules/Calendars/Scripts/CalendarFlowMainPage.cs +8 -8
- package/Runtime/Modules/Calendars/Scripts/CalendarRewardsDay.cs +32 -32
- package/Runtime/Modules/Console/ConsoleConfiguration.cs +25 -25
- package/Runtime/Modules/Console/ConsoleFlow.cs +662 -662
- package/Runtime/Modules/Content/ContentCache.cs +184 -184
- package/Runtime/Modules/Content/ContentCommands.cs +161 -161
- package/Runtime/Modules/Content/ContentConfiguration.cs +161 -161
- package/Runtime/Modules/Content/ContentParameterProvider.cs +9 -9
- package/Runtime/Modules/Content/ContentService.cs +739 -739
- package/Runtime/Modules/Content/Extensions.cs +42 -42
- package/Runtime/Modules/Content/IManifestResolver.cs +42 -42
- package/Runtime/Modules/Content/Manifest.cs +22 -22
- package/Runtime/Modules/CoreConfiguration.cs +285 -285
- package/Runtime/Modules/CurrencyHUD/CurrencyHUDFlow.cs +74 -74
- package/Runtime/Modules/Generics/CollectionPresenter.cs +9 -9
- package/Runtime/Modules/Generics/DataCollection.cs +19 -19
- package/Runtime/Modules/Generics/DataPresenter.cs +40 -40
- package/Runtime/Modules/Generics/GenericButton.cs +21 -21
- package/Runtime/Modules/Generics/Model.cs +26 -26
- package/Runtime/Modules/Generics/ModelPresenter.cs +25 -25
- package/Runtime/Modules/Input/BeamableInput.cs +45 -45
- package/Runtime/Modules/Input/InputActionArg.cs +55 -55
- package/Runtime/Modules/Inventory/Prototype/GenericComponents/GenericTextButton.cs +36 -36
- package/Runtime/Modules/Inventory/Prototype/InventoryPresenter.cs +159 -159
- package/Runtime/Modules/Inventory/Prototype/ItemPresenter.cs +29 -29
- package/Runtime/Modules/Inventory/Prototype/ItemsCollection.cs +79 -79
- package/Runtime/Modules/Inventory/Prototype/LanguageLocalization/LanguageLocalizationElement.cs +47 -47
- package/Runtime/Modules/Inventory/Prototype/LanguageLocalization/LanguageLocalizationManager.cs +43 -43
- package/Runtime/Modules/Inventory/Prototype/LanguageLocalization/LocalizationHelper.cs +15 -15
- package/Runtime/Modules/Inventory/Scripts/InventoryBehaviour.cs +59 -59
- package/Runtime/Modules/Inventory/Scripts/InventoryCommands.cs +190 -190
- package/Runtime/Modules/Inventory/Scripts/InventoryConfiguration.cs +32 -32
- package/Runtime/Modules/Inventory/Scripts/InventoryGroupUI.cs +56 -56
- package/Runtime/Modules/Inventory/Scripts/InventoryMainMenu.cs +65 -65
- package/Runtime/Modules/Inventory/Scripts/InventoryMenuBehaviour.cs +56 -56
- package/Runtime/Modules/Inventory/Scripts/InventoryObjectUI.cs +38 -38
- package/Runtime/Modules/Inventory/Scripts/InventorySignals.cs +43 -43
- package/Runtime/Modules/Inventory/Scripts/ItemImageSetter.cs +41 -41
- package/Runtime/Modules/Leaderboards/Scripts/LeaderboardBehavior.cs +32 -32
- package/Runtime/Modules/Leaderboards/Scripts/LeaderboardItem.cs +24 -24
- package/Runtime/Modules/Leaderboards/Scripts/LeaderboardMainMenu.cs +80 -80
- package/Runtime/Modules/Leaderboards/Scripts/LeaderboardSignals.cs +33 -33
- package/Runtime/Modules/ModuleConfigurationObject.cs +212 -212
- package/Runtime/Modules/PackageUtil.cs +80 -80
- package/Runtime/Modules/Purchasing/PaymentCommands.cs +55 -55
- package/Runtime/Modules/Purchasing/Steam/SteamPurchasingModule.cs +20 -20
- package/Runtime/Modules/Purchasing/Steam/SteamStore.cs +147 -147
- package/Runtime/Modules/Purchasing/UnityBeamablePurchaser.cs +514 -514
- package/Runtime/Modules/Sessions/SessionConfiguration.cs +16 -16
- package/Runtime/Modules/Shop/Scripts/Defaults/BasicListingRenderer.cs +124 -124
- package/Runtime/Modules/Shop/Scripts/Defaults/BasicStoreRenderer.cs +60 -60
- package/Runtime/Modules/Shop/Scripts/Defaults/ObtainSummaryListCurrencyRenderer.cs +25 -25
- package/Runtime/Modules/Shop/Scripts/Defaults/ObtainSummaryListItemRenderer.cs +23 -23
- package/Runtime/Modules/Shop/Scripts/Defaults/ObtainSummaryListRenderer.cs +37 -37
- package/Runtime/Modules/Shop/Scripts/ListingContent.cs +36 -36
- package/Runtime/Modules/Shop/Scripts/ListingRenderer.cs +10 -10
- package/Runtime/Modules/Shop/Scripts/ObtainRenderer.cs +10 -10
- package/Runtime/Modules/Shop/Scripts/ShopConfiguration.cs +24 -24
- package/Runtime/Modules/Shop/Scripts/ShopFlow.cs +124 -124
- package/Runtime/Modules/Shop/Scripts/ShopLoadingMenu.cs +5 -5
- package/Runtime/Modules/Shop/Scripts/ShopRewardRenderer.cs +26 -26
- package/Runtime/Modules/Shop/Scripts/ShopSignals.cs +45 -45
- package/Runtime/Modules/Signals/DeSignal.cs +68 -68
- package/Runtime/Modules/Signals/DeSignalTower.cs +68 -68
- package/Runtime/Modules/Sound/Scripts/SoundConfiguration.cs +52 -52
- package/Runtime/Modules/Stats/StatBehaviour.cs +181 -181
- package/Runtime/Modules/Stats/StatObject.cs +106 -106
- package/Runtime/Modules/Stats/UserExtensions.cs +89 -89
- package/Runtime/Modules/Theme/Appliers/ButtonStyleApplier.cs +59 -59
- package/Runtime/Modules/Theme/Appliers/GradientStyleApplier.cs +32 -32
- package/Runtime/Modules/Theme/Appliers/ImageStyleApplier.cs +30 -30
- package/Runtime/Modules/Theme/Appliers/LayoutStyleApplier.cs +22 -22
- package/Runtime/Modules/Theme/Appliers/SelectableStyleApplier.cs +32 -32
- package/Runtime/Modules/Theme/Appliers/SoundStyleApplier.cs +27 -27
- package/Runtime/Modules/Theme/Appliers/StringStyleApplier.cs +20 -20
- package/Runtime/Modules/Theme/Appliers/StyleApplier.cs +28 -28
- package/Runtime/Modules/Theme/Appliers/TextStyleApplier.cs +57 -57
- package/Runtime/Modules/Theme/Appliers/TransformStyleApplier.cs +21 -21
- package/Runtime/Modules/Theme/Appliers/WindowStyleApplier.cs +51 -51
- package/Runtime/Modules/Theme/CanHideAttribute.cs +12 -12
- package/Runtime/Modules/Theme/Objects/GradientStyleObject.cs +33 -33
- package/Runtime/Modules/Theme/Objects/ImageStyleObject.cs +27 -27
- package/Runtime/Modules/Theme/Objects/LayoutStyleObject.cs +20 -20
- package/Runtime/Modules/Theme/Objects/SelectableStyleObject.cs +38 -38
- package/Runtime/Modules/Theme/Objects/TextStyleObject.cs +34 -34
- package/Runtime/Modules/Theme/Palette.cs +94 -94
- package/Runtime/Modules/Theme/PaletteStyleCopier.cs +34 -34
- package/Runtime/Modules/Theme/Palettes/ButtonPalette.cs +78 -78
- package/Runtime/Modules/Theme/Palettes/ColorPalette.cs +27 -27
- package/Runtime/Modules/Theme/Palettes/FontPalette.cs +28 -28
- package/Runtime/Modules/Theme/Palettes/GradientPalette.cs +57 -57
- package/Runtime/Modules/Theme/Palettes/ImagePalette.cs +31 -31
- package/Runtime/Modules/Theme/Palettes/LayoutPalette.cs +28 -28
- package/Runtime/Modules/Theme/Palettes/SelectablePalette.cs +36 -36
- package/Runtime/Modules/Theme/Palettes/SoundPalette.cs +30 -30
- package/Runtime/Modules/Theme/Palettes/StringPalette.cs +37 -37
- package/Runtime/Modules/Theme/Palettes/TextPalette.cs +61 -61
- package/Runtime/Modules/Theme/Palettes/TransformPalette.cs +29 -29
- package/Runtime/Modules/Theme/Palettes/WindowPalette.cs +43 -43
- package/Runtime/Modules/Theme/StyleBehaviour.cs +73 -73
- package/Runtime/Modules/Theme/StyleObject.cs +46 -46
- package/Runtime/Modules/Theme/ThemeConfiguration.cs +9 -9
- package/Runtime/Modules/Theme/ThemeObject.cs +160 -160
- package/Runtime/Modules/Tournaments/Scripts/CountdownTextBehaviour.cs +65 -65
- package/Runtime/Modules/Tournaments/Scripts/FixedCharacterFitter.cs +49 -49
- package/Runtime/Modules/Tournaments/Scripts/MockTournamentService.cs +221 -221
- package/Runtime/Modules/Tournaments/Scripts/TabBehaviour.cs +97 -97
- package/Runtime/Modules/Tournaments/Scripts/TournamenClaimableRewardBehaviour.cs +37 -37
- package/Runtime/Modules/Tournaments/Scripts/TournamentColorConstraint.cs +62 -62
- package/Runtime/Modules/Tournaments/Scripts/TournamentDataSource.cs +74 -74
- package/Runtime/Modules/Tournaments/Scripts/TournamentEntryBehavior.cs +221 -221
- package/Runtime/Modules/Tournaments/Scripts/TournamentEntryPlayerBehaviour.cs +152 -152
- package/Runtime/Modules/Tournaments/Scripts/TournamentInfoBehaviour.cs +33 -33
- package/Runtime/Modules/Tournaments/Scripts/TournamentInfoDetailBehaviour.cs +8 -8
- package/Runtime/Modules/Tournaments/Scripts/TournamentInfoDetailContainerBehaviour.cs +32 -32
- package/Runtime/Modules/Tournaments/Scripts/TournamentNumbersBehaviour.cs +20 -20
- package/Runtime/Modules/Tournaments/Scripts/TournamentRewardBehaviour.cs +21 -21
- package/Runtime/Modules/Tournaments/Scripts/TournamentRewardEntryBehaviour.cs +32 -32
- package/Runtime/Modules/Tournaments/Scripts/TournamentRewardPanelBehaviour.cs +78 -78
- package/Runtime/Modules/Tournaments/Scripts/TournamentScoreUtil.cs +77 -77
- package/Runtime/Modules/Tournaments/Scripts/TournamentStageGainBehaviour.cs +25 -25
- package/Runtime/Modules/Tournaments/Scripts/TournamentsBehaviour.cs +630 -630
- package/Runtime/Modules/Tournaments/Scripts/TournamentsConfiguration.cs +32 -32
- package/Runtime/PaymentExtensions.cs +16 -16
- package/Runtime/PlatformConsoleCommands.cs +559 -559
- package/Runtime/PlatformConsoleCommands.cs.meta +2 -2
- package/Runtime/Player/ApiServices.cs +162 -162
- package/Runtime/Player/BeamableBehaviour.cs +142 -142
- package/Runtime/Player/Leaderboards/LeaderboardLists.cs +216 -216
- package/Runtime/Player/Leaderboards/Lists/FriendScoresList.cs +76 -76
- package/Runtime/Player/Leaderboards/Lists/NearbyScoresList.cs +67 -67
- package/Runtime/Player/Leaderboards/Lists/PlayerCollectionScoresList.cs +52 -52
- package/Runtime/Player/Leaderboards/Lists/TopScoresList.cs +41 -41
- package/Runtime/Player/Leaderboards/PlayerLeaderboard.cs +774 -774
- package/Runtime/Player/Leaderboards/PlayerLeaderboards.cs +95 -95
- package/Runtime/Player/MonoBehaviourExtensions.cs +17 -17
- package/Runtime/Player/ObservableAccessToken.cs +12 -12
- package/Runtime/Player/ObservableUser.cs +30 -30
- package/Runtime/Player/PlayerAccounts.cs +2132 -2132
- package/Runtime/Player/PlayerAnnouncements.cs +239 -239
- package/Runtime/Player/PlayerCurrencies.cs +157 -157
- package/Runtime/Player/PlayerFriends.cs +661 -661
- package/Runtime/Player/PlayerInventory.cs +893 -893
- package/Runtime/Player/PlayerItemGroup.cs +200 -200
- package/Runtime/Player/PlayerLobby.cs +328 -328
- package/Runtime/Player/PlayerParty.cs +601 -601
- package/Runtime/Player/PlayerStateService.cs +44 -44
- package/Runtime/Player/PlayerStats.cs +238 -238
- package/Runtime/Player/SdkEventService.cs +259 -259
- package/Runtime/PromiseExtensions.cs +304 -304
- package/Runtime/ReflectionCache/BeamReflectionCache.cs +186 -186
- package/Runtime/ReflectionCache/ReflectionSystemObject.cs +55 -55
- package/Runtime/ReflectionCache/ThirdPartyIdentityReflectionCache.cs +84 -84
- package/Runtime/Server/BeamContextExtensions.cs +13 -13
- package/Runtime/Server/Content/ApiContentExtensions.cs +88 -88
- package/Runtime/Server/LegacyCommon/Mocks/MongoDB/Bson.meta +11 -11
- package/Runtime/Server/MicroserviceClient.cs +415 -415
- package/Runtime/Server/MicroserviceIndividualization.cs +80 -80
- package/Runtime/Server/MicroservicePrefixService.cs +10 -10
- package/Runtime/Server/ThirdPartyFederatedLoginExtensions.cs +60 -60
- package/Runtime/UI/Buttons/DeButtonBehaviour.cs +33 -33
- package/Runtime/UI/Layouts/MediaQueryBehaviour.cs +74 -74
- package/Runtime/UI/Layouts/MediaQueryObject.cs +118 -118
- package/Runtime/UI/Layouts/MediaSourceBehaviour.cs +49 -49
- package/Runtime/UI/Layouts/ReparenterBehaviour.cs +86 -86
- package/Runtime/UI/Layouts/StackLayout.cs +70 -70
- package/Runtime/UI/Lightbeam/DependencyExtensions.cs +359 -359
- package/Runtime/UI/Lightbeam/LightBeam.cs +155 -155
- package/Runtime/UI/Lightbeam/UIExtensions.cs +182 -182
- package/Runtime/UI/Prompt/DePromptBehaviour.cs +38 -38
- package/Runtime/UI/Prompt/DePromptData.cs +14 -14
- package/Runtime/UI/Scripts/AddressableImageBehaviour.cs +15 -15
- package/Runtime/UI/Scripts/AddressableSpriteLoader.cs +107 -107
- package/Runtime/UI/Scripts/BackButtonBehaviour.cs +14 -14
- package/Runtime/UI/Scripts/BeamableAnimationUtil.cs +100 -100
- package/Runtime/UI/Scripts/BeamableButton.cs +33 -33
- package/Runtime/UI/Scripts/BeamableWindow.cs +15 -15
- package/Runtime/UI/Scripts/ClickOffBehaviour.cs +42 -42
- package/Runtime/UI/Scripts/CloseButtonBehaviour.cs +14 -14
- package/Runtime/UI/Scripts/EventSoundBehaviour.cs +55 -55
- package/Runtime/UI/Scripts/GameObjectToggler.cs +25 -25
- package/Runtime/UI/Scripts/InputReference.cs +24 -24
- package/Runtime/UI/Scripts/InputValidationBehaviour.cs +153 -153
- package/Runtime/UI/Scripts/LoadingDisableBehaviour.cs +87 -87
- package/Runtime/UI/Scripts/LoadingIndicator.cs +117 -117
- package/Runtime/UI/Scripts/Menu.cs +47 -47
- package/Runtime/UI/Scripts/MenuManagementBehaviour.cs +268 -268
- package/Runtime/UI/Scripts/MobileUtilities.cs +84 -84
- package/Runtime/UI/Scripts/OfflineNotificationBehaviour.cs +37 -37
- package/Runtime/UI/Scripts/OfflineObject.cs +69 -69
- package/Runtime/UI/Scripts/ScrollButton.cs +23 -23
- package/Runtime/UI/Scripts/ScrollDotsBehaviour.cs +83 -83
- package/Runtime/UI/Scripts/ScrollToAlphaBehaviour.cs +47 -47
- package/Runtime/UI/Scripts/StickyScrollElement.cs +176 -176
- package/Runtime/UI/Scripts/TextReference.cs +15 -15
- package/Runtime/UI/Scripts/TextReferenceBase.cs +14 -14
- package/Runtime/UI/Scripts/TransformOffsetBehaviour.cs +61 -61
- package/Runtime/UI/TextField/DeTextFieldBehaviour.cs +48 -48
- package/Runtime/VectorIntExtensions.cs +45 -45
- package/Samples~/LightBeamSamples/AccountManager/AccountExampleConfig.cs +15 -15
- package/Samples~/LightBeamSamples/AccountManager/AccountManager.cs +57 -57
- package/Samples~/LightBeamSamples/AccountManager/Prefabs/AccountDetailsBehaviour/AccountDetailsBehaviour.cs +53 -53
- package/Samples~/LightBeamSamples/AccountManager/Prefabs/AccountDisplayBehaviour/AccountDisplayBehaviour.cs +51 -51
- package/Samples~/LightBeamSamples/AccountManager/Prefabs/AccountSwitchPage/AccountSwitchPage.cs +42 -42
- package/Samples~/LightBeamSamples/AccountManager/Prefabs/AvatarDisplay/AvatarDisplayBehaviour.cs +21 -21
- package/Samples~/LightBeamSamples/AccountManager/Prefabs/ForgotPasswordPage/ForgotPasswordPage.cs +64 -64
- package/Samples~/LightBeamSamples/AccountManager/Prefabs/HomePage/HomePage.cs +70 -70
- package/Samples~/LightBeamSamples/AccountManager/Prefabs/RecoverEmailPage/RecoverEmailPage.cs +131 -131
- package/Samples~/LightBeamSamples/AccountManager/Prefabs/RegisterEmailPage/RegisterEmailPage.cs +79 -79
- package/Samples~/LightBeamSamples/CurrencyHud/CurrencyHudManager.cs +40 -40
- package/Samples~/LightBeamSamples/CurrencyHud/Prefabs/CurrencyView/CurrencyViewBehaviour.cs +50 -50
- package/Samples~/LightBeamSamples/FriendsManager/FriendsExampleConfig.cs +13 -13
- package/Samples~/LightBeamSamples/FriendsManager/FriendsManager.cs +32 -32
- package/Samples~/LightBeamSamples/FriendsManager/Prefabs/BlockedDisplay/BlockedPlayersDisplayBehaviour.cs +25 -25
- package/Samples~/LightBeamSamples/FriendsManager/Prefabs/FriendDisplay/FriendDisplayBehaviour.cs +31 -31
- package/Samples~/LightBeamSamples/FriendsManager/Prefabs/HomePage/HomePage.cs +31 -31
- package/Samples~/LightBeamSamples/FriendsManager/Prefabs/PlayerFriendsDisplay/PlayerFriendsBehaviour.cs +194 -194
- package/Samples~/LightBeamSamples/FriendsManager/Prefabs/ReceivedInvitesDisplay/ReceivedInviteDisplayBehaviour.cs +31 -31
- package/Samples~/LightBeamSamples/FriendsManager/Prefabs/Selector/Editor/SelectorButtonBehaviourEditor.cs +27 -27
- package/Samples~/LightBeamSamples/FriendsManager/Prefabs/Selector/SelectorButtonBehaviour.cs +13 -13
- package/Samples~/LightBeamSamples/FriendsManager/Prefabs/SentInvitesDisplay/SentInviteDisplayBehaviour.cs +25 -25
- package/Samples~/LightBeamSamples/Inventory/InventoryExampleConfig.cs +12 -12
- package/Samples~/LightBeamSamples/Inventory/InventoryManager.cs +32 -32
- package/Samples~/LightBeamSamples/Inventory/Prefabs/CurrencyDisplay/CurrencyDisplayBehaviour.cs +48 -48
- package/Samples~/LightBeamSamples/Inventory/Prefabs/CurrencyInfoPage/CurrencyInfoBehaviour.cs +70 -70
- package/Samples~/LightBeamSamples/Inventory/Prefabs/HomePage/HomePage.cs +82 -82
- package/Samples~/LightBeamSamples/Inventory/Prefabs/ItemDisplay/ItemDisplayBehaviour.cs +51 -51
- package/Samples~/LightBeamSamples/Inventory/Prefabs/ItemInfoPage/ItemInfoPage.cs +74 -74
- package/Samples~/LightBeamSamples/Inventory/Prefabs/PropertyDisplay/PropertyDisplayBehaviour.cs +21 -21
- package/Samples~/LightBeamSamples/LobbyManager/LobbyExampleConfig.cs +14 -14
- package/Samples~/LightBeamSamples/LobbyManager/LobbyManager.cs +36 -36
- package/Samples~/LightBeamSamples/LobbyManager/Prefabs/CreateLobbyDisplay/CreateLobbyDisplayBehaviour.cs +54 -54
- package/Samples~/LightBeamSamples/LobbyManager/Prefabs/FindLobbyDisplay/FindLobbyDisplayBehaviour.cs +36 -36
- package/Samples~/LightBeamSamples/LobbyManager/Prefabs/HomePage/HomePage.cs +71 -71
- package/Samples~/LightBeamSamples/LobbyManager/Prefabs/JoinLobbyDisplay/JoinLobbyDisplayBehaviour.cs +75 -75
- package/Samples~/LightBeamSamples/LobbyManager/Prefabs/LobbyDetailsDisplay/LobbyDetailsDisplayBehaviour.cs +80 -80
- package/Samples~/LightBeamSamples/LobbyManager/Prefabs/LobbyDisplay/LobbyDisplayBehaviour.cs +27 -27
- package/Samples~/LightBeamSamples/LobbyManager/Prefabs/PlayerDisplay/PlayerIdDisplayBehaviour.cs +17 -17
- package/Samples~/LightBeamSamples/LobbyManager/Prefabs/PlayerLobby/PlayerLobbyBehaviour.cs +112 -112
- package/Samples~/LightBeamSamples/LootBox/BeamableServices~/LootBoxService/LootBoxService.cs +45 -45
- package/Samples~/LightBeamSamples/LootBox/BeamableServices~/LootBoxService/Program.cs +20 -20
- package/Samples~/LightBeamSamples/LootBox/LootBoxExampleConfig.cs +8 -8
- package/Samples~/LightBeamSamples/LootBox/LootBoxManager.cs +30 -30
- package/Samples~/LightBeamSamples/LootBox/Prefabs/LootBoxPage/LootBoxPage.cs +47 -47
- package/Samples~/LightBeamSamples/SceneLoader/Config/LightBeamSceneConfigObject_Editor.cs +37 -37
- package/Samples~/LightBeamSamples/SceneLoader/LightBeamBooter.cs +485 -485
- package/Samples~/LightBeamSamples/SceneLoader/Prefabs/SceneDisplay/SceneDisplayBehaviour.cs +25 -25
- package/Samples~/SampleProjectBase/Scripts/Editor/Beamable/Samples/SampleProjectBase/AutoOpenReadme.cs +46 -46
- package/Samples~/SampleProjectBase/Scripts/Editor/Beamable/Samples/SampleProjectBase/BeamableReadmeEditor.cs +158 -158
- package/Samples~/SampleProjectBase/Scripts/Runtime/Beamable/Samples/SampleProjectBase/Readme.cs +33 -33
- package/Template/SharedSample.cs +19 -19
- package/Tests/Editor/AliasHelperTests.cs +64 -64
- package/Tests/Editor/CLI/DataTransferTests.cs +65 -65
- package/Tests/Editor/Common/BeamUtil/SanitizeStringForPathTests.cs +18 -18
- package/Tests/Editor/Common/TrieTests.cs +253 -253
- package/Tests/Editor/Common/TryInvokeCallbackTests.cs +93 -93
- package/Tests/Editor/ContentObjectTests.cs +65 -65
- package/Tests/Editor/EditorDisruptorEngine/Content/ContentObjectFieldTests.cs +81 -81
- package/Tests/Editor/EditorDisruptorEngine/Content/ContentObjectLinkRefTests.cs +81 -81
- package/Tests/Editor/EditorDisruptorEngine/Content/ExampleContent.cs +10 -10
- package/Tests/Editor/EditorDisruptorEngine/Content/Schedules/CronTests.cs +189 -189
- package/Tests/Editor/EditorTest.cs +51 -51
- package/Tests/Editor/JsonPerfTesting.cs +117 -117
- package/Tests/Editor/JsonPerfTesting_PayloadSize.cs +96 -96
- package/Tests/Editor/JsonTestHelp.cs +82 -82
- package/Tests/Editor/MockLogProvider.cs +47 -47
- package/Tests/Editor/PreserveAttributeTests.cs +26 -26
- package/Tests/Editor/PromiseTests/ErrorTests.cs +582 -582
- package/Tests/Editor/SmallerJSON/InfinityTests.cs +61 -61
- package/Tests/Editor/SmallerJSON/JsonPathTests.cs +107 -107
- package/Tests/Editor/SmallerJSON/JsonSerializeTest.cs +135 -135
- package/Tests/Runtime/Beamable/BeamContextInitTests.cs +103 -103
- package/Tests/Runtime/Beamable/BeamContextTest.cs +72 -72
- package/Tests/Runtime/Beamable/BeamableTest.cs +46 -46
- package/Tests/Runtime/Beamable/Content/ClientManifest/ParseCSVTests.cs +102 -102
- package/Tests/Runtime/Beamable/Content/ContentRegistry/GetTypeFromIdTests.cs +164 -164
- package/Tests/Runtime/Beamable/Content/Serialization/ClientContentSerializer/DeserializeEmptyFields.cs +114 -114
- package/Tests/Runtime/Beamable/Content/Serialization/ClientContentSerializer/DeserializeTests.cs +1343 -1343
- package/Tests/Runtime/Beamable/Content/Serialization/ClientContentSerializer/EscapedStringTests.cs +119 -119
- package/Tests/Runtime/Beamable/Content/Serialization/ClientContentSerializer/GetNullStringForTypeTests.cs +104 -104
- package/Tests/Runtime/Beamable/Content/Serialization/ClientContentSerializer/SerializeFieldSubclassSerializeTests.cs +157 -157
- package/Tests/Runtime/Beamable/Content/Serialization/ClientContentSerializer/SerializeTests.cs +1066 -1066
- package/Tests/Runtime/Beamable/Content/Serialization/TestContentRef.cs +66 -66
- package/Tests/Runtime/Beamable/Content/Serialization/VipContentSerialization/VipContentSerializationTests.cs +34 -34
- package/Tests/Runtime/Beamable/DebouncerTests.cs +110 -110
- package/Tests/Runtime/Beamable/Dependencies/ScopingTests.cs +235 -235
- package/Tests/Runtime/Beamable/Environment/PackageVersionTests/FromSemanticVersionStringTests.cs +161 -161
- package/Tests/Runtime/Beamable/Environment/PackageVersionTests/ImplicitConversionTest.cs +24 -24
- package/Tests/Runtime/Beamable/Environment/PackageVersionTests/RangeOperatorTests.cs +209 -209
- package/Tests/Runtime/Beamable/Environment/PackageVersionTests/ToStringTests.cs +64 -64
- package/Tests/Runtime/Beamable/MockAuthService.cs +218 -218
- package/Tests/Runtime/Beamable/MockBeamContext.cs +171 -171
- package/Tests/Runtime/Beamable/MockBeamableApi.cs +122 -122
- package/Tests/Runtime/Beamable/MockConfigurationHelper.cs +19 -19
- package/Tests/Runtime/Beamable/MockFileAccessor.cs +19 -19
- package/Tests/Runtime/Beamable/Modules/AccountManagement/AccountManagementSignalsTests/AcceptAccountSwitchTests.cs +95 -95
- package/Tests/Runtime/Beamable/Modules/AccountManagement/AccountManagementSignalsTests/CheckSignedInUserTests.cs +134 -134
- package/Tests/Runtime/Beamable/Modules/AccountManagement/AccountManagementSignalsTests/LoginTests.cs +108 -108
- package/Tests/Runtime/Beamable/Modules/AccountManagement/AccountManagementSignalsTests/TestHelperExtensions.cs +38 -38
- package/Tests/Runtime/Beamable/Modules/AccountManagement/AccountManagementSignalsTests/UpdateLoginEmailTests.cs +81 -81
- package/Tests/Runtime/Beamable/Modules/Leaderboards/IncrementTests.cs +88 -88
- package/Tests/Runtime/Beamable/Modules/Leaderboards/LeaderboardViewSerializeTests.cs +109 -109
- package/Tests/Runtime/Beamable/Modules/Shop/ListingContentTests/ValidateListingTests.cs +66 -66
- package/Tests/Runtime/Beamable/Modules/Stats/StatObjectTests/WriteTests.cs +42 -42
- package/Tests/Runtime/Beamable/Modules/Tournaments/TournamentScoreUtilTests/GetShortScoreTests.cs +329 -329
- package/Tests/Runtime/Beamable/Platform/AccessTokenStorageTests.cs +154 -154
- package/Tests/Runtime/Beamable/Platform/Auth/AuthServiceTests/AuthServiceTestBase.cs +39 -39
- package/Tests/Runtime/Beamable/Platform/Auth/AuthServiceTests/CustomDeviceIdTests.cs +51 -51
- package/Tests/Runtime/Beamable/Platform/Auth/AuthServiceTests/GetUserTests.cs +33 -33
- package/Tests/Runtime/Beamable/Platform/Auth/AuthServiceTests/IsEmailAvailableTests.cs +58 -58
- package/Tests/Runtime/Beamable/Platform/Auth/AuthServiceTests/LoginTests.cs +37 -37
- package/Tests/Runtime/Beamable/Platform/Auth/AuthServiceTests/RemoveDeviceIdTests.cs +69 -69
- package/Tests/Runtime/Beamable/Platform/Connectivity/MockConnectivityService.cs +45 -45
- package/Tests/Runtime/Beamable/Platform/Content/MockContentService.cs +140 -140
- package/Tests/Runtime/Beamable/Platform/Inventory/InventoryResponseTests/MergeViewTests.cs +245 -245
- package/Tests/Runtime/Beamable/Platform/Inventory/InventoryServiceTests/GetItemTests.cs +225 -225
- package/Tests/Runtime/Beamable/Platform/Inventory/InventoryServiceTests/InventoryServiceTestBase.cs +52 -52
- package/Tests/Runtime/Beamable/Platform/Inventory/InventoryServiceTests/UpdateTests.cs +73 -73
- package/Tests/Runtime/Beamable/Platform/Inventory/InventoryTestItem.cs +26 -26
- package/Tests/Runtime/Beamable/Platform/Inventory/InventoryUpdateBuilderTests/AddItemTests.cs +24 -24
- package/Tests/Runtime/Beamable/Platform/Inventory/InventoryUpdateBuilderTests/SerializationTests.cs +227 -227
- package/Tests/Runtime/Beamable/Platform/Inventory/InventoryUpdateBuilderTests/UnitySerializationTests.cs +215 -215
- package/Tests/Runtime/Beamable/Platform/Mail/MailTests.cs +67 -67
- package/Tests/Runtime/Beamable/Platform/MockConnectivityChecker.cs +24 -24
- package/Tests/Runtime/Beamable/Platform/MockPlatformAPI.cs +398 -398
- package/Tests/Runtime/Beamable/Platform/MockPlatformRequester.cs +78 -78
- package/Tests/Runtime/Beamable/Platform/MockPlatformService.cs +47 -47
- package/Tests/Runtime/Beamable/Platform/MockRequesterExtensions.cs +13 -13
- package/Tests/Runtime/Beamable/Platform/TestUtil.cs +59 -59
- package/Tests/Runtime/Beamable/Player/Accounts/ExternalIdentityQueryArgsTests.cs +132 -132
- package/Tests/Runtime/Beamable/Player/Announcements/AnnouncementGiftSerialization.cs +117 -117
- package/Tests/Runtime/Beamable/Player/Announcements/MockAnnouncementsApi.cs +45 -45
- package/Tests/Runtime/Beamable/Player/Announcements/MockNotificationService.cs +70 -70
- package/Tests/Runtime/Beamable/Player/Inventory/GetItemTests.cs +485 -485
- package/Tests/Runtime/Beamable/Player/Inventory/MockInventoryApi.cs +77 -77
- package/Tests/Runtime/Beamable/Player/Leaderboards/ResortTests.cs +236 -236
- package/Tests/Runtime/Beamable/Pooling/StringBuilderPoolTests/SpawnTests.cs +55 -55
- package/Tests/Runtime/Beamable/Promises/PromisePlayModeTests.cs +145 -145
- package/Tests/Runtime/Beamable/Promises/SequenceTests.cs +45 -45
- package/Tests/Runtime/Beamable/QueryBuilder/QueryBuilderTests.cs +94 -94
- package/Tests/Runtime/Server/Runtime/MicroserviceClient/RequestTests.cs +374 -374
- package/Tests/Runtime/Server/Runtime/MicroserviceClient/TestClient.cs +78 -78
- package/Tests/Runtime/Server/Runtime/TestRegistrations.cs +22 -22
- package/package.json +1 -1
|
@@ -1,2080 +1,2080 @@
|
|
|
1
|
-
//Build Date: Jul 29, 2016
|
|
2
|
-
//ver3.7.2/Unity5
|
|
3
|
-
|
|
4
|
-
using Beamable.Common.Dependencies;
|
|
5
|
-
using System;
|
|
6
|
-
using System.Collections;
|
|
7
|
-
using System.Collections.Generic;
|
|
8
|
-
using System.ComponentModel;
|
|
9
|
-
using System.Linq;
|
|
10
|
-
using System.Net;
|
|
11
|
-
using System.Runtime.CompilerServices;
|
|
12
|
-
using System.Security.Cryptography;
|
|
13
|
-
using System.Text;
|
|
14
|
-
using UnityEngine;
|
|
15
|
-
using Object = UnityEngine.Object;
|
|
16
|
-
|
|
17
|
-
#if DEBUG
|
|
18
|
-
[assembly:InternalsVisibleTo("Assembly-CSharp-Editor")]
|
|
19
|
-
#endif
|
|
20
|
-
|
|
21
|
-
namespace PubNubMessaging.Core
|
|
22
|
-
{
|
|
23
|
-
public class PubnubUnity
|
|
24
|
-
{
|
|
25
|
-
private readonly IDependencyProvider _provider;
|
|
26
|
-
|
|
27
|
-
#region "Events"
|
|
28
|
-
|
|
29
|
-
// Common property changed event
|
|
30
|
-
public event PropertyChangedEventHandler PropertyChanged;
|
|
31
|
-
|
|
32
|
-
public void RaisePropertyChanged(string propertyName)
|
|
33
|
-
{
|
|
34
|
-
var handler = PropertyChanged;
|
|
35
|
-
if (handler != null)
|
|
36
|
-
{
|
|
37
|
-
handler(this, new PropertyChangedEventArgs(propertyName));
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
#endregion
|
|
42
|
-
|
|
43
|
-
#region "Class variables"
|
|
44
|
-
|
|
45
|
-
private GameObject gobj;
|
|
46
|
-
private Counter publishMessageCounter;
|
|
47
|
-
|
|
48
|
-
private CoroutineClass coroutine;
|
|
49
|
-
|
|
50
|
-
private string origin = "pubsub.pubnub.com";
|
|
51
|
-
private string publishKey = "";
|
|
52
|
-
private string subscribeKey = "";
|
|
53
|
-
private string secretKey = "";
|
|
54
|
-
private string cipherKey = "";
|
|
55
|
-
private bool ssl = true;
|
|
56
|
-
private long lastSubscribeTimetoken = 0;
|
|
57
|
-
private long lastSubscribeTimetokenForNewMultiplex = 0;
|
|
58
|
-
private const string build = "3.7.2";
|
|
59
|
-
private static string pnsdkVersion = "PubNub-CSharp-Unity5/3.7.2";
|
|
60
|
-
|
|
61
|
-
private int pubnubWebRequestCallbackIntervalInSeconds = 310;
|
|
62
|
-
private int pubnubOperationTimeoutIntervalInSeconds = 15;
|
|
63
|
-
private int pubnubHeartbeatTimeoutIntervalInSeconds = 10;
|
|
64
|
-
private int pubnubNetworkTcpCheckIntervalInSeconds = 15;
|
|
65
|
-
private int pubnubNetworkCheckRetries = 50;
|
|
66
|
-
private int pubnubWebRequestRetryIntervalInSeconds = 10;
|
|
67
|
-
private int pubnubPresenceHeartbeatInSeconds = 0;
|
|
68
|
-
private int presenceHeartbeatIntervalInSeconds = 0;
|
|
69
|
-
private int requestDelayTime = 0;
|
|
70
|
-
private bool enableResumeOnReconnect = true;
|
|
71
|
-
private bool uuidChanged = false;
|
|
72
|
-
public bool overrideTcpKeepAlive = true;
|
|
73
|
-
private bool enableJsonEncodingForPublish = true;
|
|
74
|
-
private LoggingMethod.Level pubnubLogLevel = LoggingMethod.Level.Info;
|
|
75
|
-
private PubnubErrorFilter.Level errorLevel = PubnubErrorFilter.Level.Info;
|
|
76
|
-
bool resetTimetoken = false;
|
|
77
|
-
|
|
78
|
-
private bool keepHearbeatRunning = false;
|
|
79
|
-
private bool isHearbeatRunning = false;
|
|
80
|
-
|
|
81
|
-
private bool keepPresenceHearbeatRunning = false;
|
|
82
|
-
private bool isPresenceHearbeatRunning = false;
|
|
83
|
-
|
|
84
|
-
private bool internetStatus = true;
|
|
85
|
-
//private bool retriesExceeded = false;
|
|
86
|
-
|
|
87
|
-
private int retryCount = 0;
|
|
88
|
-
|
|
89
|
-
#endregion
|
|
90
|
-
|
|
91
|
-
#region "Properties"
|
|
92
|
-
|
|
93
|
-
public Subscription Subscription => _provider.GetService<Subscription>();
|
|
94
|
-
public StoredRequestState StoredRequestState => _provider.GetService<StoredRequestState>();
|
|
95
|
-
|
|
96
|
-
public string PublishKey
|
|
97
|
-
{
|
|
98
|
-
get
|
|
99
|
-
{
|
|
100
|
-
return publishKey;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
public string SubscribeKey
|
|
105
|
-
{
|
|
106
|
-
get
|
|
107
|
-
{
|
|
108
|
-
return subscribeKey;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
public string SecretKey
|
|
113
|
-
{
|
|
114
|
-
get
|
|
115
|
-
{
|
|
116
|
-
return secretKey;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/// <summary>
|
|
121
|
-
/// Gets or sets the set game object.
|
|
122
|
-
/// This method should be called before init
|
|
123
|
-
/// </summary>
|
|
124
|
-
/// <value>The set game object.</value>
|
|
125
|
-
public GameObject SetGameObject
|
|
126
|
-
{
|
|
127
|
-
get
|
|
128
|
-
{
|
|
129
|
-
return gobj;
|
|
130
|
-
}
|
|
131
|
-
set
|
|
132
|
-
{
|
|
133
|
-
gobj = value;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
public static string Version
|
|
138
|
-
{
|
|
139
|
-
get
|
|
140
|
-
{
|
|
141
|
-
return pnsdkVersion;
|
|
142
|
-
}
|
|
143
|
-
set
|
|
144
|
-
{
|
|
145
|
-
pnsdkVersion = value;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
private List<object> history = new List<object>();
|
|
150
|
-
|
|
151
|
-
public List<object> History
|
|
152
|
-
{
|
|
153
|
-
get { return history; }
|
|
154
|
-
set
|
|
155
|
-
{
|
|
156
|
-
history = value;
|
|
157
|
-
RaisePropertyChanged("History");
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
public int SubscribeTimeout
|
|
162
|
-
{
|
|
163
|
-
get
|
|
164
|
-
{
|
|
165
|
-
return pubnubWebRequestCallbackIntervalInSeconds;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
set
|
|
169
|
-
{
|
|
170
|
-
#if (UNITY_IOS)
|
|
171
|
-
pubnubWebRequestCallbackIntervalInSeconds = Utility.CheckTimeoutValue(value);
|
|
172
|
-
#else
|
|
173
|
-
pubnubWebRequestCallbackIntervalInSeconds = value;
|
|
174
|
-
#endif
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
public int HeartbeatTimeout
|
|
179
|
-
{
|
|
180
|
-
get
|
|
181
|
-
{
|
|
182
|
-
return pubnubHeartbeatTimeoutIntervalInSeconds;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
set
|
|
186
|
-
{
|
|
187
|
-
pubnubHeartbeatTimeoutIntervalInSeconds = value;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
public int NonSubscribeTimeout
|
|
192
|
-
{
|
|
193
|
-
get
|
|
194
|
-
{
|
|
195
|
-
return pubnubOperationTimeoutIntervalInSeconds;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
set
|
|
199
|
-
{
|
|
200
|
-
#if (UNITY_IOS)
|
|
201
|
-
pubnubOperationTimeoutIntervalInSeconds = Utility.CheckTimeoutValue(value);
|
|
202
|
-
#else
|
|
203
|
-
pubnubOperationTimeoutIntervalInSeconds = value;
|
|
204
|
-
#endif
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
public int NetworkCheckMaxRetries
|
|
209
|
-
{
|
|
210
|
-
get
|
|
211
|
-
{
|
|
212
|
-
return pubnubNetworkCheckRetries;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
set
|
|
216
|
-
{
|
|
217
|
-
pubnubNetworkCheckRetries = value;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
public int NetworkCheckRetryInterval
|
|
222
|
-
{
|
|
223
|
-
get
|
|
224
|
-
{
|
|
225
|
-
return pubnubWebRequestRetryIntervalInSeconds;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
set
|
|
229
|
-
{
|
|
230
|
-
pubnubWebRequestRetryIntervalInSeconds = value;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
public int LocalClientHeartbeatInterval
|
|
235
|
-
{
|
|
236
|
-
get
|
|
237
|
-
{
|
|
238
|
-
return pubnubNetworkTcpCheckIntervalInSeconds;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
set
|
|
242
|
-
{
|
|
243
|
-
pubnubNetworkTcpCheckIntervalInSeconds = value;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
public bool EnableResumeOnReconnect
|
|
248
|
-
{
|
|
249
|
-
get
|
|
250
|
-
{
|
|
251
|
-
return enableResumeOnReconnect;
|
|
252
|
-
}
|
|
253
|
-
set
|
|
254
|
-
{
|
|
255
|
-
enableResumeOnReconnect = value;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
public bool EnableJsonEncodingForPublish
|
|
260
|
-
{
|
|
261
|
-
get
|
|
262
|
-
{
|
|
263
|
-
return enableJsonEncodingForPublish;
|
|
264
|
-
}
|
|
265
|
-
set
|
|
266
|
-
{
|
|
267
|
-
enableJsonEncodingForPublish = value;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
private string authenticationKey = "";
|
|
272
|
-
|
|
273
|
-
public string AuthenticationKey
|
|
274
|
-
{
|
|
275
|
-
get
|
|
276
|
-
{
|
|
277
|
-
return authenticationKey;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
set
|
|
281
|
-
{
|
|
282
|
-
authenticationKey = value;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
private IPubnubUnitTest pubnubUnitTest;
|
|
287
|
-
|
|
288
|
-
public virtual IPubnubUnitTest PubnubUnitTest
|
|
289
|
-
{
|
|
290
|
-
get
|
|
291
|
-
{
|
|
292
|
-
return pubnubUnitTest;
|
|
293
|
-
}
|
|
294
|
-
set
|
|
295
|
-
{
|
|
296
|
-
pubnubUnitTest = value;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
private static IJsonPluggableLibrary jsonPluggableLibrary = null;
|
|
301
|
-
|
|
302
|
-
public static IJsonPluggableLibrary JsonPluggableLibrary
|
|
303
|
-
{
|
|
304
|
-
get
|
|
305
|
-
{
|
|
306
|
-
if (jsonPluggableLibrary == null)
|
|
307
|
-
{
|
|
308
|
-
jsonPluggableLibrary = JSONSerializer.JsonPluggableLibrary;
|
|
309
|
-
}
|
|
310
|
-
return jsonPluggableLibrary;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
set
|
|
314
|
-
{
|
|
315
|
-
if (value is IJsonPluggableLibrary)
|
|
316
|
-
{
|
|
317
|
-
jsonPluggableLibrary = value;
|
|
318
|
-
}
|
|
319
|
-
else
|
|
320
|
-
{
|
|
321
|
-
jsonPluggableLibrary = null;
|
|
322
|
-
throw new ArgumentException("Missing or Incorrect JsonPluggableLibrary value");
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
public string Origin
|
|
328
|
-
{
|
|
329
|
-
get
|
|
330
|
-
{
|
|
331
|
-
return origin;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
set
|
|
335
|
-
{
|
|
336
|
-
origin = value;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
private string sessionUUID = "";
|
|
341
|
-
|
|
342
|
-
public string SessionUUID
|
|
343
|
-
{
|
|
344
|
-
get
|
|
345
|
-
{
|
|
346
|
-
if (string.IsNullOrEmpty(sessionUUID) || string.IsNullOrEmpty(sessionUUID.Trim()))
|
|
347
|
-
{
|
|
348
|
-
sessionUUID = Guid.NewGuid().ToString();
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
return sessionUUID;
|
|
352
|
-
}
|
|
353
|
-
set
|
|
354
|
-
{
|
|
355
|
-
sessionUUID = value;
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
/// <summary>
|
|
360
|
-
/// This property sets presence expiry timeout.
|
|
361
|
-
/// Presence expiry value in seconds.
|
|
362
|
-
/// </summary>
|
|
363
|
-
public int PresenceHeartbeat
|
|
364
|
-
{
|
|
365
|
-
get
|
|
366
|
-
{
|
|
367
|
-
return pubnubPresenceHeartbeatInSeconds;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
set
|
|
371
|
-
{
|
|
372
|
-
if (value <= 0 || value > 320)
|
|
373
|
-
{
|
|
374
|
-
pubnubPresenceHeartbeatInSeconds = 0;
|
|
375
|
-
}
|
|
376
|
-
else
|
|
377
|
-
{
|
|
378
|
-
pubnubPresenceHeartbeatInSeconds = value;
|
|
379
|
-
}
|
|
380
|
-
if (pubnubPresenceHeartbeatInSeconds != 0)
|
|
381
|
-
{
|
|
382
|
-
presenceHeartbeatIntervalInSeconds = (pubnubPresenceHeartbeatInSeconds / 2) - 1;
|
|
383
|
-
}
|
|
384
|
-
TerminateCurrentSubscriberRequest();
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
public int PresenceHeartbeatInterval
|
|
389
|
-
{
|
|
390
|
-
get
|
|
391
|
-
{
|
|
392
|
-
return presenceHeartbeatIntervalInSeconds;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
set
|
|
396
|
-
{
|
|
397
|
-
presenceHeartbeatIntervalInSeconds = value;
|
|
398
|
-
if (presenceHeartbeatIntervalInSeconds >= pubnubPresenceHeartbeatInSeconds)
|
|
399
|
-
{
|
|
400
|
-
presenceHeartbeatIntervalInSeconds = (pubnubPresenceHeartbeatInSeconds / 2) - 1;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
public LoggingMethod.Level PubnubLogLevel
|
|
406
|
-
{
|
|
407
|
-
get
|
|
408
|
-
{
|
|
409
|
-
return pubnubLogLevel;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
set
|
|
413
|
-
{
|
|
414
|
-
pubnubLogLevel = value;
|
|
415
|
-
LoggingMethod.LogLevel = pubnubLogLevel;
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
public PubnubErrorFilter.Level PubnubErrorLevel
|
|
420
|
-
{
|
|
421
|
-
get
|
|
422
|
-
{
|
|
423
|
-
return errorLevel;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
set
|
|
427
|
-
{
|
|
428
|
-
errorLevel = value;
|
|
429
|
-
PubnubErrorFilter.ErrorLevel = errorLevel;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
string filterExpr;
|
|
434
|
-
public string FilterExpr
|
|
435
|
-
{
|
|
436
|
-
get { return filterExpr; }
|
|
437
|
-
set
|
|
438
|
-
{
|
|
439
|
-
filterExpr = value;
|
|
440
|
-
resetTimetoken = true;
|
|
441
|
-
TerminateCurrentSubscriberRequest();
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
public string Region { get; set; }
|
|
445
|
-
|
|
446
|
-
#endregion
|
|
447
|
-
|
|
448
|
-
#region "Constructors and Destructor"
|
|
449
|
-
|
|
450
|
-
public PubnubUnity(IDependencyProvider provider, string publishKey, string subscribeKey, string secretKey, string cipherKey, bool sslOn, GameObject gob)
|
|
451
|
-
{
|
|
452
|
-
_provider = provider;
|
|
453
|
-
this.Init(publishKey, subscribeKey, secretKey, cipherKey, sslOn, gob);
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
public PubnubUnity(IDependencyProvider provider, string publishKey, string subscribeKey, string secretKey, GameObject gob)
|
|
457
|
-
{
|
|
458
|
-
_provider = provider;
|
|
459
|
-
this.Init(publishKey, subscribeKey, secretKey, "", false, gob);
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
public PubnubUnity(IDependencyProvider provider, string publishKey, string subscribeKey, GameObject gob)
|
|
463
|
-
{
|
|
464
|
-
_provider = provider;
|
|
465
|
-
this.Init(publishKey, subscribeKey, "", "", false, gob);
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
~PubnubUnity()
|
|
469
|
-
{
|
|
470
|
-
LoggingMethod.WriteToLog("Destructing PubnubUnity uuid: " + this.SessionUUID, LoggingMethod.LevelInfo);
|
|
471
|
-
this.CleanUp();
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
#endregion
|
|
475
|
-
|
|
476
|
-
#region "Init"
|
|
477
|
-
|
|
478
|
-
private void Init(string publishKey, string subscribeKey, string secretKey, string cipherKey, bool sslOn, GameObject gob)
|
|
479
|
-
{
|
|
480
|
-
LoggingMethod.LogLevel = pubnubLogLevel;
|
|
481
|
-
PubnubErrorFilter.ErrorLevel = errorLevel;
|
|
482
|
-
|
|
483
|
-
#if (UNITY_IOS)
|
|
484
|
-
Version = string.Format("PubNub-CSharp-UnityIOS/{0}", build);
|
|
485
|
-
#elif (UNITY_STANDALONE_WIN)
|
|
486
|
-
Version = string.Format("PubNub-CSharp-UnityWin/{0}", build);
|
|
487
|
-
#elif (UNITY_STANDALONE_OSX)
|
|
488
|
-
Version = string.Format("PubNub-CSharp-UnityOSX/{0}", build);
|
|
489
|
-
#elif (UNITY_ANDROID)
|
|
490
|
-
Version = string.Format("PubNub-CSharp-UnityAndroid/{0}", build);
|
|
491
|
-
#elif (UNITY_STANDALONE_LINUX)
|
|
492
|
-
Version = string.Format("PubNub-CSharp-UnityLinux/{0}", build);
|
|
493
|
-
#elif (UNITY_WEBPLAYER)
|
|
494
|
-
Version = string.Format("PubNub-CSharp-UnityWeb/{0}", build);
|
|
495
|
-
#elif (UNITY_WEBGL)
|
|
496
|
-
Version = string.Format("PubNub-CSharp-UnityWebGL/{0}", build);
|
|
497
|
-
#else
|
|
498
|
-
Version = string.Format("PubNub-CSharp-Unity5/{0}", build);
|
|
499
|
-
#endif
|
|
500
|
-
LoggingMethod.WriteToLog(Version, LoggingMethod.LevelInfo);
|
|
501
|
-
|
|
502
|
-
gobj = gob;
|
|
503
|
-
coroutine = gobj.AddComponent<CoroutineClass>();
|
|
504
|
-
coroutine.subscribeTimer = SubscribeTimeout;
|
|
505
|
-
coroutine.nonSubscribeTimer = NonSubscribeTimeout;
|
|
506
|
-
coroutine.heartbeatTimer = HeartbeatTimeout;
|
|
507
|
-
coroutine.presenceHeartbeatTimer = HeartbeatTimeout;
|
|
508
|
-
coroutine.heartbeatPauseTimer = NetworkCheckRetryInterval;
|
|
509
|
-
coroutine.presenceHeartbeatPauseTimer = NetworkCheckRetryInterval;
|
|
510
|
-
|
|
511
|
-
this.publishKey = publishKey;
|
|
512
|
-
this.subscribeKey = subscribeKey;
|
|
513
|
-
this.secretKey = secretKey;
|
|
514
|
-
this.cipherKey = cipherKey;
|
|
515
|
-
this.ssl = sslOn;
|
|
516
|
-
|
|
517
|
-
//retriesExceeded = false;
|
|
518
|
-
internetStatus = true;
|
|
519
|
-
resetTimetoken = true;
|
|
520
|
-
publishMessageCounter = new Counter();
|
|
521
|
-
|
|
522
|
-
#if (UNITY_ANDROID || UNITY_STANDALONE || UNITY_IOS)
|
|
523
|
-
ServicePointManager.ServerCertificateValidationCallback = ValidatorUnity;
|
|
524
|
-
#endif
|
|
525
|
-
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
#endregion
|
|
529
|
-
|
|
530
|
-
#region "ValidatorUnity"
|
|
531
|
-
|
|
532
|
-
#if (UNITY_ANDROID || MONOTOUCH || __IOS__ || UNITY_STANDALONE || UNITY_IOS)
|
|
533
|
-
/// <summary>
|
|
534
|
-
/// Workaround for the bug described here
|
|
535
|
-
/// https://bugzilla.xamarin.com/show_bug.cgi?id=6501
|
|
536
|
-
/// </summary>
|
|
537
|
-
/// <param name="sender">Sender.</param>
|
|
538
|
-
/// <param name="certificate">Certificate.</param>
|
|
539
|
-
/// <param name="chain">Chain.</param>
|
|
540
|
-
/// <param name="sslPolicyErrors">Ssl policy errors.</param>
|
|
541
|
-
static bool ValidatorUnity (object sender,
|
|
542
|
-
System.Security.Cryptography.X509Certificates.X509Certificate
|
|
543
|
-
certificate,
|
|
544
|
-
System.Security.Cryptography.X509Certificates.X509Chain chain,
|
|
545
|
-
System.Net.Security.SslPolicyErrors sslPolicyErrors)
|
|
546
|
-
{
|
|
547
|
-
return true;
|
|
548
|
-
}
|
|
549
|
-
#endif
|
|
550
|
-
#endregion
|
|
551
|
-
|
|
552
|
-
#region "PubNub API Channel Methods"
|
|
553
|
-
|
|
554
|
-
#region "Subscribe"
|
|
555
|
-
|
|
556
|
-
public void Subscribe<T>(string channel, string channelGroup, long timetoken, Action<T> userCallback, Action<T> connectCallback,
|
|
557
|
-
Action<T> wildcardPresenceCallback, Action<PubnubClientError> errorCallback)
|
|
558
|
-
{
|
|
559
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, requested subscribe for channel={1}, channelGroup={2}",
|
|
560
|
-
DateTime.Now.ToString(), channel, channelGroup), LoggingMethod.LevelInfo);
|
|
561
|
-
|
|
562
|
-
MultiChannelSubscribeInit<T>(ResponseType.SubscribeV2, channel, channelGroup, timetoken, userCallback, connectCallback,
|
|
563
|
-
errorCallback, wildcardPresenceCallback);
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
#endregion
|
|
567
|
-
|
|
568
|
-
#region "Publish"
|
|
569
|
-
|
|
570
|
-
public bool Publish<T>(string channel, object message, bool storeInHistory, Dictionary<string, string> metadata,
|
|
571
|
-
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
572
|
-
{
|
|
573
|
-
string jsonMessage = (enableJsonEncodingForPublish) ? Helpers.JsonEncodePublishMsg(message, this.cipherKey, JsonPluggableLibrary) : message.ToString();
|
|
574
|
-
string jsonMetadata = string.Empty;
|
|
575
|
-
if (metadata != null)
|
|
576
|
-
{
|
|
577
|
-
jsonMetadata = Helpers.JsonEncodePublishMsg(metadata, "", JsonPluggableLibrary);
|
|
578
|
-
}
|
|
579
|
-
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null, userCallback, null, errorCallback, null, null);
|
|
580
|
-
|
|
581
|
-
string request = BuildRequests.BuildPublishRequest(channel, jsonMessage, storeInHistory, this.SessionUUID,
|
|
582
|
-
this.ssl, this.Origin, this.AuthenticationKey, this.publishKey, this.subscribeKey, this.cipherKey,
|
|
583
|
-
this.secretKey, jsonMetadata, this.publishMessageCounter.NextValue());
|
|
584
|
-
|
|
585
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity, ResponseType.Publish,
|
|
586
|
-
false, 0, false, 0, null);
|
|
587
|
-
|
|
588
|
-
return UrlProcessRequest<T>(request, requestState);
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
#endregion
|
|
592
|
-
|
|
593
|
-
#region "Presence"
|
|
594
|
-
|
|
595
|
-
public void Presence<T>(string channel, string channelGroup, long timetoken, Action<T> userCallback, Action<T> connectCallback,
|
|
596
|
-
Action<PubnubClientError> errorCallback)
|
|
597
|
-
{
|
|
598
|
-
|
|
599
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, Presence: requested presence for channel={1}, channelGroup={2}",
|
|
600
|
-
DateTime.Now.ToString(), channel, channelGroup), LoggingMethod.LevelInfo);
|
|
601
|
-
|
|
602
|
-
MultiChannelSubscribeInit<T>(ResponseType.PresenceV2, channel, channelGroup, timetoken, userCallback, connectCallback, errorCallback, null);
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
#endregion
|
|
606
|
-
|
|
607
|
-
#region "Detailed History"
|
|
608
|
-
|
|
609
|
-
public bool DetailedHistory<T>(string channel, long start, long end, int count, bool reverse, bool includeToken,
|
|
610
|
-
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
611
|
-
{
|
|
612
|
-
string[] channels = new string[] { channel };
|
|
613
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, DetailedHistory: channels={1}, channel={2}", DateTime.Now.ToString(), channels.Length, channel), LoggingMethod.LevelInfo);
|
|
614
|
-
|
|
615
|
-
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity<T>(channels, false, false, null, userCallback, null, errorCallback, null, null);
|
|
616
|
-
|
|
617
|
-
string request = BuildRequests.BuildDetailedHistoryRequest(channel, start, end, count, reverse, includeToken, this.SessionUUID,
|
|
618
|
-
this.ssl, this.Origin, this.AuthenticationKey, this.subscribeKey);
|
|
619
|
-
|
|
620
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity, ResponseType.DetailedHistory, false,
|
|
621
|
-
0, false, 0, null);
|
|
622
|
-
|
|
623
|
-
return UrlProcessRequest<T>(request, requestState);
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
#endregion
|
|
627
|
-
|
|
628
|
-
#region "HereNow"
|
|
629
|
-
|
|
630
|
-
public bool HereNow<T>(string channel, string channelGroup, bool showUUIDList, bool includeUserState, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
631
|
-
{
|
|
632
|
-
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null, userCallback, null, errorCallback, null, null);
|
|
633
|
-
|
|
634
|
-
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { channelGroup }, false, true, null, userCallback, null, errorCallback, null, null);
|
|
635
|
-
|
|
636
|
-
channelEntity.AddRange(channelGroupEntity);
|
|
637
|
-
|
|
638
|
-
string request = BuildRequests.BuildHereNowRequest(channel, channelGroup, showUUIDList, includeUserState, this.SessionUUID,
|
|
639
|
-
this.ssl, this.Origin, this.AuthenticationKey, this.subscribeKey);
|
|
640
|
-
|
|
641
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity, ResponseType.HereNow, false,
|
|
642
|
-
0, false, 0, null);
|
|
643
|
-
|
|
644
|
-
return UrlProcessRequest<T>(request, requestState);
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
#endregion
|
|
648
|
-
|
|
649
|
-
#region "Global Here Now"
|
|
650
|
-
|
|
651
|
-
public bool GlobalHereNow<T>(bool showUUIDList, bool includeUserState, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
652
|
-
{
|
|
653
|
-
string request = BuildRequests.BuildGlobalHereNowRequest(showUUIDList, includeUserState, this.SessionUUID,
|
|
654
|
-
this.ssl, this.Origin, this.AuthenticationKey, this.subscribeKey);
|
|
655
|
-
|
|
656
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback,
|
|
657
|
-
ResponseType.GlobalHereNow, false, 0, false, 0, null, "");
|
|
658
|
-
|
|
659
|
-
return UrlProcessRequest<T>(request, requestState);
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
#endregion
|
|
663
|
-
|
|
664
|
-
#region "WhereNow"
|
|
665
|
-
|
|
666
|
-
public void WhereNow<T>(string uuid, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
667
|
-
{
|
|
668
|
-
if (string.IsNullOrEmpty(uuid))
|
|
669
|
-
{
|
|
670
|
-
uuid = this.SessionUUID;
|
|
671
|
-
}
|
|
672
|
-
string request = BuildRequests.BuildWhereNowRequest(uuid, this.SessionUUID,
|
|
673
|
-
this.ssl, this.Origin, this.AuthenticationKey, this.subscribeKey);
|
|
674
|
-
|
|
675
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback, ResponseType.WhereNow, false,
|
|
676
|
-
0, false, 0, null, uuid);
|
|
677
|
-
|
|
678
|
-
UrlProcessRequest<T>(request, requestState);
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
#endregion
|
|
682
|
-
|
|
683
|
-
#region "Unsubscribe Presence And Subscribe"
|
|
684
|
-
|
|
685
|
-
public void PresenceUnsubscribe<T>(string channel, string channelGroup, Action<T> userCallback, Action<T> connectCallback, Action<T> disconnectCallback,
|
|
686
|
-
Action<PubnubClientError> errorCallback)
|
|
687
|
-
{
|
|
688
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, PresenceUnsubscribe: requested presence-unsubscribe for channel(s)={1}, channelGroup={2}",
|
|
689
|
-
DateTime.Now.ToString(), channel, channelGroup), LoggingMethod.LevelInfo);
|
|
690
|
-
MultiChannelUnsubscribeInit<T>(ResponseType.PresenceUnsubscribe, channel, channelGroup, userCallback,
|
|
691
|
-
connectCallback, disconnectCallback, errorCallback);
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
/// <summary>
|
|
695
|
-
/// To unsubscribe a channel
|
|
696
|
-
/// </summary>
|
|
697
|
-
/// <typeparam name="T"></typeparam>
|
|
698
|
-
/// <param name="channel"></param>
|
|
699
|
-
/// <param name="userCallback"></param>
|
|
700
|
-
/// <param name="connectCallback"></param>
|
|
701
|
-
/// <param name="disconnectCallback"></param>
|
|
702
|
-
/// <param name="errorCallback"></param>
|
|
703
|
-
public void Unsubscribe<T>(string channel, string channelGroup, Action<T> userCallback, Action<T> connectCallback, Action<T> disconnectCallback,
|
|
704
|
-
Action<T> wildcardPresenceCallback, Action<PubnubClientError> errorCallback)
|
|
705
|
-
{
|
|
706
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, Unsubscribe: requested unsubscribe for channel(s)={1}, channelGroup={2}",
|
|
707
|
-
DateTime.Now.ToString(), channel, channelGroup), LoggingMethod.LevelInfo);
|
|
708
|
-
MultiChannelUnsubscribeInit<T>(ResponseType.Unsubscribe, channel, channelGroup, userCallback,
|
|
709
|
-
connectCallback, disconnectCallback, errorCallback);
|
|
710
|
-
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
#endregion
|
|
714
|
-
|
|
715
|
-
#region "Time"
|
|
716
|
-
|
|
717
|
-
public bool Time<T>(Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
718
|
-
{
|
|
719
|
-
string request = BuildRequests.BuildTimeRequest(this.SessionUUID, this.ssl, this.Origin);
|
|
720
|
-
|
|
721
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback, ResponseType.Time, false,
|
|
722
|
-
0, false, 0, null, "");
|
|
723
|
-
return UrlProcessRequest<T>(request, requestState);
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
#endregion
|
|
727
|
-
|
|
728
|
-
#region "PAM"
|
|
729
|
-
|
|
730
|
-
#region "Grant Access"
|
|
731
|
-
|
|
732
|
-
public bool GrantAccess<T>(string channel, string authenticationKey, bool read, bool write, int ttl, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
733
|
-
{
|
|
734
|
-
if (ttl < 0)
|
|
735
|
-
ttl = 1440;
|
|
736
|
-
|
|
737
|
-
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null,
|
|
738
|
-
userCallback, null, errorCallback, null, null);
|
|
739
|
-
|
|
740
|
-
string request = BuildRequests.BuildGrantAccessRequest(channel, read, write, ttl, this.SessionUUID,
|
|
741
|
-
this.ssl, this.Origin, authenticationKey, this.publishKey, this.subscribeKey, this.cipherKey, this.secretKey);
|
|
742
|
-
|
|
743
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity, ResponseType.GrantAccess, false,
|
|
744
|
-
0, false, 0, null, "", userCallback, errorCallback);
|
|
745
|
-
|
|
746
|
-
return UrlProcessRequest<T>(request, requestState);
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
#endregion
|
|
750
|
-
|
|
751
|
-
#region "Grant Presence Access"
|
|
752
|
-
|
|
753
|
-
public bool GrantPresenceAccess<T>(string channel, string authenticationKey, bool read, bool write, int ttl, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
754
|
-
{
|
|
755
|
-
string[] multiChannels = channel.Split(',');
|
|
756
|
-
if (multiChannels.Length > 0)
|
|
757
|
-
{
|
|
758
|
-
for (int index = 0; index < multiChannels.Length; index++)
|
|
759
|
-
{
|
|
760
|
-
if (!string.IsNullOrEmpty(multiChannels[index]) && multiChannels[index].Trim().Length > 0)
|
|
761
|
-
{
|
|
762
|
-
multiChannels[index] = string.Format("{0}{1}", multiChannels[index], Utility.PresenceChannelSuffix);
|
|
763
|
-
}
|
|
764
|
-
else
|
|
765
|
-
{
|
|
766
|
-
throw new MissingMemberException("Invalid channel");
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
string presenceChannel = string.Join(",", multiChannels);
|
|
771
|
-
return GrantAccess(presenceChannel, authenticationKey, read, write, ttl, userCallback, errorCallback);
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
#endregion
|
|
775
|
-
|
|
776
|
-
#region "Audit Access"
|
|
777
|
-
|
|
778
|
-
public void AuditAccess<T>(string channel, string authenticationKey, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
779
|
-
{
|
|
780
|
-
string request = BuildRequests.BuildAuditAccessRequest(channel, this.SessionUUID,
|
|
781
|
-
this.ssl, this.Origin, authenticationKey, this.publishKey, this.subscribeKey, this.cipherKey, this.secretKey);
|
|
782
|
-
|
|
783
|
-
RequestState<T> requestState = null;
|
|
784
|
-
if (string.IsNullOrEmpty(channel))
|
|
785
|
-
{
|
|
786
|
-
requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback,
|
|
787
|
-
ResponseType.AuditAccess, false, 0, false, 0, null, "");
|
|
788
|
-
}
|
|
789
|
-
else
|
|
790
|
-
{
|
|
791
|
-
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null,
|
|
792
|
-
userCallback, null, errorCallback, null, null);
|
|
793
|
-
|
|
794
|
-
requestState = BuildRequests.BuildRequestState<T>(channelEntity,
|
|
795
|
-
ResponseType.AuditAccess, false, 0, false, 0, null, "", userCallback, errorCallback);
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
UrlProcessRequest<T>(request, requestState);
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
#endregion
|
|
802
|
-
|
|
803
|
-
#region "Audit Presence"
|
|
804
|
-
|
|
805
|
-
public void AuditPresenceAccess<T>(string channel, string authenticationKey, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
806
|
-
{
|
|
807
|
-
string[] multiChannels = channel.Split(',');
|
|
808
|
-
if (multiChannels.Length > 0)
|
|
809
|
-
{
|
|
810
|
-
for (int index = 0; index < multiChannels.Length; index++)
|
|
811
|
-
{
|
|
812
|
-
multiChannels[index] = string.Format("{0}{1}", multiChannels[index], Utility.PresenceChannelSuffix);
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
string presenceChannel = string.Join(",", multiChannels);
|
|
816
|
-
AuditAccess<T>(presenceChannel, authenticationKey, userCallback, errorCallback);
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
#endregion
|
|
820
|
-
|
|
821
|
-
#endregion
|
|
822
|
-
|
|
823
|
-
#region "Set User State"
|
|
824
|
-
|
|
825
|
-
public void SetUserState<T>(string channel, string channelGroup, string uuid, string jsonUserState,
|
|
826
|
-
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
827
|
-
{
|
|
828
|
-
if (!JsonPluggableLibrary.IsDictionaryCompatible(jsonUserState))
|
|
829
|
-
{
|
|
830
|
-
throw new MissingMemberException("Missing json format for user state");
|
|
831
|
-
}
|
|
832
|
-
else
|
|
833
|
-
{
|
|
834
|
-
IDictionary<string, object> deserializeUserState = JsonPluggableLibrary.DeserializeToDictionaryOfObject(jsonUserState);
|
|
835
|
-
if (deserializeUserState == null)
|
|
836
|
-
{
|
|
837
|
-
throw new MissingMemberException("Missing JSON formatted user state");
|
|
838
|
-
}
|
|
839
|
-
else
|
|
840
|
-
{
|
|
841
|
-
string userState = "";
|
|
842
|
-
List<ChannelEntity> channelEntities;
|
|
843
|
-
if (Helpers.CheckAndAddExistingUserState<T>(channel, channelGroup,
|
|
844
|
-
deserializeUserState, userCallback, errorCallback, errorLevel, false,
|
|
845
|
-
out userState, out channelEntities, _provider
|
|
846
|
-
))
|
|
847
|
-
{
|
|
848
|
-
SharedSetUserState<T>(channel, channelGroup,
|
|
849
|
-
channelEntities, uuid, userState);
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
public void SetUserState<T>(string channel, string channelGroup, string uuid,
|
|
856
|
-
KeyValuePair<string, object> keyValuePair,
|
|
857
|
-
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
858
|
-
{
|
|
859
|
-
string userState = "";
|
|
860
|
-
List<ChannelEntity> channelEntities;
|
|
861
|
-
if (Helpers.CheckAndAddExistingUserState<T>(channel, channelGroup,
|
|
862
|
-
new Dictionary<string, object> { { keyValuePair.Key, keyValuePair.Value } }, userCallback,
|
|
863
|
-
errorCallback, errorLevel, true, out userState, out channelEntities, _provider
|
|
864
|
-
))
|
|
865
|
-
{
|
|
866
|
-
|
|
867
|
-
SharedSetUserState<T>(channel, channelGroup, channelEntities, uuid, userState);
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
#endregion
|
|
872
|
-
|
|
873
|
-
#region "User State"
|
|
874
|
-
private void SharedSetUserState<T>(string channel, string channelGroup,
|
|
875
|
-
List<ChannelEntity> channelEntities, string uuid, string jsonUserState
|
|
876
|
-
)
|
|
877
|
-
{
|
|
878
|
-
if (string.IsNullOrEmpty(uuid))
|
|
879
|
-
{
|
|
880
|
-
uuid = this.SessionUUID;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
string request = BuildRequests.BuildSetUserStateRequest(channel, channelGroup, jsonUserState, uuid, this.SessionUUID,
|
|
884
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
885
|
-
|
|
886
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntities, ResponseType.SetUserState, false,
|
|
887
|
-
0, false, 0, null);
|
|
888
|
-
|
|
889
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, SharedSetUserState: channelEntities count {1}, " +
|
|
890
|
-
"channelGroup: {2}, channel: {3}, uuid: {4}, sessionUUID: {5}",
|
|
891
|
-
DateTime.Now.ToString(), (channelEntities != null) ? channelEntities.Count.ToString() : "null",
|
|
892
|
-
channelGroup, channel, uuid, this.SessionUUID
|
|
893
|
-
), LoggingMethod.LevelInfo);
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
UrlProcessRequest<T>(request, requestState);
|
|
897
|
-
|
|
898
|
-
//bounce the long-polling subscribe requests to update user state
|
|
899
|
-
TerminateCurrentSubscriberRequest<T>();
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
#endregion
|
|
903
|
-
|
|
904
|
-
#region "Get User State"
|
|
905
|
-
|
|
906
|
-
public void GetUserState<T>(string channel, string channelGroup, string uuid, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
907
|
-
{
|
|
908
|
-
if (string.IsNullOrEmpty(uuid))
|
|
909
|
-
{
|
|
910
|
-
uuid = this.SessionUUID;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null,
|
|
914
|
-
userCallback, null, errorCallback, null, null);
|
|
915
|
-
|
|
916
|
-
List<ChannelEntity> channelGroupsEntity = Helpers.CreateChannelEntity(new string[] { channelGroup }, false, true, null,
|
|
917
|
-
userCallback, null, errorCallback, null, null);
|
|
918
|
-
|
|
919
|
-
channelEntity.AddRange(channelGroupsEntity);
|
|
920
|
-
|
|
921
|
-
string request = BuildRequests.BuildGetUserStateRequest(channel, channelGroup, uuid, this.SessionUUID,
|
|
922
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
923
|
-
|
|
924
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity, ResponseType.GetUserState, false,
|
|
925
|
-
0, false, 0, null);
|
|
926
|
-
|
|
927
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, GetUserState: channelEntities count {1}, " +
|
|
928
|
-
"channelGroup: {2}, channel: {3}, uuid: {4}, sessionUUID: {5} ",
|
|
929
|
-
DateTime.Now.ToString(), (channelEntity != null) ? channelEntity.Count.ToString() : "null", channelGroup, channel,
|
|
930
|
-
uuid, this.SessionUUID
|
|
931
|
-
), LoggingMethod.LevelInfo);
|
|
932
|
-
|
|
933
|
-
UrlProcessRequest<T>(request, requestState);
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
#endregion
|
|
937
|
-
|
|
938
|
-
#region "MobilePush"
|
|
939
|
-
|
|
940
|
-
public void RegisterDeviceForPush<T>(string channel, PushTypeService pushType, string pushToken, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
941
|
-
{
|
|
942
|
-
string request = BuildRequests.BuildRegisterDevicePushRequest(channel, pushType, pushToken, this.SessionUUID,
|
|
943
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
944
|
-
|
|
945
|
-
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null,
|
|
946
|
-
userCallback, null, errorCallback, null, null);
|
|
947
|
-
|
|
948
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity,
|
|
949
|
-
ResponseType.PushRegister, false, 0, false, 0, null);
|
|
950
|
-
|
|
951
|
-
UrlProcessRequest<T>(request, requestState);
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
public void UnregisterDeviceForPush<T>(PushTypeService pushType, string pushToken, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
955
|
-
{
|
|
956
|
-
string request = BuildRequests.BuildUnregisterDevicePushRequest(pushType, pushToken, this.SessionUUID,
|
|
957
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
958
|
-
|
|
959
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback,
|
|
960
|
-
ResponseType.PushUnregister, false, 0, false, 0, null, "");
|
|
961
|
-
|
|
962
|
-
UrlProcessRequest<T>(request, requestState);
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
public void RemoveChannelForDevicePush<T>(string channel, PushTypeService pushType, string pushToken, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
966
|
-
{
|
|
967
|
-
string request = BuildRequests.BuildRemoveChannelPushRequest(channel, pushType, pushToken, this.SessionUUID,
|
|
968
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
969
|
-
|
|
970
|
-
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null,
|
|
971
|
-
userCallback, null, errorCallback, null, null);
|
|
972
|
-
|
|
973
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity,
|
|
974
|
-
ResponseType.PushRemove, false, 0, false, 0, null);
|
|
975
|
-
|
|
976
|
-
UrlProcessRequest<T>(request, requestState);
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
public void GetChannelsForDevicePush<T>(PushTypeService pushType, string pushToken, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
980
|
-
{
|
|
981
|
-
string request = BuildRequests.BuildGetChannelsPushRequest(pushType, pushToken, this.SessionUUID,
|
|
982
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
983
|
-
|
|
984
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback,
|
|
985
|
-
ResponseType.PushGet, false, 0, false, 0, null, "");
|
|
986
|
-
|
|
987
|
-
UrlProcessRequest<T>(request, requestState);
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
#endregion
|
|
991
|
-
|
|
992
|
-
#region "Channel Groups"
|
|
993
|
-
public void AddChannelsToChannelGroup<T>(string[] channels, string nameSpace, string groupName,
|
|
994
|
-
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
995
|
-
{
|
|
996
|
-
string request = BuildRequests.BuildAddChannelsToChannelGroupRequest(channels, nameSpace, groupName, this.SessionUUID,
|
|
997
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
998
|
-
|
|
999
|
-
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { groupName }, false, true, null,
|
|
1000
|
-
userCallback, null, errorCallback, null, null);
|
|
1001
|
-
|
|
1002
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1003
|
-
ResponseType.ChannelGroupAdd, false, 0, false, 0, null
|
|
1004
|
-
|
|
1005
|
-
);
|
|
1006
|
-
|
|
1007
|
-
UrlProcessRequest<T>(request, requestState);
|
|
1008
|
-
}
|
|
1009
|
-
|
|
1010
|
-
public void RemoveChannelsFromChannelGroup<T>(string[] channels, string nameSpace, string groupName,
|
|
1011
|
-
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1012
|
-
{
|
|
1013
|
-
string request = BuildRequests.BuildRemoveChannelsFromChannelGroupRequest(channels, nameSpace, groupName, this.SessionUUID,
|
|
1014
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
1015
|
-
|
|
1016
|
-
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { groupName }, false, true, null,
|
|
1017
|
-
userCallback, null, errorCallback, null, null);
|
|
1018
|
-
|
|
1019
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1020
|
-
ResponseType.ChannelGroupRemove, false, 0, false, 0, null
|
|
1021
|
-
);
|
|
1022
|
-
|
|
1023
|
-
UrlProcessRequest<T>(request, requestState);
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
public void RemoveChannelGroup<T>(string nameSpace, string groupName, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1027
|
-
{
|
|
1028
|
-
string request = BuildRequests.BuildRemoveChannelsFromChannelGroupRequest(null, nameSpace, groupName, this.SessionUUID,
|
|
1029
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
1030
|
-
|
|
1031
|
-
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { groupName }, false, true, null,
|
|
1032
|
-
userCallback, null, errorCallback, null, null);
|
|
1033
|
-
|
|
1034
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1035
|
-
ResponseType.ChannelGroupRemove, false, 0, false, 0, null
|
|
1036
|
-
);
|
|
1037
|
-
|
|
1038
|
-
UrlProcessRequest<T>(request, requestState);
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
public void GetChannelsForChannelGroup<T>(string nameSpace, string groupName, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1042
|
-
{
|
|
1043
|
-
string request = BuildRequests.BuildGetChannelsForChannelGroupRequest(nameSpace, groupName, false, this.SessionUUID,
|
|
1044
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
1045
|
-
|
|
1046
|
-
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { groupName }, false, true, null,
|
|
1047
|
-
userCallback, null, errorCallback, null, null);
|
|
1048
|
-
|
|
1049
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1050
|
-
ResponseType.ChannelGroupGet, false, 0, false, 0, null
|
|
1051
|
-
);
|
|
1052
|
-
|
|
1053
|
-
UrlProcessRequest<T>(request, requestState);
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
public void GetAllChannelGroups<T>(string nameSpace, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1057
|
-
{
|
|
1058
|
-
string request = BuildRequests.BuildGetChannelsForChannelGroupRequest(nameSpace, "", true, this.SessionUUID,
|
|
1059
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
1060
|
-
|
|
1061
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback,
|
|
1062
|
-
ResponseType.ChannelGroupGet, false, 0, false, 0, null,
|
|
1063
|
-
""
|
|
1064
|
-
);
|
|
1065
|
-
|
|
1066
|
-
UrlProcessRequest<T>(request, requestState);
|
|
1067
|
-
}
|
|
1068
|
-
|
|
1069
|
-
public void ChannelGroupAuditAccess<T>(string channelGroup, string authenticationKey, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1070
|
-
{
|
|
1071
|
-
string request = BuildRequests.BuildChannelGroupAuditAccessRequest(channelGroup, this.SessionUUID,
|
|
1072
|
-
this.ssl, this.Origin, authenticationKey, this.publishKey, this.subscribeKey, this.cipherKey, this.secretKey);
|
|
1073
|
-
|
|
1074
|
-
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { channelGroup }, false, true, null,
|
|
1075
|
-
userCallback, null, errorCallback, null, null);
|
|
1076
|
-
|
|
1077
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1078
|
-
ResponseType.ChannelGroupAuditAccess, false, 0, false, 0, null
|
|
1079
|
-
);
|
|
1080
|
-
|
|
1081
|
-
UrlProcessRequest<T>(request, requestState);
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
public bool ChannelGroupGrantAccess<T>(string channelGroup, string authenticationKey, bool read, bool write, bool manage,
|
|
1085
|
-
int ttl, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1086
|
-
{
|
|
1087
|
-
if (ttl < 0)
|
|
1088
|
-
ttl = 1440;
|
|
1089
|
-
|
|
1090
|
-
string request = BuildRequests.BuildChannelGroupGrantAccessRequest(channelGroup, read, write, manage, ttl, this.SessionUUID,
|
|
1091
|
-
this.ssl, this.Origin, authenticationKey, this.publishKey, this.subscribeKey, this.cipherKey, this.secretKey);
|
|
1092
|
-
|
|
1093
|
-
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { channelGroup }, false, true, null,
|
|
1094
|
-
userCallback, null, errorCallback, null, null);
|
|
1095
|
-
|
|
1096
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1097
|
-
ResponseType.ChannelGroupGrantAccess, false, 0, false, 0, null
|
|
1098
|
-
);
|
|
1099
|
-
|
|
1100
|
-
return UrlProcessRequest<T>(request, requestState);
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
#endregion
|
|
1104
|
-
|
|
1105
|
-
#region "PubNub API Other Methods"
|
|
1106
|
-
|
|
1107
|
-
public void TerminateCurrentSubscriberRequest()
|
|
1108
|
-
{
|
|
1109
|
-
TerminateCurrentSubscriberRequest<object>();
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
public void TerminateCurrentSubscriberRequest<T>()
|
|
1113
|
-
{
|
|
1114
|
-
StopHeartbeat<T>();
|
|
1115
|
-
StopPresenceHeartbeat<T>();
|
|
1116
|
-
ResetInternetCheckSettings();
|
|
1117
|
-
RequestState<T> reqState = StoredRequestState.GetStoredRequestState(CurrentRequestType.Subscribe) as RequestState<T>;
|
|
1118
|
-
if (reqState == null)
|
|
1119
|
-
{
|
|
1120
|
-
if (typeof(T).Equals(typeof(object)))
|
|
1121
|
-
{
|
|
1122
|
-
RequestState<string> reqStateStr = StoredRequestState.GetStoredRequestState(CurrentRequestType.Subscribe) as RequestState<string>;
|
|
1123
|
-
coroutine.BounceRequest<string>(CurrentRequestType.Subscribe, reqStateStr, true);
|
|
1124
|
-
}
|
|
1125
|
-
else if (typeof(T).Equals(typeof(string)))
|
|
1126
|
-
{
|
|
1127
|
-
RequestState<object> reqStateObj = StoredRequestState.GetStoredRequestState(CurrentRequestType.Subscribe) as RequestState<object>;
|
|
1128
|
-
coroutine.BounceRequest<object>(CurrentRequestType.Subscribe, reqStateObj, true);
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
else
|
|
1132
|
-
{
|
|
1133
|
-
coroutine.BounceRequest<T>(CurrentRequestType.Subscribe, reqState, true);
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0} TerminateCurrentSubscriberRequest RequestState {1}", DateTime.Now.ToString(),
|
|
1137
|
-
(reqState == null) ? "null" : reqState.ID.ToString()
|
|
1138
|
-
), LoggingMethod.LevelInfo);
|
|
1139
|
-
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
public void EndPendingRequests<T>()
|
|
1143
|
-
{
|
|
1144
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, EndPendingRequests: ending open requests.", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1145
|
-
coroutine.BounceRequest<T>(CurrentRequestType.Subscribe, null, false);
|
|
1146
|
-
coroutine.BounceRequest<T>(CurrentRequestType.NonSubscribe, null, false);
|
|
1147
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, EndPendingRequests: Request bounced.", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1148
|
-
StopHeartbeat();
|
|
1149
|
-
StopPresenceHeartbeat();
|
|
1150
|
-
ResetInternetCheckSettings();
|
|
1151
|
-
Subscription.CleanUp();
|
|
1152
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, EndPendingRequests: Subscription cleanup complete.", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
public void ResetPublishMessageCounter()
|
|
1156
|
-
{
|
|
1157
|
-
publishMessageCounter.Reset();
|
|
1158
|
-
}
|
|
1159
|
-
|
|
1160
|
-
/// <summary>
|
|
1161
|
-
/// must be called on reset.
|
|
1162
|
-
/// </summary>
|
|
1163
|
-
public void CleanUp()
|
|
1164
|
-
{
|
|
1165
|
-
publishMessageCounter.Reset();
|
|
1166
|
-
|
|
1167
|
-
LoggingMethod.WriteToLog("CleanUp: Destructing coroutine", LoggingMethod.LevelInfo);
|
|
1168
|
-
if (coroutine != null)
|
|
1169
|
-
{
|
|
1170
|
-
UnityEngine.Object.Destroy(coroutine);
|
|
1171
|
-
}
|
|
1172
|
-
LoggingMethod.WriteToLog("CleanUp: Destructing GameObject", LoggingMethod.LevelInfo);
|
|
1173
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0} Clean up complete.", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
#endregion
|
|
1177
|
-
|
|
1178
|
-
#region "Change UUID"
|
|
1179
|
-
|
|
1180
|
-
public void ChangeUUID<T>(string newUUID)
|
|
1181
|
-
{
|
|
1182
|
-
if (string.IsNullOrEmpty(newUUID) || this.SessionUUID == newUUID)
|
|
1183
|
-
{
|
|
1184
|
-
return;
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
uuidChanged = true;
|
|
1188
|
-
|
|
1189
|
-
string oldUUID = SessionUUID;
|
|
1190
|
-
|
|
1191
|
-
SessionUUID = newUUID;
|
|
1192
|
-
|
|
1193
|
-
if (Subscription.HasChannelsOrChannelGroups)
|
|
1194
|
-
{
|
|
1195
|
-
string request = BuildRequests.BuildMultiChannelLeaveRequest(Helpers.GetNamesFromChannelEntities(Subscription.AllChannels, false),
|
|
1196
|
-
Helpers.GetNamesFromChannelEntities(Subscription.AllChannelGroups, true), oldUUID,
|
|
1197
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey, _provider);
|
|
1198
|
-
|
|
1199
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(Subscription.AllSubscribedChannelsAndChannelGroups,
|
|
1200
|
-
ResponseType.Leave, false, 0, false, 0, null);
|
|
1201
|
-
|
|
1202
|
-
UrlProcessRequest<T>(request, requestState);
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
TerminateCurrentSubscriberRequest<T>();
|
|
1206
|
-
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
#endregion
|
|
1210
|
-
|
|
1211
|
-
#endregion
|
|
1212
|
-
|
|
1213
|
-
#region "Heartbeats"
|
|
1214
|
-
|
|
1215
|
-
void StopHeartbeat()
|
|
1216
|
-
{
|
|
1217
|
-
StopHeartbeat<object>();
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
void StopHeartbeat<T>()
|
|
1221
|
-
{
|
|
1222
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, Stopping Heartbeat ", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1223
|
-
keepHearbeatRunning = false;
|
|
1224
|
-
isHearbeatRunning = false;
|
|
1225
|
-
coroutine.HeartbeatCoroutineComplete -= CoroutineCompleteHandler<T>;
|
|
1226
|
-
coroutine.BounceRequest<T>(CurrentRequestType.Heartbeat, null, false);
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
void StopPresenceHeartbeat()
|
|
1230
|
-
{
|
|
1231
|
-
StopPresenceHeartbeat<object>();
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
void StopPresenceHeartbeat<T>()
|
|
1235
|
-
{
|
|
1236
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, Stopping PresenceHeartbeat ", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1237
|
-
keepPresenceHearbeatRunning = false;
|
|
1238
|
-
isPresenceHearbeatRunning = false;
|
|
1239
|
-
coroutine.PresenceHeartbeatCoroutineComplete -= CoroutineCompleteHandler<T>;
|
|
1240
|
-
coroutine.BounceRequest<T>(CurrentRequestType.PresenceHeartbeat, null, false);
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
void StartPresenceHeartbeat<T>(bool pause, int pauseTime, RequestState<T> pubnubRequestState)
|
|
1244
|
-
{
|
|
1245
|
-
try
|
|
1246
|
-
{
|
|
1247
|
-
if (Subscription.AllNonPresenceChannelsOrChannelGroups.Count > 0)
|
|
1248
|
-
{
|
|
1249
|
-
isPresenceHearbeatRunning = true;
|
|
1250
|
-
string channelsJsonState = Subscription.CompiledUserState;
|
|
1251
|
-
|
|
1252
|
-
string requestUrl = BuildRequests.BuildPresenceHeartbeatRequest(
|
|
1253
|
-
Helpers.GetNamesFromChannelEntities(Subscription.AllNonPresenceChannelsOrChannelGroups, false),
|
|
1254
|
-
Helpers.GetNamesFromChannelEntities(Subscription.AllNonPresenceChannelsOrChannelGroups, true),
|
|
1255
|
-
channelsJsonState, this.SessionUUID,
|
|
1256
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
1257
|
-
|
|
1258
|
-
coroutine.PresenceHeartbeatCoroutineComplete += CoroutineCompleteHandler<T>;
|
|
1259
|
-
|
|
1260
|
-
//for heartbeat and presence heartbeat treat reconnect as pause
|
|
1261
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(pubnubRequestState.ChannelEntities, ResponseType.PresenceHeartbeat,
|
|
1262
|
-
pause, pubnubRequestState.ID, false, 0, null);
|
|
1263
|
-
StoredRequestState.SetRequestState(CurrentRequestType.PresenceHeartbeat, requestState);
|
|
1264
|
-
coroutine.Run<T>(requestUrl, requestState, HeartbeatTimeout, pauseTime);
|
|
1265
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, StartPresenceHeartbeat: PresenceHeartbeat running for {1}", DateTime.Now.ToString(), pubnubRequestState.ID), LoggingMethod.LevelInfo);
|
|
1266
|
-
|
|
1267
|
-
}
|
|
1268
|
-
}
|
|
1269
|
-
catch (Exception ex)
|
|
1270
|
-
{
|
|
1271
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, StartPresenceHeartbeat: PresenceHeartbeat exception {1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1272
|
-
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
void RunPresenceHeartbeat<T>(bool pause, int pauseTime, RequestState<T> pubnubRequestState)
|
|
1277
|
-
{
|
|
1278
|
-
keepPresenceHearbeatRunning = true;
|
|
1279
|
-
if (!isPresenceHearbeatRunning)
|
|
1280
|
-
{
|
|
1281
|
-
StartPresenceHeartbeat<T>(pause, pauseTime, pubnubRequestState);
|
|
1282
|
-
}
|
|
1283
|
-
else
|
|
1284
|
-
{
|
|
1285
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RunPresenceHeartbeat: PresenceHeartbeat Already Running ", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1286
|
-
}
|
|
1287
|
-
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
void StartHeartbeat<T>(bool pause, int pauseTime, RequestState<T> pubnubRequestState)
|
|
1291
|
-
{
|
|
1292
|
-
try
|
|
1293
|
-
{
|
|
1294
|
-
isHearbeatRunning = true;
|
|
1295
|
-
string requestUrl = BuildRequests.BuildTimeRequest(this.SessionUUID,
|
|
1296
|
-
this.ssl, this.Origin);
|
|
1297
|
-
|
|
1298
|
-
coroutine.HeartbeatCoroutineComplete += CoroutineCompleteHandler<T>;
|
|
1299
|
-
//for heartbeat and presence heartbeat treat reconnect as pause
|
|
1300
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(pubnubRequestState.ChannelEntities,
|
|
1301
|
-
ResponseType.Heartbeat, pause, pubnubRequestState.ID, false, 0, null);
|
|
1302
|
-
StoredRequestState.SetRequestState(CurrentRequestType.Heartbeat, requestState);
|
|
1303
|
-
coroutine.Run<T>(requestUrl, requestState, HeartbeatTimeout, pauseTime);
|
|
1304
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, StartHeartbeat: Heartbeat running for {1}", DateTime.Now.ToString(), pubnubRequestState.ID), LoggingMethod.LevelInfo);
|
|
1305
|
-
|
|
1306
|
-
}
|
|
1307
|
-
catch (Exception ex)
|
|
1308
|
-
{
|
|
1309
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, StartHeartbeat: Heartbeat exception {1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1310
|
-
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
void RunHeartbeat<T>(bool pause, int pauseTime, RequestState<T> pubnubRequestState)
|
|
1315
|
-
{
|
|
1316
|
-
keepHearbeatRunning = true;
|
|
1317
|
-
if (!isHearbeatRunning)
|
|
1318
|
-
{
|
|
1319
|
-
StartHeartbeat<T>(pause, pauseTime, pubnubRequestState);
|
|
1320
|
-
}
|
|
1321
|
-
else
|
|
1322
|
-
{
|
|
1323
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RunHeartbeat: Heartbeat Already Running ", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
#endregion
|
|
1329
|
-
|
|
1330
|
-
#region "Handlers"
|
|
1331
|
-
private void InternetConnectionAvailableHandler<T>(CustomEventArgs<T> cea)
|
|
1332
|
-
{
|
|
1333
|
-
internetStatus = true;
|
|
1334
|
-
//retriesExceeded = false;
|
|
1335
|
-
if (retryCount > 0)
|
|
1336
|
-
{
|
|
1337
|
-
string cbMessage = string.Format("DateTime {0}, InternetConnectionAvailableHandler: Internet Connection Available.", DateTime.Now.ToString());
|
|
1338
|
-
LoggingMethod.WriteToLog(cbMessage, LoggingMethod.LevelInfo);
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
PubnubCallbacks.FireErrorCallbacksForAllChannels<T>(cbMessage, cea.PubnubRequestState,
|
|
1342
|
-
PubnubErrorSeverity.Info, PubnubErrorCode.YesInternet, PubnubErrorLevel);
|
|
1343
|
-
|
|
1344
|
-
MultiplexExceptionHandler<T>(ResponseType.SubscribeV2, false, true);
|
|
1345
|
-
}
|
|
1346
|
-
retryCount = 0;
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
private void HeartbeatHandler<T>(CustomEventArgs<T> cea)
|
|
1350
|
-
{
|
|
1351
|
-
if (cea.IsTimeout || cea.IsError)
|
|
1352
|
-
{
|
|
1353
|
-
RetryLoop<T>(cea.PubnubRequestState);
|
|
1354
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, HeartbeatHandler: Heartbeat timeout={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1355
|
-
|
|
1356
|
-
}
|
|
1357
|
-
else
|
|
1358
|
-
{
|
|
1359
|
-
InternetConnectionAvailableHandler<T>(cea);
|
|
1360
|
-
}
|
|
1361
|
-
isHearbeatRunning = false;
|
|
1362
|
-
if (keepHearbeatRunning)
|
|
1363
|
-
{
|
|
1364
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, HeartbeatHandler: Restarting Heartbeat {1}", DateTime.Now.ToString(), cea.PubnubRequestState.ID), LoggingMethod.LevelInfo);
|
|
1365
|
-
|
|
1366
|
-
if (internetStatus)
|
|
1367
|
-
{
|
|
1368
|
-
RunHeartbeat<T>(true, LocalClientHeartbeatInterval, cea.PubnubRequestState);
|
|
1369
|
-
}
|
|
1370
|
-
else
|
|
1371
|
-
{
|
|
1372
|
-
RunHeartbeat<T>(true, NetworkCheckRetryInterval, cea.PubnubRequestState);
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
private void PresenceHeartbeatHandler<T>(CustomEventArgs<T> cea)
|
|
1378
|
-
{
|
|
1379
|
-
isPresenceHearbeatRunning = false;
|
|
1380
|
-
|
|
1381
|
-
if (cea.IsTimeout || cea.IsError)
|
|
1382
|
-
{
|
|
1383
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, PresenceHeartbeatHandler: Presence Heartbeat timeout={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1384
|
-
}
|
|
1385
|
-
else
|
|
1386
|
-
{
|
|
1387
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, PresenceHeartbeatHandler: Presence Heartbeat response: {1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelInfo);
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
if (keepPresenceHearbeatRunning)
|
|
1392
|
-
{
|
|
1393
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, PresenceHeartbeatHandler: Restarting PresenceHeartbeat ID {1}", DateTime.Now.ToString(), cea.PubnubRequestState.ID), LoggingMethod.LevelInfo);
|
|
1394
|
-
|
|
1395
|
-
RunPresenceHeartbeat<T>(true, PresenceHeartbeatInterval, cea.PubnubRequestState);
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
private void SubscribePresenceHanlder<T>(CustomEventArgs<T> cea)
|
|
1400
|
-
{
|
|
1401
|
-
|
|
1402
|
-
if (cea.IsTimeout || Utility.CheckRequestTimeoutMessageInError(cea))
|
|
1403
|
-
{
|
|
1404
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, SubscribePresenceHanlder: Sub timeout={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1405
|
-
|
|
1406
|
-
}
|
|
1407
|
-
else if (cea.IsError)
|
|
1408
|
-
{
|
|
1409
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, SubscribePresenceHanlder: Sub Error={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1410
|
-
if ((cea.Message.Contains("403"))
|
|
1411
|
-
|| (cea.Message.Contains("451"))
|
|
1412
|
-
|| (cea.Message.Contains("481"))
|
|
1413
|
-
|| (cea.Message.Contains("\"error\":true"))
|
|
1414
|
-
|| (cea.Message.Contains("error: true"))
|
|
1415
|
-
)
|
|
1416
|
-
{
|
|
1417
|
-
requestDelayTime = NetworkCheckRetryInterval;
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
|
|
1421
|
-
UrlProcessResponseCallbackNonAsync<T>(cea);
|
|
1422
|
-
}
|
|
1423
|
-
|
|
1424
|
-
private void NonSubscribeHandler<T>(CustomEventArgs<T> cea)
|
|
1425
|
-
{
|
|
1426
|
-
if (cea.IsTimeout || Utility.CheckRequestTimeoutMessageInError(cea))
|
|
1427
|
-
{
|
|
1428
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, NonSubscribeHandler: NonSub timeout={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1429
|
-
ExceptionHandlers.UrlRequestCommonExceptionHandler<T>(cea.Message.ToString(), cea.PubnubRequestState, true,
|
|
1430
|
-
false, PubnubErrorLevel);
|
|
1431
|
-
}
|
|
1432
|
-
else if (cea.IsError)
|
|
1433
|
-
{
|
|
1434
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, NonSubscribeHandler: NonSub Error={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1435
|
-
ExceptionHandlers.UrlRequestCommonExceptionHandler<T>(cea.Message.ToString(), cea.PubnubRequestState, false, false, PubnubErrorLevel);
|
|
1436
|
-
}
|
|
1437
|
-
else
|
|
1438
|
-
{
|
|
1439
|
-
List<object> result = new List<object>();
|
|
1440
|
-
Helpers.WrapResultBasedOnResponseType<T>(cea.PubnubRequestState, cea.Message,
|
|
1441
|
-
JsonPluggableLibrary, PubnubErrorLevel, this.cipherKey, ref result);
|
|
1442
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, NonSubscribeHandler: result={1}", DateTime.Now.ToString(), (result != null) ? result.Count.ToString() : "null"), LoggingMethod.LevelInfo);
|
|
1443
|
-
|
|
1444
|
-
Helpers.ProcessResponseCallbacks<T>(ref result, cea.PubnubRequestState,
|
|
1445
|
-
this.cipherKey, JsonPluggableLibrary);
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
private void ProcessCoroutineCompleteResponse<T>(CustomEventArgs<T> cea)
|
|
1450
|
-
{
|
|
1451
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ProcessCoroutineCompleteResponse: In handler of event cea {1} RequestType CoroutineCompleteHandler {2}", DateTime.Now.ToString(), cea.PubnubRequestState.RespType.ToString(), typeof(T)), LoggingMethod.LevelInfo);
|
|
1452
|
-
switch (cea.PubnubRequestState.RespType)
|
|
1453
|
-
{
|
|
1454
|
-
case ResponseType.Heartbeat:
|
|
1455
|
-
|
|
1456
|
-
HeartbeatHandler<T>(cea);
|
|
1457
|
-
|
|
1458
|
-
break;
|
|
1459
|
-
|
|
1460
|
-
case ResponseType.PresenceHeartbeat:
|
|
1461
|
-
|
|
1462
|
-
PresenceHeartbeatHandler<T>(cea);
|
|
1463
|
-
|
|
1464
|
-
break;
|
|
1465
|
-
case ResponseType.SubscribeV2:
|
|
1466
|
-
case ResponseType.PresenceV2:
|
|
1467
|
-
|
|
1468
|
-
SubscribePresenceHanlder<T>(cea);
|
|
1469
|
-
|
|
1470
|
-
break;
|
|
1471
|
-
default:
|
|
1472
|
-
|
|
1473
|
-
NonSubscribeHandler<T>(cea);
|
|
1474
|
-
|
|
1475
|
-
break;
|
|
1476
|
-
}
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
private void CoroutineCompleteHandler<T>(object sender, EventArgs ea)
|
|
1480
|
-
{
|
|
1481
|
-
CustomEventArgs<T> cea = ea as CustomEventArgs<T>;
|
|
1482
|
-
|
|
1483
|
-
try
|
|
1484
|
-
{
|
|
1485
|
-
if (cea != null)
|
|
1486
|
-
{
|
|
1487
|
-
if (cea.PubnubRequestState != null)
|
|
1488
|
-
{
|
|
1489
|
-
ProcessCoroutineCompleteResponse<T>(cea);
|
|
1490
|
-
}
|
|
1491
|
-
else
|
|
1492
|
-
{
|
|
1493
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, CoroutineCompleteHandler: PubnubRequestState null", DateTime.Now.ToString()), LoggingMethod.LevelError);
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
else
|
|
1497
|
-
{
|
|
1498
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, CoroutineCompleteHandler: cea null", DateTime.Now.ToString()), LoggingMethod.LevelError);
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
catch (Exception ex)
|
|
1502
|
-
{
|
|
1503
|
-
|
|
1504
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, CoroutineCompleteHandler: Exception={1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1505
|
-
|
|
1506
|
-
ExceptionHandlers.UrlRequestCommonExceptionHandler<T>(ex.Message, cea.PubnubRequestState,
|
|
1507
|
-
false, false, PubnubErrorLevel);
|
|
1508
|
-
}
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
void ResponseCallbackNonErrorHandler<T>(CustomEventArgs<T> cea, RequestState<T> requestState)
|
|
1512
|
-
{
|
|
1513
|
-
SubscribeEnvelope resultSubscribeEnvelope = null;
|
|
1514
|
-
string jsonString = cea.Message;
|
|
1515
|
-
|
|
1516
|
-
if (!jsonString.Equals("[]"))
|
|
1517
|
-
{
|
|
1518
|
-
resultSubscribeEnvelope = ParseReceiedJSONV2<T>(requestState, jsonString);
|
|
1519
|
-
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
switch (requestState.RespType)
|
|
1523
|
-
{
|
|
1524
|
-
case ResponseType.SubscribeV2:
|
|
1525
|
-
case ResponseType.PresenceV2:
|
|
1526
|
-
Helpers.ProcessResponseCallbacksV2<T>(ref resultSubscribeEnvelope, requestState, this.cipherKey, JsonPluggableLibrary, _provider);
|
|
1527
|
-
if ((resultSubscribeEnvelope != null) && (resultSubscribeEnvelope.TimetokenMeta != null))
|
|
1528
|
-
{
|
|
1529
|
-
ParseReceiedTimetoken<T>(requestState, resultSubscribeEnvelope.TimetokenMeta.Timetoken);
|
|
1530
|
-
|
|
1531
|
-
MultiChannelSubscribeRequest<T>(requestState.RespType, resultSubscribeEnvelope.TimetokenMeta.Timetoken, false);
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
else
|
|
1535
|
-
{
|
|
1536
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ResponseCallbackNonErrorHandler ERROR: Couldn't extract timetoken, initiating fresh subscribe request. \nJSON response:\n {1}",
|
|
1537
|
-
DateTime.Now.ToString(), jsonString), LoggingMethod.LevelError);
|
|
1538
|
-
|
|
1539
|
-
MultiChannelSubscribeRequest<T>(requestState.RespType, 0, false);
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
break;
|
|
1543
|
-
default:
|
|
1544
|
-
break;
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
private void UrlProcessResponseCallbackNonAsync<T>(CustomEventArgs<T> cea)
|
|
1549
|
-
{
|
|
1550
|
-
RequestState<T> requestState = cea.PubnubRequestState;
|
|
1551
|
-
|
|
1552
|
-
try
|
|
1553
|
-
{
|
|
1554
|
-
if ((cea.IsError) || (cea.IsTimeout))
|
|
1555
|
-
{
|
|
1556
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, UrlProcessResponseCallbackNonAsync Message: {1}", DateTime.Now.ToString(), cea.Message), LoggingMethod.LevelError);
|
|
1557
|
-
ExceptionHandlers.ResponseCallbackErrorOrTimeoutHandler<T>(cea, requestState, PubnubErrorLevel);
|
|
1558
|
-
|
|
1559
|
-
}
|
|
1560
|
-
else
|
|
1561
|
-
{
|
|
1562
|
-
|
|
1563
|
-
ResponseCallbackNonErrorHandler<T>(cea, requestState);
|
|
1564
|
-
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
catch (WebException webEx)
|
|
1568
|
-
{
|
|
1569
|
-
|
|
1570
|
-
ExceptionHandlers.ResponseCallbackWebExceptionHandler<T>(cea, requestState, webEx, PubnubErrorLevel);
|
|
1571
|
-
|
|
1572
|
-
}
|
|
1573
|
-
catch (Exception ex)
|
|
1574
|
-
{
|
|
1575
|
-
|
|
1576
|
-
Debug.LogException(ex);
|
|
1577
|
-
|
|
1578
|
-
ExceptionHandlers.ResponseCallbackExceptionHandler<T>(cea, requestState, ex, PubnubErrorLevel);
|
|
1579
|
-
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
protected void MultiplexExceptionHandler<T>(ResponseType type, bool reconnectMaxTried, bool reconnect)
|
|
1584
|
-
{
|
|
1585
|
-
List<ChannelEntity> channelEntities = Subscription.AllSubscribedChannelsAndChannelGroups;
|
|
1586
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiplexExceptionHandler: responsetype={1}", DateTime.Now.ToString(), type.ToString()), LoggingMethod.LevelInfo);
|
|
1587
|
-
string channelGroups = Helpers.GetNamesFromChannelEntities(channelEntities, true);
|
|
1588
|
-
string channels = Helpers.GetNamesFromChannelEntities(channelEntities, false);
|
|
1589
|
-
|
|
1590
|
-
if (reconnectMaxTried)
|
|
1591
|
-
{
|
|
1592
|
-
|
|
1593
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiplexExceptionHandler: MAX retries reached. Exiting the subscribe for channels = {1} and channelgroups = {2}",
|
|
1594
|
-
DateTime.Now.ToString(), channels, channelGroups), LoggingMethod.LevelInfo);
|
|
1595
|
-
|
|
1596
|
-
MultiChannelUnsubscribeInit<T>(ResponseType.Unsubscribe, channels, channelGroups, null, null, null, null);
|
|
1597
|
-
|
|
1598
|
-
Helpers.CheckSubscribedChannelsAndSendCallbacks<T>(Subscription.AllSubscribedChannelsAndChannelGroups,
|
|
1599
|
-
type, NetworkCheckMaxRetries, PubnubErrorLevel);
|
|
1600
|
-
//retriesExceeded = false;
|
|
1601
|
-
}
|
|
1602
|
-
else
|
|
1603
|
-
{
|
|
1604
|
-
if (!internetStatus)
|
|
1605
|
-
{
|
|
1606
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiplexExceptionHandler: Subscribe channels = {1} and channelgroups = {2} - No internet connection. ",
|
|
1607
|
-
DateTime.Now.ToString(), channels, channelGroups), LoggingMethod.LevelInfo);
|
|
1608
|
-
|
|
1609
|
-
return;
|
|
1610
|
-
}
|
|
1611
|
-
|
|
1612
|
-
long tt = lastSubscribeTimetoken;
|
|
1613
|
-
if (!EnableResumeOnReconnect && reconnect)
|
|
1614
|
-
{
|
|
1615
|
-
tt = 0; //send 0 time token to enable presence event
|
|
1616
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiplexExceptionHandler: Reconnect true and EnableResumeOnReconnect false sending tt = 0. ",
|
|
1617
|
-
DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
}
|
|
1621
|
-
else
|
|
1622
|
-
{
|
|
1623
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiplexExceptionHandler: sending tt = {1}. ",
|
|
1624
|
-
DateTime.Now.ToString(), tt.ToString()), LoggingMethod.LevelInfo);
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
MultiChannelSubscribeRequest<T>(type, tt, reconnect);
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
private void HandleMultiplexException<T>(object sender, EventArgs ea)
|
|
1632
|
-
{
|
|
1633
|
-
MultiplexExceptionEventArgs<T> mea = ea as MultiplexExceptionEventArgs<T>;
|
|
1634
|
-
MultiplexExceptionHandler<T>(mea.responseType, mea.reconnectMaxTried, mea.resumeOnReconnect);
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
#endregion
|
|
1638
|
-
|
|
1639
|
-
#region "Helpers"
|
|
1640
|
-
|
|
1641
|
-
SubscribeEnvelope ParseReceiedJSONV2<T>(RequestState<T> requestState, string jsonString)
|
|
1642
|
-
{
|
|
1643
|
-
if (!string.IsNullOrEmpty(jsonString))
|
|
1644
|
-
{
|
|
1645
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ParseReceiedJSONV2: jsonString = {1}", DateTime.Now.ToString(), jsonString), LoggingMethod.LevelInfo);
|
|
1646
|
-
//this doesnt work on JSONFx for Unity in case a string is passed in an variable of type object
|
|
1647
|
-
//SubscribeEnvelope resultSubscribeEnvelope = jsonPluggableLibrary.Deserialize<SubscribeEnvelope>(jsonString);
|
|
1648
|
-
object resultSubscribeEnvelope = jsonPluggableLibrary.DeserializeToObject(jsonString);
|
|
1649
|
-
SubscribeEnvelope subscribeEnvelope = new SubscribeEnvelope();
|
|
1650
|
-
|
|
1651
|
-
if (resultSubscribeEnvelope is IDictionary<string, object>)
|
|
1652
|
-
{
|
|
1653
|
-
|
|
1654
|
-
IDictionary<string, object> message = (IDictionary<string, object>)resultSubscribeEnvelope;
|
|
1655
|
-
subscribeEnvelope.TimetokenMeta = Helpers.CreateTimetokenMetadata(message["t"], "Subscribe TT: ");
|
|
1656
|
-
subscribeEnvelope.Messages = Helpers.CreateListOfSubscribeMessage(message["m"]);
|
|
1657
|
-
|
|
1658
|
-
return subscribeEnvelope;
|
|
1659
|
-
}
|
|
1660
|
-
else
|
|
1661
|
-
{
|
|
1662
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ParseReceiedJSONV2: resultSubscribeEnvelope is not dict",
|
|
1663
|
-
DateTime.Now.ToString()), LoggingMethod.LevelError);
|
|
1664
|
-
return null;
|
|
1665
|
-
}
|
|
1666
|
-
}
|
|
1667
|
-
else
|
|
1668
|
-
{
|
|
1669
|
-
return null;
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
void ParseReceiedTimetoken<T>(RequestState<T> requestState, long receivedTimetoken)
|
|
1675
|
-
{
|
|
1676
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ParseReceiedTimetoken: receivedTimetoken = {1}",
|
|
1677
|
-
DateTime.Now.ToString(), receivedTimetoken.ToString()),
|
|
1678
|
-
LoggingMethod.LevelInfo);
|
|
1679
|
-
lastSubscribeTimetoken = receivedTimetoken;
|
|
1680
|
-
if (!enableResumeOnReconnect)
|
|
1681
|
-
{
|
|
1682
|
-
lastSubscribeTimetoken = receivedTimetoken;
|
|
1683
|
-
}
|
|
1684
|
-
else
|
|
1685
|
-
{
|
|
1686
|
-
//do nothing. keep last subscribe token
|
|
1687
|
-
}
|
|
1688
|
-
if (requestState.Reconnect)
|
|
1689
|
-
{
|
|
1690
|
-
if (enableResumeOnReconnect)
|
|
1691
|
-
{
|
|
1692
|
-
//do nothing. keep last subscribe token
|
|
1693
|
-
}
|
|
1694
|
-
else
|
|
1695
|
-
{
|
|
1696
|
-
lastSubscribeTimetoken = receivedTimetoken;
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
private void RunRequests<T>(string requestUri, RequestState<T> pubnubRequestState)
|
|
1702
|
-
{
|
|
1703
|
-
if (pubnubRequestState.RespType.Equals(ResponseType.SubscribeV2) || pubnubRequestState.RespType.Equals(ResponseType.PresenceV2)
|
|
1704
|
-
)
|
|
1705
|
-
{
|
|
1706
|
-
RequestState<T> pubnubRequestStateHB = pubnubRequestState;
|
|
1707
|
-
pubnubRequestStateHB.ID = DateTime.Now.Ticks;
|
|
1708
|
-
|
|
1709
|
-
RunHeartbeat<T>(false, LocalClientHeartbeatInterval, pubnubRequestStateHB);
|
|
1710
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RunRequests: Heartbeat started", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1711
|
-
if (PresenceHeartbeatInterval > 0)
|
|
1712
|
-
{
|
|
1713
|
-
RunPresenceHeartbeat<T>(false, PresenceHeartbeatInterval, pubnubRequestStateHB);
|
|
1714
|
-
}
|
|
1715
|
-
|
|
1716
|
-
StoredRequestState.SetRequestState(CurrentRequestType.Subscribe, pubnubRequestState);
|
|
1717
|
-
coroutine.SubCoroutineComplete += CoroutineCompleteHandler<T>;
|
|
1718
|
-
coroutine.Run<T>(requestUri, pubnubRequestState, SubscribeTimeout, requestDelayTime);
|
|
1719
|
-
if (requestDelayTime > 0)
|
|
1720
|
-
{
|
|
1721
|
-
requestDelayTime = 0;
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
else
|
|
1725
|
-
{
|
|
1726
|
-
StoredRequestState.SetRequestState(CurrentRequestType.NonSubscribe, pubnubRequestState);
|
|
1727
|
-
coroutine.NonSubCoroutineComplete += CoroutineCompleteHandler<T>;
|
|
1728
|
-
coroutine.Run<T>(requestUri, pubnubRequestState, NonSubscribeTimeout, 0);
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
|
-
private bool UrlProcessRequest<T>(string requestUri, RequestState<T> pubnubRequestState)
|
|
1733
|
-
{
|
|
1734
|
-
try
|
|
1735
|
-
{
|
|
1736
|
-
|
|
1737
|
-
RunRequests<T>(requestUri, pubnubRequestState);
|
|
1738
|
-
|
|
1739
|
-
}
|
|
1740
|
-
catch (UnityEngine.MissingReferenceException ex)
|
|
1741
|
-
{
|
|
1742
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, UrlProcessRequest: MissingReferenceException={1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1743
|
-
return false;
|
|
1744
|
-
}
|
|
1745
|
-
catch (System.NullReferenceException ex)
|
|
1746
|
-
{
|
|
1747
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, UrlProcessRequest: NullReferenceException={1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1748
|
-
return false;
|
|
1749
|
-
}
|
|
1750
|
-
catch (System.Exception ex)
|
|
1751
|
-
{
|
|
1752
|
-
if (pubnubRequestState != null && pubnubRequestState.ErrorCallback != null)
|
|
1753
|
-
{
|
|
1754
|
-
|
|
1755
|
-
PubnubCallbacks.FireErrorCallbacksForAllChannels<T>(ex, pubnubRequestState,
|
|
1756
|
-
PubnubErrorSeverity.Critical, PubnubErrorCode.None, PubnubErrorLevel);
|
|
1757
|
-
}
|
|
1758
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0} UrlProcessRequest: Exception={1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1759
|
-
|
|
1760
|
-
ExceptionHandlers.UrlRequestCommonExceptionHandler<T>(ex.Message, pubnubRequestState,
|
|
1761
|
-
false, false, PubnubErrorLevel);
|
|
1762
|
-
return false;
|
|
1763
|
-
}
|
|
1764
|
-
return true;
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
private void AbortPreviousRequest<T>(List<ChannelEntity> existingChannels)
|
|
1768
|
-
{
|
|
1769
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, AbortPreviousRequest: Aborting previous subscribe/presence requests having channel(s)={1} and ChannelGroup(s) = {2}",
|
|
1770
|
-
DateTime.Now.ToString(), Helpers.GetNamesFromChannelEntities(existingChannels, false),
|
|
1771
|
-
Helpers.GetNamesFromChannelEntities(existingChannels, true)), LoggingMethod.LevelInfo);
|
|
1772
|
-
|
|
1773
|
-
coroutine.BounceRequest<T>(CurrentRequestType.Subscribe, null, false);
|
|
1774
|
-
}
|
|
1775
|
-
|
|
1776
|
-
void RemoveUnsubscribedChannelsAndDeleteUserState<T>(List<ChannelEntity> channelEntities)
|
|
1777
|
-
{
|
|
1778
|
-
foreach (ChannelEntity ce in channelEntities)
|
|
1779
|
-
{
|
|
1780
|
-
string channelToBeRemoved = ce.ChannelID.ChannelOrChannelGroupName;
|
|
1781
|
-
PubnubChannelCallback<T> channelCallback = ce.ChannelParams.Callbacks as PubnubChannelCallback<T>;
|
|
1782
|
-
if (Subscription.Delete(ce))
|
|
1783
|
-
{
|
|
1784
|
-
string jsonString = string.Format("{0} Unsubscribed from {1}", (ce.ChannelID.IsPresenceChannel) ? "Presence" : "", channelToBeRemoved.Replace(Utility.PresenceChannelSuffix, ""));
|
|
1785
|
-
List<object> result = Helpers.CreateJsonResponse(jsonString, channelToBeRemoved.Replace(Utility.PresenceChannelSuffix, ""), JsonPluggableLibrary);
|
|
1786
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RemoveUnsubscribedChannelsAndDeleteUserState: JSON response={1}", DateTime.Now.ToString(), jsonString), LoggingMethod.LevelInfo);
|
|
1787
|
-
PubnubCallbacks.GoToCallback<T>(result, channelCallback.DisconnectCallback, JsonPluggableLibrary);
|
|
1788
|
-
}
|
|
1789
|
-
else
|
|
1790
|
-
{
|
|
1791
|
-
string message = string.Format("Unsubscribe Error. Please retry the unsubscribe operation. channel{0}", channelToBeRemoved);
|
|
1792
|
-
PubnubErrorCode errorType = (ce.ChannelID.IsPresenceChannel) ? PubnubErrorCode.PresenceUnsubscribeFailed : PubnubErrorCode.UnsubscribeFailed;
|
|
1793
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RemoveUnsubscribedChannelsAndDeleteUserState: channel={1} unsubscribe error", DateTime.Now.ToString(), channelToBeRemoved), LoggingMethod.LevelInfo);
|
|
1794
|
-
PubnubCallbacks.CallErrorCallback<T>(message, channelCallback.ErrorCallback,
|
|
1795
|
-
errorType, PubnubErrorSeverity.Critical, PubnubErrorLevel);
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
void ContinueToSubscribeRestOfChannels<T>(ResponseType type, Action<T> userCallback, Action<T> connectCallback, Action<PubnubClientError> errorCallback)
|
|
1803
|
-
{
|
|
1804
|
-
List<ChannelEntity> subscribedChannels = Subscription.AllSubscribedChannelsAndChannelGroups;
|
|
1805
|
-
|
|
1806
|
-
if (subscribedChannels != null && subscribedChannels.Count > 0)
|
|
1807
|
-
{
|
|
1808
|
-
ResetInternetCheckSettings();
|
|
1809
|
-
//Modify the value for type ResponseType. Presence or Subscrie is ok, but sending the close value would make sense
|
|
1810
|
-
if (Subscription.HasPresenceChannels)
|
|
1811
|
-
{
|
|
1812
|
-
type = ResponseType.PresenceV2;
|
|
1813
|
-
}
|
|
1814
|
-
else
|
|
1815
|
-
{
|
|
1816
|
-
type = ResponseType.SubscribeV2;
|
|
1817
|
-
}
|
|
1818
|
-
//Continue with any remaining channels for subscribe/presence
|
|
1819
|
-
MultiChannelSubscribeRequest<T>(type, 0, false);
|
|
1820
|
-
}
|
|
1821
|
-
else
|
|
1822
|
-
{
|
|
1823
|
-
if (isHearbeatRunning)
|
|
1824
|
-
{
|
|
1825
|
-
StopHeartbeat<T>();
|
|
1826
|
-
}
|
|
1827
|
-
if (isPresenceHearbeatRunning)
|
|
1828
|
-
{
|
|
1829
|
-
StopPresenceHeartbeat<T>();
|
|
1830
|
-
}
|
|
1831
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ContinueToSubscribeRestOfChannels: All channels are Unsubscribed. Further subscription was stopped", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1832
|
-
ExceptionHandlers.MultiplexException -= HandleMultiplexException<T>;
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
private void MultiChannelUnsubscribeInit<T>(ResponseType respType, string channel, string channelGroups, Action<T> userCallback,
|
|
1837
|
-
Action<T> connectCallback, Action<T> disconnectCallback, Action<PubnubClientError> errorCallback)
|
|
1838
|
-
{
|
|
1839
|
-
string[] rawChannels = channel.Split(',');
|
|
1840
|
-
string[] rawChannelGroups = channelGroups.Split(',');
|
|
1841
|
-
List<ChannelEntity> subscribedChannels = Subscription.AllSubscribedChannelsAndChannelGroups;
|
|
1842
|
-
|
|
1843
|
-
List<ChannelEntity> newChannelEntities;
|
|
1844
|
-
Helpers.RemoveDuplicatesCheckAlreadySubscribedAndGetChannels<T>(respType, userCallback, connectCallback,
|
|
1845
|
-
errorCallback, null, disconnectCallback, rawChannels, rawChannelGroups, PubnubErrorLevel, true, out newChannelEntities, _provider);
|
|
1846
|
-
|
|
1847
|
-
if (newChannelEntities.Count > 0)
|
|
1848
|
-
{
|
|
1849
|
-
//Retrieve the current channels already subscribed previously and terminate them
|
|
1850
|
-
AbortPreviousRequest<T>(subscribedChannels);
|
|
1851
|
-
|
|
1852
|
-
if (respType == ResponseType.Unsubscribe)
|
|
1853
|
-
{
|
|
1854
|
-
string request = BuildRequests.BuildMultiChannelLeaveRequest(channel, channelGroups, this.SessionUUID,
|
|
1855
|
-
this.ssl, this.Origin, authenticationKey, this.subscribeKey, _provider);
|
|
1856
|
-
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(newChannelEntities, ResponseType.Leave, false, 0, false, 0, null);
|
|
1857
|
-
UrlProcessRequest<T>(request, requestState);
|
|
1858
|
-
|
|
1859
|
-
}
|
|
1860
|
-
//Remove the valid channels from subscribe list for unsubscribe
|
|
1861
|
-
RemoveUnsubscribedChannelsAndDeleteUserState<T>(newChannelEntities);
|
|
1862
|
-
|
|
1863
|
-
//Get all the channels
|
|
1864
|
-
ContinueToSubscribeRestOfChannels<T>(respType, userCallback, connectCallback, errorCallback);
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
|
-
private void ResetInternetCheckSettings()
|
|
1869
|
-
{
|
|
1870
|
-
retryCount = 0;
|
|
1871
|
-
internetStatus = true;
|
|
1872
|
-
//retriesExceeded = false;
|
|
1873
|
-
}
|
|
1874
|
-
|
|
1875
|
-
public void MultiChannelSubscribeInit<T>(ResponseType respType, string channel, string channelGroup, long timetokenToUse,
|
|
1876
|
-
Action<T> userCallback, Action<T> connectCallback, Action<PubnubClientError> errorCallback, Action<T> wildcardPresenceCallback)
|
|
1877
|
-
{
|
|
1878
|
-
string[] rawChannels = channel.Split(',');
|
|
1879
|
-
string[] rawChannelGroups = channelGroup.Split(',');
|
|
1880
|
-
|
|
1881
|
-
List<ChannelEntity> subscribedChannels = Subscription.AllSubscribedChannelsAndChannelGroups;
|
|
1882
|
-
|
|
1883
|
-
ResetInternetCheckSettings();
|
|
1884
|
-
|
|
1885
|
-
List<ChannelEntity> newChannelEntities;
|
|
1886
|
-
bool channelsOrChannelGroupsAdded = Helpers.RemoveDuplicatesCheckAlreadySubscribedAndGetChannels<T>(respType, userCallback,
|
|
1887
|
-
connectCallback, errorCallback, wildcardPresenceCallback, null, rawChannels, rawChannelGroups,
|
|
1888
|
-
PubnubErrorLevel, false, out newChannelEntities, _provider);
|
|
1889
|
-
|
|
1890
|
-
if ((channelsOrChannelGroupsAdded) && (internetStatus))
|
|
1891
|
-
{
|
|
1892
|
-
Subscription.Add(newChannelEntities);
|
|
1893
|
-
|
|
1894
|
-
Helpers.LogChannelEntitiesDictionary(Subscription);
|
|
1895
|
-
|
|
1896
|
-
if (!timetokenToUse.Equals(0))
|
|
1897
|
-
{
|
|
1898
|
-
lastSubscribeTimetokenForNewMultiplex = timetokenToUse;
|
|
1899
|
-
}
|
|
1900
|
-
else if (subscribedChannels.Count > 0)
|
|
1901
|
-
{
|
|
1902
|
-
lastSubscribeTimetokenForNewMultiplex = lastSubscribeTimetoken;
|
|
1903
|
-
}
|
|
1904
|
-
AbortPreviousRequest<T>(subscribedChannels);
|
|
1905
|
-
MultiChannelSubscribeRequest<T>(respType, 0, false);
|
|
1906
|
-
}
|
|
1907
|
-
else
|
|
1908
|
-
{
|
|
1909
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiChannelSubscribeInit: channelsOrChannelGroupsAdded {1}, internet status {2}",
|
|
1910
|
-
DateTime.Now.ToString(), channelsOrChannelGroupsAdded.ToString(), internetStatus.ToString()), LoggingMethod.LevelInfo);
|
|
1911
|
-
}
|
|
1912
|
-
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
private bool CheckAllChannelsAreUnsubscribed<T>()
|
|
1916
|
-
{
|
|
1917
|
-
if (Subscription.AllSubscribedChannelsAndChannelGroups.Count <= 0)
|
|
1918
|
-
{
|
|
1919
|
-
StopHeartbeat<T>();
|
|
1920
|
-
if (isPresenceHearbeatRunning)
|
|
1921
|
-
{
|
|
1922
|
-
StopPresenceHeartbeat<T>();
|
|
1923
|
-
}
|
|
1924
|
-
ExceptionHandlers.MultiplexException -= HandleMultiplexException<T>;
|
|
1925
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, CheckAllChannelsAreUnsubscribed: All channels are Unsubscribed. Further subscription was stopped", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1926
|
-
|
|
1927
|
-
return true;
|
|
1928
|
-
}
|
|
1929
|
-
return false;
|
|
1930
|
-
}
|
|
1931
|
-
|
|
1932
|
-
long SaveLastTimetoken(long timetoken)
|
|
1933
|
-
{
|
|
1934
|
-
long lastTimetoken = 0;
|
|
1935
|
-
long sentTimetoken = timetoken;
|
|
1936
|
-
#if (ENABLE_PUBNUB_LOGGING)
|
|
1937
|
-
StringBuilder sbLogger = new StringBuilder();
|
|
1938
|
-
sbLogger.AppendFormat("SaveLastTimetoken: lastSubscribeTimetokenForNewMultiplex={0}\n", lastSubscribeTimetokenForNewMultiplex);
|
|
1939
|
-
sbLogger.AppendFormat("SaveLastTimetoken: sentTimetoken={0}\n", sentTimetoken.ToString());
|
|
1940
|
-
sbLogger.AppendFormat("SaveLastTimetoken: lastSubscribeTimetoken={0}\n", lastSubscribeTimetoken);
|
|
1941
|
-
#endif
|
|
1942
|
-
if (resetTimetoken || uuidChanged)
|
|
1943
|
-
{
|
|
1944
|
-
lastTimetoken = 0;
|
|
1945
|
-
uuidChanged = false;
|
|
1946
|
-
resetTimetoken = false;
|
|
1947
|
-
#if (ENABLE_PUBNUB_LOGGING)
|
|
1948
|
-
sbLogger.AppendFormat("SaveLastTimetoken: resetTimetoken\n");
|
|
1949
|
-
#endif
|
|
1950
|
-
}
|
|
1951
|
-
else
|
|
1952
|
-
{
|
|
1953
|
-
//override lastTimetoken when lastSubscribeTimetokenForNewMultiplex is set.
|
|
1954
|
-
//this is done to use the timetoken prior to the latest response from the server
|
|
1955
|
-
//and is true in case new channels are added to the subscribe list.
|
|
1956
|
-
if (!sentTimetoken.Equals(0) && !lastSubscribeTimetokenForNewMultiplex.Equals(0) && !lastSubscribeTimetoken.Equals(lastSubscribeTimetokenForNewMultiplex))
|
|
1957
|
-
{
|
|
1958
|
-
lastTimetoken = lastSubscribeTimetokenForNewMultiplex;
|
|
1959
|
-
lastSubscribeTimetokenForNewMultiplex = 0;
|
|
1960
|
-
#if (ENABLE_PUBNUB_LOGGING)
|
|
1961
|
-
sbLogger.AppendFormat("SaveLastTimetoken: Using lastSubscribeTimetokenForNewMultiplex={0}\n", lastTimetoken);
|
|
1962
|
-
#endif
|
|
1963
|
-
}
|
|
1964
|
-
else
|
|
1965
|
-
if (sentTimetoken.Equals(0))
|
|
1966
|
-
{
|
|
1967
|
-
lastTimetoken = sentTimetoken;
|
|
1968
|
-
#if (ENABLE_PUBNUB_LOGGING)
|
|
1969
|
-
sbLogger.AppendFormat("SaveLastTimetoken: Using sentTimetoken={0}\n", sentTimetoken);
|
|
1970
|
-
#endif
|
|
1971
|
-
}
|
|
1972
|
-
else
|
|
1973
|
-
{
|
|
1974
|
-
lastTimetoken = sentTimetoken;
|
|
1975
|
-
#if (ENABLE_PUBNUB_LOGGING)
|
|
1976
|
-
sbLogger.AppendFormat("SaveLastTimetoken: Using sentTimetoken={0}\n", sentTimetoken);
|
|
1977
|
-
#endif
|
|
1978
|
-
}
|
|
1979
|
-
if (lastSubscribeTimetoken.Equals(lastSubscribeTimetokenForNewMultiplex))
|
|
1980
|
-
{
|
|
1981
|
-
lastSubscribeTimetokenForNewMultiplex = 0;
|
|
1982
|
-
}
|
|
1983
|
-
}
|
|
1984
|
-
#if (ENABLE_PUBNUB_LOGGING)
|
|
1985
|
-
LoggingMethod.WriteToLog (string.Format ("DateTime {0}, {1} ", DateTime.Now.ToString (),
|
|
1986
|
-
sbLogger.ToString()), LoggingMethod.LevelInfo);
|
|
1987
|
-
#endif
|
|
1988
|
-
|
|
1989
|
-
return lastTimetoken;
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
private void MultiChannelSubscribeRequest<T>(ResponseType type, long timetoken, bool reconnect)
|
|
1993
|
-
{
|
|
1994
|
-
//Exit if the channel is unsubscribed
|
|
1995
|
-
if (CheckAllChannelsAreUnsubscribed<T>())
|
|
1996
|
-
{
|
|
1997
|
-
return;
|
|
1998
|
-
}
|
|
1999
|
-
List<ChannelEntity> channelEntities = Subscription.AllSubscribedChannelsAndChannelGroups;
|
|
2000
|
-
|
|
2001
|
-
// Begin recursive subscribe
|
|
2002
|
-
try
|
|
2003
|
-
{
|
|
2004
|
-
long lastTimetoken = SaveLastTimetoken(timetoken);
|
|
2005
|
-
|
|
2006
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiChannelSubscribeRequest: Building request for {1} with timetoken={2}", DateTime.Now.ToString(),
|
|
2007
|
-
Helpers.GetNamesFromChannelEntities(channelEntities), lastTimetoken), LoggingMethod.LevelInfo);
|
|
2008
|
-
|
|
2009
|
-
// Build URL
|
|
2010
|
-
string channelsJsonState = Subscription.CompiledUserState;
|
|
2011
|
-
|
|
2012
|
-
string channels = Helpers.GetNamesFromChannelEntities(channelEntities, false);
|
|
2013
|
-
string channelGroups = Helpers.GetNamesFromChannelEntities(channelEntities, true);
|
|
2014
|
-
|
|
2015
|
-
//v2
|
|
2016
|
-
string filterExpr = (!string.IsNullOrEmpty(this.FilterExpr)) ? this.FilterExpr : string.Empty;
|
|
2017
|
-
string requestUrl = BuildRequests.BuildMultiChannelSubscribeRequestV2(channels,
|
|
2018
|
-
channelGroups, lastTimetoken.ToString(), channelsJsonState, this.SessionUUID, this.Region,
|
|
2019
|
-
filterExpr, this.ssl, this.Origin, authenticationKey, this.subscribeKey, this.PresenceHeartbeat);
|
|
2020
|
-
|
|
2021
|
-
RequestState<T> pubnubRequestState = BuildRequests.BuildRequestState<T>(channelEntities, type, reconnect,
|
|
2022
|
-
0, false, Convert.ToInt64(timetoken.ToString()), typeof(T));
|
|
2023
|
-
// Wait for message
|
|
2024
|
-
ExceptionHandlers.MultiplexException += HandleMultiplexException<T>;
|
|
2025
|
-
UrlProcessRequest<T>(requestUrl, pubnubRequestState);
|
|
2026
|
-
}
|
|
2027
|
-
catch (Exception ex)
|
|
2028
|
-
{
|
|
2029
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiChannelSubscribeRequest: method:_subscribe \n channel={1} \n timetoken={2} \n Exception Details={3}",
|
|
2030
|
-
DateTime.Now.ToString(), Helpers.GetNamesFromChannelEntities(channelEntities), timetoken.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
2031
|
-
PubnubCallbacks.CallErrorCallback<T>(ex, channelEntities,
|
|
2032
|
-
PubnubErrorCode.None, PubnubErrorSeverity.Critical, PubnubErrorLevel);
|
|
2033
|
-
|
|
2034
|
-
this.MultiChannelSubscribeRequest<T>(type, timetoken, false);
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
|
-
|
|
2038
|
-
private void RetryLoop<T>(RequestState<T> pubnubRequestState)
|
|
2039
|
-
{
|
|
2040
|
-
internetStatus = false;
|
|
2041
|
-
retryCount++;
|
|
2042
|
-
if (retryCount <= NetworkCheckMaxRetries)
|
|
2043
|
-
{
|
|
2044
|
-
string cbMessage = string.Format("Internet Disconnected, retrying. Retry count {0} of {1}",
|
|
2045
|
-
retryCount.ToString(), NetworkCheckMaxRetries);
|
|
2046
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RetryLoop: {1}", DateTime.Now.ToString(), cbMessage), LoggingMethod.LevelError);
|
|
2047
|
-
PubnubCallbacks.FireErrorCallbacksForAllChannels<T>(cbMessage, pubnubRequestState,
|
|
2048
|
-
PubnubErrorSeverity.Warn, PubnubErrorCode.NoInternetRetryConnect, PubnubErrorLevel);
|
|
2049
|
-
|
|
2050
|
-
}
|
|
2051
|
-
else
|
|
2052
|
-
{
|
|
2053
|
-
//retriesExceeded = true;
|
|
2054
|
-
string cbMessage = string.Format("Internet Disconnected. Retries exceeded {0}. Unsubscribing connected channels.",
|
|
2055
|
-
NetworkCheckMaxRetries);
|
|
2056
|
-
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RetryLoop: {1}", DateTime.Now.ToString(), cbMessage), LoggingMethod.LevelError);
|
|
2057
|
-
|
|
2058
|
-
//stop heartbeat.
|
|
2059
|
-
StopHeartbeat<T>();
|
|
2060
|
-
//reset internetStatus
|
|
2061
|
-
ResetInternetCheckSettings();
|
|
2062
|
-
|
|
2063
|
-
coroutine.BounceRequest<T>(CurrentRequestType.Subscribe, null, false);
|
|
2064
|
-
|
|
2065
|
-
PubnubCallbacks.FireErrorCallbacksForAllChannels<T>(cbMessage, pubnubRequestState,
|
|
2066
|
-
PubnubErrorSeverity.Warn, PubnubErrorCode.NoInternetRetryConnect, PubnubErrorLevel);
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
MultiplexExceptionHandler<T>(ResponseType.SubscribeV2, true, false);
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
|
|
2073
|
-
#endregion
|
|
2074
|
-
|
|
2075
|
-
public void Dispose()
|
|
2076
|
-
{
|
|
2077
|
-
Object.Destroy(coroutine);
|
|
2078
|
-
}
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
1
|
+
//Build Date: Jul 29, 2016
|
|
2
|
+
//ver3.7.2/Unity5
|
|
3
|
+
|
|
4
|
+
using Beamable.Common.Dependencies;
|
|
5
|
+
using System;
|
|
6
|
+
using System.Collections;
|
|
7
|
+
using System.Collections.Generic;
|
|
8
|
+
using System.ComponentModel;
|
|
9
|
+
using System.Linq;
|
|
10
|
+
using System.Net;
|
|
11
|
+
using System.Runtime.CompilerServices;
|
|
12
|
+
using System.Security.Cryptography;
|
|
13
|
+
using System.Text;
|
|
14
|
+
using UnityEngine;
|
|
15
|
+
using Object = UnityEngine.Object;
|
|
16
|
+
|
|
17
|
+
#if DEBUG
|
|
18
|
+
[assembly:InternalsVisibleTo("Assembly-CSharp-Editor")]
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
namespace PubNubMessaging.Core
|
|
22
|
+
{
|
|
23
|
+
public class PubnubUnity
|
|
24
|
+
{
|
|
25
|
+
private readonly IDependencyProvider _provider;
|
|
26
|
+
|
|
27
|
+
#region "Events"
|
|
28
|
+
|
|
29
|
+
// Common property changed event
|
|
30
|
+
public event PropertyChangedEventHandler PropertyChanged;
|
|
31
|
+
|
|
32
|
+
public void RaisePropertyChanged(string propertyName)
|
|
33
|
+
{
|
|
34
|
+
var handler = PropertyChanged;
|
|
35
|
+
if (handler != null)
|
|
36
|
+
{
|
|
37
|
+
handler(this, new PropertyChangedEventArgs(propertyName));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
#endregion
|
|
42
|
+
|
|
43
|
+
#region "Class variables"
|
|
44
|
+
|
|
45
|
+
private GameObject gobj;
|
|
46
|
+
private Counter publishMessageCounter;
|
|
47
|
+
|
|
48
|
+
private CoroutineClass coroutine;
|
|
49
|
+
|
|
50
|
+
private string origin = "pubsub.pubnub.com";
|
|
51
|
+
private string publishKey = "";
|
|
52
|
+
private string subscribeKey = "";
|
|
53
|
+
private string secretKey = "";
|
|
54
|
+
private string cipherKey = "";
|
|
55
|
+
private bool ssl = true;
|
|
56
|
+
private long lastSubscribeTimetoken = 0;
|
|
57
|
+
private long lastSubscribeTimetokenForNewMultiplex = 0;
|
|
58
|
+
private const string build = "3.7.2";
|
|
59
|
+
private static string pnsdkVersion = "PubNub-CSharp-Unity5/3.7.2";
|
|
60
|
+
|
|
61
|
+
private int pubnubWebRequestCallbackIntervalInSeconds = 310;
|
|
62
|
+
private int pubnubOperationTimeoutIntervalInSeconds = 15;
|
|
63
|
+
private int pubnubHeartbeatTimeoutIntervalInSeconds = 10;
|
|
64
|
+
private int pubnubNetworkTcpCheckIntervalInSeconds = 15;
|
|
65
|
+
private int pubnubNetworkCheckRetries = 50;
|
|
66
|
+
private int pubnubWebRequestRetryIntervalInSeconds = 10;
|
|
67
|
+
private int pubnubPresenceHeartbeatInSeconds = 0;
|
|
68
|
+
private int presenceHeartbeatIntervalInSeconds = 0;
|
|
69
|
+
private int requestDelayTime = 0;
|
|
70
|
+
private bool enableResumeOnReconnect = true;
|
|
71
|
+
private bool uuidChanged = false;
|
|
72
|
+
public bool overrideTcpKeepAlive = true;
|
|
73
|
+
private bool enableJsonEncodingForPublish = true;
|
|
74
|
+
private LoggingMethod.Level pubnubLogLevel = LoggingMethod.Level.Info;
|
|
75
|
+
private PubnubErrorFilter.Level errorLevel = PubnubErrorFilter.Level.Info;
|
|
76
|
+
bool resetTimetoken = false;
|
|
77
|
+
|
|
78
|
+
private bool keepHearbeatRunning = false;
|
|
79
|
+
private bool isHearbeatRunning = false;
|
|
80
|
+
|
|
81
|
+
private bool keepPresenceHearbeatRunning = false;
|
|
82
|
+
private bool isPresenceHearbeatRunning = false;
|
|
83
|
+
|
|
84
|
+
private bool internetStatus = true;
|
|
85
|
+
//private bool retriesExceeded = false;
|
|
86
|
+
|
|
87
|
+
private int retryCount = 0;
|
|
88
|
+
|
|
89
|
+
#endregion
|
|
90
|
+
|
|
91
|
+
#region "Properties"
|
|
92
|
+
|
|
93
|
+
public Subscription Subscription => _provider.GetService<Subscription>();
|
|
94
|
+
public StoredRequestState StoredRequestState => _provider.GetService<StoredRequestState>();
|
|
95
|
+
|
|
96
|
+
public string PublishKey
|
|
97
|
+
{
|
|
98
|
+
get
|
|
99
|
+
{
|
|
100
|
+
return publishKey;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public string SubscribeKey
|
|
105
|
+
{
|
|
106
|
+
get
|
|
107
|
+
{
|
|
108
|
+
return subscribeKey;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
public string SecretKey
|
|
113
|
+
{
|
|
114
|
+
get
|
|
115
|
+
{
|
|
116
|
+
return secretKey;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/// <summary>
|
|
121
|
+
/// Gets or sets the set game object.
|
|
122
|
+
/// This method should be called before init
|
|
123
|
+
/// </summary>
|
|
124
|
+
/// <value>The set game object.</value>
|
|
125
|
+
public GameObject SetGameObject
|
|
126
|
+
{
|
|
127
|
+
get
|
|
128
|
+
{
|
|
129
|
+
return gobj;
|
|
130
|
+
}
|
|
131
|
+
set
|
|
132
|
+
{
|
|
133
|
+
gobj = value;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
public static string Version
|
|
138
|
+
{
|
|
139
|
+
get
|
|
140
|
+
{
|
|
141
|
+
return pnsdkVersion;
|
|
142
|
+
}
|
|
143
|
+
set
|
|
144
|
+
{
|
|
145
|
+
pnsdkVersion = value;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
private List<object> history = new List<object>();
|
|
150
|
+
|
|
151
|
+
public List<object> History
|
|
152
|
+
{
|
|
153
|
+
get { return history; }
|
|
154
|
+
set
|
|
155
|
+
{
|
|
156
|
+
history = value;
|
|
157
|
+
RaisePropertyChanged("History");
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
public int SubscribeTimeout
|
|
162
|
+
{
|
|
163
|
+
get
|
|
164
|
+
{
|
|
165
|
+
return pubnubWebRequestCallbackIntervalInSeconds;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
set
|
|
169
|
+
{
|
|
170
|
+
#if (UNITY_IOS)
|
|
171
|
+
pubnubWebRequestCallbackIntervalInSeconds = Utility.CheckTimeoutValue(value);
|
|
172
|
+
#else
|
|
173
|
+
pubnubWebRequestCallbackIntervalInSeconds = value;
|
|
174
|
+
#endif
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
public int HeartbeatTimeout
|
|
179
|
+
{
|
|
180
|
+
get
|
|
181
|
+
{
|
|
182
|
+
return pubnubHeartbeatTimeoutIntervalInSeconds;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
set
|
|
186
|
+
{
|
|
187
|
+
pubnubHeartbeatTimeoutIntervalInSeconds = value;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
public int NonSubscribeTimeout
|
|
192
|
+
{
|
|
193
|
+
get
|
|
194
|
+
{
|
|
195
|
+
return pubnubOperationTimeoutIntervalInSeconds;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
set
|
|
199
|
+
{
|
|
200
|
+
#if (UNITY_IOS)
|
|
201
|
+
pubnubOperationTimeoutIntervalInSeconds = Utility.CheckTimeoutValue(value);
|
|
202
|
+
#else
|
|
203
|
+
pubnubOperationTimeoutIntervalInSeconds = value;
|
|
204
|
+
#endif
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
public int NetworkCheckMaxRetries
|
|
209
|
+
{
|
|
210
|
+
get
|
|
211
|
+
{
|
|
212
|
+
return pubnubNetworkCheckRetries;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
set
|
|
216
|
+
{
|
|
217
|
+
pubnubNetworkCheckRetries = value;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
public int NetworkCheckRetryInterval
|
|
222
|
+
{
|
|
223
|
+
get
|
|
224
|
+
{
|
|
225
|
+
return pubnubWebRequestRetryIntervalInSeconds;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
set
|
|
229
|
+
{
|
|
230
|
+
pubnubWebRequestRetryIntervalInSeconds = value;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
public int LocalClientHeartbeatInterval
|
|
235
|
+
{
|
|
236
|
+
get
|
|
237
|
+
{
|
|
238
|
+
return pubnubNetworkTcpCheckIntervalInSeconds;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
set
|
|
242
|
+
{
|
|
243
|
+
pubnubNetworkTcpCheckIntervalInSeconds = value;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
public bool EnableResumeOnReconnect
|
|
248
|
+
{
|
|
249
|
+
get
|
|
250
|
+
{
|
|
251
|
+
return enableResumeOnReconnect;
|
|
252
|
+
}
|
|
253
|
+
set
|
|
254
|
+
{
|
|
255
|
+
enableResumeOnReconnect = value;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
public bool EnableJsonEncodingForPublish
|
|
260
|
+
{
|
|
261
|
+
get
|
|
262
|
+
{
|
|
263
|
+
return enableJsonEncodingForPublish;
|
|
264
|
+
}
|
|
265
|
+
set
|
|
266
|
+
{
|
|
267
|
+
enableJsonEncodingForPublish = value;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
private string authenticationKey = "";
|
|
272
|
+
|
|
273
|
+
public string AuthenticationKey
|
|
274
|
+
{
|
|
275
|
+
get
|
|
276
|
+
{
|
|
277
|
+
return authenticationKey;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
set
|
|
281
|
+
{
|
|
282
|
+
authenticationKey = value;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
private IPubnubUnitTest pubnubUnitTest;
|
|
287
|
+
|
|
288
|
+
public virtual IPubnubUnitTest PubnubUnitTest
|
|
289
|
+
{
|
|
290
|
+
get
|
|
291
|
+
{
|
|
292
|
+
return pubnubUnitTest;
|
|
293
|
+
}
|
|
294
|
+
set
|
|
295
|
+
{
|
|
296
|
+
pubnubUnitTest = value;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
private static IJsonPluggableLibrary jsonPluggableLibrary = null;
|
|
301
|
+
|
|
302
|
+
public static IJsonPluggableLibrary JsonPluggableLibrary
|
|
303
|
+
{
|
|
304
|
+
get
|
|
305
|
+
{
|
|
306
|
+
if (jsonPluggableLibrary == null)
|
|
307
|
+
{
|
|
308
|
+
jsonPluggableLibrary = JSONSerializer.JsonPluggableLibrary;
|
|
309
|
+
}
|
|
310
|
+
return jsonPluggableLibrary;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
set
|
|
314
|
+
{
|
|
315
|
+
if (value is IJsonPluggableLibrary)
|
|
316
|
+
{
|
|
317
|
+
jsonPluggableLibrary = value;
|
|
318
|
+
}
|
|
319
|
+
else
|
|
320
|
+
{
|
|
321
|
+
jsonPluggableLibrary = null;
|
|
322
|
+
throw new ArgumentException("Missing or Incorrect JsonPluggableLibrary value");
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
public string Origin
|
|
328
|
+
{
|
|
329
|
+
get
|
|
330
|
+
{
|
|
331
|
+
return origin;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
set
|
|
335
|
+
{
|
|
336
|
+
origin = value;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
private string sessionUUID = "";
|
|
341
|
+
|
|
342
|
+
public string SessionUUID
|
|
343
|
+
{
|
|
344
|
+
get
|
|
345
|
+
{
|
|
346
|
+
if (string.IsNullOrEmpty(sessionUUID) || string.IsNullOrEmpty(sessionUUID.Trim()))
|
|
347
|
+
{
|
|
348
|
+
sessionUUID = Guid.NewGuid().ToString();
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
return sessionUUID;
|
|
352
|
+
}
|
|
353
|
+
set
|
|
354
|
+
{
|
|
355
|
+
sessionUUID = value;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/// <summary>
|
|
360
|
+
/// This property sets presence expiry timeout.
|
|
361
|
+
/// Presence expiry value in seconds.
|
|
362
|
+
/// </summary>
|
|
363
|
+
public int PresenceHeartbeat
|
|
364
|
+
{
|
|
365
|
+
get
|
|
366
|
+
{
|
|
367
|
+
return pubnubPresenceHeartbeatInSeconds;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
set
|
|
371
|
+
{
|
|
372
|
+
if (value <= 0 || value > 320)
|
|
373
|
+
{
|
|
374
|
+
pubnubPresenceHeartbeatInSeconds = 0;
|
|
375
|
+
}
|
|
376
|
+
else
|
|
377
|
+
{
|
|
378
|
+
pubnubPresenceHeartbeatInSeconds = value;
|
|
379
|
+
}
|
|
380
|
+
if (pubnubPresenceHeartbeatInSeconds != 0)
|
|
381
|
+
{
|
|
382
|
+
presenceHeartbeatIntervalInSeconds = (pubnubPresenceHeartbeatInSeconds / 2) - 1;
|
|
383
|
+
}
|
|
384
|
+
TerminateCurrentSubscriberRequest();
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
public int PresenceHeartbeatInterval
|
|
389
|
+
{
|
|
390
|
+
get
|
|
391
|
+
{
|
|
392
|
+
return presenceHeartbeatIntervalInSeconds;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
set
|
|
396
|
+
{
|
|
397
|
+
presenceHeartbeatIntervalInSeconds = value;
|
|
398
|
+
if (presenceHeartbeatIntervalInSeconds >= pubnubPresenceHeartbeatInSeconds)
|
|
399
|
+
{
|
|
400
|
+
presenceHeartbeatIntervalInSeconds = (pubnubPresenceHeartbeatInSeconds / 2) - 1;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
public LoggingMethod.Level PubnubLogLevel
|
|
406
|
+
{
|
|
407
|
+
get
|
|
408
|
+
{
|
|
409
|
+
return pubnubLogLevel;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
set
|
|
413
|
+
{
|
|
414
|
+
pubnubLogLevel = value;
|
|
415
|
+
LoggingMethod.LogLevel = pubnubLogLevel;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
public PubnubErrorFilter.Level PubnubErrorLevel
|
|
420
|
+
{
|
|
421
|
+
get
|
|
422
|
+
{
|
|
423
|
+
return errorLevel;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
set
|
|
427
|
+
{
|
|
428
|
+
errorLevel = value;
|
|
429
|
+
PubnubErrorFilter.ErrorLevel = errorLevel;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
string filterExpr;
|
|
434
|
+
public string FilterExpr
|
|
435
|
+
{
|
|
436
|
+
get { return filterExpr; }
|
|
437
|
+
set
|
|
438
|
+
{
|
|
439
|
+
filterExpr = value;
|
|
440
|
+
resetTimetoken = true;
|
|
441
|
+
TerminateCurrentSubscriberRequest();
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
public string Region { get; set; }
|
|
445
|
+
|
|
446
|
+
#endregion
|
|
447
|
+
|
|
448
|
+
#region "Constructors and Destructor"
|
|
449
|
+
|
|
450
|
+
public PubnubUnity(IDependencyProvider provider, string publishKey, string subscribeKey, string secretKey, string cipherKey, bool sslOn, GameObject gob)
|
|
451
|
+
{
|
|
452
|
+
_provider = provider;
|
|
453
|
+
this.Init(publishKey, subscribeKey, secretKey, cipherKey, sslOn, gob);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
public PubnubUnity(IDependencyProvider provider, string publishKey, string subscribeKey, string secretKey, GameObject gob)
|
|
457
|
+
{
|
|
458
|
+
_provider = provider;
|
|
459
|
+
this.Init(publishKey, subscribeKey, secretKey, "", false, gob);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
public PubnubUnity(IDependencyProvider provider, string publishKey, string subscribeKey, GameObject gob)
|
|
463
|
+
{
|
|
464
|
+
_provider = provider;
|
|
465
|
+
this.Init(publishKey, subscribeKey, "", "", false, gob);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
~PubnubUnity()
|
|
469
|
+
{
|
|
470
|
+
LoggingMethod.WriteToLog("Destructing PubnubUnity uuid: " + this.SessionUUID, LoggingMethod.LevelInfo);
|
|
471
|
+
this.CleanUp();
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
#endregion
|
|
475
|
+
|
|
476
|
+
#region "Init"
|
|
477
|
+
|
|
478
|
+
private void Init(string publishKey, string subscribeKey, string secretKey, string cipherKey, bool sslOn, GameObject gob)
|
|
479
|
+
{
|
|
480
|
+
LoggingMethod.LogLevel = pubnubLogLevel;
|
|
481
|
+
PubnubErrorFilter.ErrorLevel = errorLevel;
|
|
482
|
+
|
|
483
|
+
#if (UNITY_IOS)
|
|
484
|
+
Version = string.Format("PubNub-CSharp-UnityIOS/{0}", build);
|
|
485
|
+
#elif (UNITY_STANDALONE_WIN)
|
|
486
|
+
Version = string.Format("PubNub-CSharp-UnityWin/{0}", build);
|
|
487
|
+
#elif (UNITY_STANDALONE_OSX)
|
|
488
|
+
Version = string.Format("PubNub-CSharp-UnityOSX/{0}", build);
|
|
489
|
+
#elif (UNITY_ANDROID)
|
|
490
|
+
Version = string.Format("PubNub-CSharp-UnityAndroid/{0}", build);
|
|
491
|
+
#elif (UNITY_STANDALONE_LINUX)
|
|
492
|
+
Version = string.Format("PubNub-CSharp-UnityLinux/{0}", build);
|
|
493
|
+
#elif (UNITY_WEBPLAYER)
|
|
494
|
+
Version = string.Format("PubNub-CSharp-UnityWeb/{0}", build);
|
|
495
|
+
#elif (UNITY_WEBGL)
|
|
496
|
+
Version = string.Format("PubNub-CSharp-UnityWebGL/{0}", build);
|
|
497
|
+
#else
|
|
498
|
+
Version = string.Format("PubNub-CSharp-Unity5/{0}", build);
|
|
499
|
+
#endif
|
|
500
|
+
LoggingMethod.WriteToLog(Version, LoggingMethod.LevelInfo);
|
|
501
|
+
|
|
502
|
+
gobj = gob;
|
|
503
|
+
coroutine = gobj.AddComponent<CoroutineClass>();
|
|
504
|
+
coroutine.subscribeTimer = SubscribeTimeout;
|
|
505
|
+
coroutine.nonSubscribeTimer = NonSubscribeTimeout;
|
|
506
|
+
coroutine.heartbeatTimer = HeartbeatTimeout;
|
|
507
|
+
coroutine.presenceHeartbeatTimer = HeartbeatTimeout;
|
|
508
|
+
coroutine.heartbeatPauseTimer = NetworkCheckRetryInterval;
|
|
509
|
+
coroutine.presenceHeartbeatPauseTimer = NetworkCheckRetryInterval;
|
|
510
|
+
|
|
511
|
+
this.publishKey = publishKey;
|
|
512
|
+
this.subscribeKey = subscribeKey;
|
|
513
|
+
this.secretKey = secretKey;
|
|
514
|
+
this.cipherKey = cipherKey;
|
|
515
|
+
this.ssl = sslOn;
|
|
516
|
+
|
|
517
|
+
//retriesExceeded = false;
|
|
518
|
+
internetStatus = true;
|
|
519
|
+
resetTimetoken = true;
|
|
520
|
+
publishMessageCounter = new Counter();
|
|
521
|
+
|
|
522
|
+
#if (UNITY_ANDROID || UNITY_STANDALONE || UNITY_IOS)
|
|
523
|
+
ServicePointManager.ServerCertificateValidationCallback = ValidatorUnity;
|
|
524
|
+
#endif
|
|
525
|
+
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
#endregion
|
|
529
|
+
|
|
530
|
+
#region "ValidatorUnity"
|
|
531
|
+
|
|
532
|
+
#if (UNITY_ANDROID || MONOTOUCH || __IOS__ || UNITY_STANDALONE || UNITY_IOS)
|
|
533
|
+
/// <summary>
|
|
534
|
+
/// Workaround for the bug described here
|
|
535
|
+
/// https://bugzilla.xamarin.com/show_bug.cgi?id=6501
|
|
536
|
+
/// </summary>
|
|
537
|
+
/// <param name="sender">Sender.</param>
|
|
538
|
+
/// <param name="certificate">Certificate.</param>
|
|
539
|
+
/// <param name="chain">Chain.</param>
|
|
540
|
+
/// <param name="sslPolicyErrors">Ssl policy errors.</param>
|
|
541
|
+
static bool ValidatorUnity (object sender,
|
|
542
|
+
System.Security.Cryptography.X509Certificates.X509Certificate
|
|
543
|
+
certificate,
|
|
544
|
+
System.Security.Cryptography.X509Certificates.X509Chain chain,
|
|
545
|
+
System.Net.Security.SslPolicyErrors sslPolicyErrors)
|
|
546
|
+
{
|
|
547
|
+
return true;
|
|
548
|
+
}
|
|
549
|
+
#endif
|
|
550
|
+
#endregion
|
|
551
|
+
|
|
552
|
+
#region "PubNub API Channel Methods"
|
|
553
|
+
|
|
554
|
+
#region "Subscribe"
|
|
555
|
+
|
|
556
|
+
public void Subscribe<T>(string channel, string channelGroup, long timetoken, Action<T> userCallback, Action<T> connectCallback,
|
|
557
|
+
Action<T> wildcardPresenceCallback, Action<PubnubClientError> errorCallback)
|
|
558
|
+
{
|
|
559
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, requested subscribe for channel={1}, channelGroup={2}",
|
|
560
|
+
DateTime.Now.ToString(), channel, channelGroup), LoggingMethod.LevelInfo);
|
|
561
|
+
|
|
562
|
+
MultiChannelSubscribeInit<T>(ResponseType.SubscribeV2, channel, channelGroup, timetoken, userCallback, connectCallback,
|
|
563
|
+
errorCallback, wildcardPresenceCallback);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
#endregion
|
|
567
|
+
|
|
568
|
+
#region "Publish"
|
|
569
|
+
|
|
570
|
+
public bool Publish<T>(string channel, object message, bool storeInHistory, Dictionary<string, string> metadata,
|
|
571
|
+
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
572
|
+
{
|
|
573
|
+
string jsonMessage = (enableJsonEncodingForPublish) ? Helpers.JsonEncodePublishMsg(message, this.cipherKey, JsonPluggableLibrary) : message.ToString();
|
|
574
|
+
string jsonMetadata = string.Empty;
|
|
575
|
+
if (metadata != null)
|
|
576
|
+
{
|
|
577
|
+
jsonMetadata = Helpers.JsonEncodePublishMsg(metadata, "", JsonPluggableLibrary);
|
|
578
|
+
}
|
|
579
|
+
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null, userCallback, null, errorCallback, null, null);
|
|
580
|
+
|
|
581
|
+
string request = BuildRequests.BuildPublishRequest(channel, jsonMessage, storeInHistory, this.SessionUUID,
|
|
582
|
+
this.ssl, this.Origin, this.AuthenticationKey, this.publishKey, this.subscribeKey, this.cipherKey,
|
|
583
|
+
this.secretKey, jsonMetadata, this.publishMessageCounter.NextValue());
|
|
584
|
+
|
|
585
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity, ResponseType.Publish,
|
|
586
|
+
false, 0, false, 0, null);
|
|
587
|
+
|
|
588
|
+
return UrlProcessRequest<T>(request, requestState);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
#endregion
|
|
592
|
+
|
|
593
|
+
#region "Presence"
|
|
594
|
+
|
|
595
|
+
public void Presence<T>(string channel, string channelGroup, long timetoken, Action<T> userCallback, Action<T> connectCallback,
|
|
596
|
+
Action<PubnubClientError> errorCallback)
|
|
597
|
+
{
|
|
598
|
+
|
|
599
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, Presence: requested presence for channel={1}, channelGroup={2}",
|
|
600
|
+
DateTime.Now.ToString(), channel, channelGroup), LoggingMethod.LevelInfo);
|
|
601
|
+
|
|
602
|
+
MultiChannelSubscribeInit<T>(ResponseType.PresenceV2, channel, channelGroup, timetoken, userCallback, connectCallback, errorCallback, null);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
#endregion
|
|
606
|
+
|
|
607
|
+
#region "Detailed History"
|
|
608
|
+
|
|
609
|
+
public bool DetailedHistory<T>(string channel, long start, long end, int count, bool reverse, bool includeToken,
|
|
610
|
+
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
611
|
+
{
|
|
612
|
+
string[] channels = new string[] { channel };
|
|
613
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, DetailedHistory: channels={1}, channel={2}", DateTime.Now.ToString(), channels.Length, channel), LoggingMethod.LevelInfo);
|
|
614
|
+
|
|
615
|
+
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity<T>(channels, false, false, null, userCallback, null, errorCallback, null, null);
|
|
616
|
+
|
|
617
|
+
string request = BuildRequests.BuildDetailedHistoryRequest(channel, start, end, count, reverse, includeToken, this.SessionUUID,
|
|
618
|
+
this.ssl, this.Origin, this.AuthenticationKey, this.subscribeKey);
|
|
619
|
+
|
|
620
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity, ResponseType.DetailedHistory, false,
|
|
621
|
+
0, false, 0, null);
|
|
622
|
+
|
|
623
|
+
return UrlProcessRequest<T>(request, requestState);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
#endregion
|
|
627
|
+
|
|
628
|
+
#region "HereNow"
|
|
629
|
+
|
|
630
|
+
public bool HereNow<T>(string channel, string channelGroup, bool showUUIDList, bool includeUserState, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
631
|
+
{
|
|
632
|
+
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null, userCallback, null, errorCallback, null, null);
|
|
633
|
+
|
|
634
|
+
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { channelGroup }, false, true, null, userCallback, null, errorCallback, null, null);
|
|
635
|
+
|
|
636
|
+
channelEntity.AddRange(channelGroupEntity);
|
|
637
|
+
|
|
638
|
+
string request = BuildRequests.BuildHereNowRequest(channel, channelGroup, showUUIDList, includeUserState, this.SessionUUID,
|
|
639
|
+
this.ssl, this.Origin, this.AuthenticationKey, this.subscribeKey);
|
|
640
|
+
|
|
641
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity, ResponseType.HereNow, false,
|
|
642
|
+
0, false, 0, null);
|
|
643
|
+
|
|
644
|
+
return UrlProcessRequest<T>(request, requestState);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
#endregion
|
|
648
|
+
|
|
649
|
+
#region "Global Here Now"
|
|
650
|
+
|
|
651
|
+
public bool GlobalHereNow<T>(bool showUUIDList, bool includeUserState, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
652
|
+
{
|
|
653
|
+
string request = BuildRequests.BuildGlobalHereNowRequest(showUUIDList, includeUserState, this.SessionUUID,
|
|
654
|
+
this.ssl, this.Origin, this.AuthenticationKey, this.subscribeKey);
|
|
655
|
+
|
|
656
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback,
|
|
657
|
+
ResponseType.GlobalHereNow, false, 0, false, 0, null, "");
|
|
658
|
+
|
|
659
|
+
return UrlProcessRequest<T>(request, requestState);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
#endregion
|
|
663
|
+
|
|
664
|
+
#region "WhereNow"
|
|
665
|
+
|
|
666
|
+
public void WhereNow<T>(string uuid, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
667
|
+
{
|
|
668
|
+
if (string.IsNullOrEmpty(uuid))
|
|
669
|
+
{
|
|
670
|
+
uuid = this.SessionUUID;
|
|
671
|
+
}
|
|
672
|
+
string request = BuildRequests.BuildWhereNowRequest(uuid, this.SessionUUID,
|
|
673
|
+
this.ssl, this.Origin, this.AuthenticationKey, this.subscribeKey);
|
|
674
|
+
|
|
675
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback, ResponseType.WhereNow, false,
|
|
676
|
+
0, false, 0, null, uuid);
|
|
677
|
+
|
|
678
|
+
UrlProcessRequest<T>(request, requestState);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
#endregion
|
|
682
|
+
|
|
683
|
+
#region "Unsubscribe Presence And Subscribe"
|
|
684
|
+
|
|
685
|
+
public void PresenceUnsubscribe<T>(string channel, string channelGroup, Action<T> userCallback, Action<T> connectCallback, Action<T> disconnectCallback,
|
|
686
|
+
Action<PubnubClientError> errorCallback)
|
|
687
|
+
{
|
|
688
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, PresenceUnsubscribe: requested presence-unsubscribe for channel(s)={1}, channelGroup={2}",
|
|
689
|
+
DateTime.Now.ToString(), channel, channelGroup), LoggingMethod.LevelInfo);
|
|
690
|
+
MultiChannelUnsubscribeInit<T>(ResponseType.PresenceUnsubscribe, channel, channelGroup, userCallback,
|
|
691
|
+
connectCallback, disconnectCallback, errorCallback);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/// <summary>
|
|
695
|
+
/// To unsubscribe a channel
|
|
696
|
+
/// </summary>
|
|
697
|
+
/// <typeparam name="T"></typeparam>
|
|
698
|
+
/// <param name="channel"></param>
|
|
699
|
+
/// <param name="userCallback"></param>
|
|
700
|
+
/// <param name="connectCallback"></param>
|
|
701
|
+
/// <param name="disconnectCallback"></param>
|
|
702
|
+
/// <param name="errorCallback"></param>
|
|
703
|
+
public void Unsubscribe<T>(string channel, string channelGroup, Action<T> userCallback, Action<T> connectCallback, Action<T> disconnectCallback,
|
|
704
|
+
Action<T> wildcardPresenceCallback, Action<PubnubClientError> errorCallback)
|
|
705
|
+
{
|
|
706
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, Unsubscribe: requested unsubscribe for channel(s)={1}, channelGroup={2}",
|
|
707
|
+
DateTime.Now.ToString(), channel, channelGroup), LoggingMethod.LevelInfo);
|
|
708
|
+
MultiChannelUnsubscribeInit<T>(ResponseType.Unsubscribe, channel, channelGroup, userCallback,
|
|
709
|
+
connectCallback, disconnectCallback, errorCallback);
|
|
710
|
+
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
#endregion
|
|
714
|
+
|
|
715
|
+
#region "Time"
|
|
716
|
+
|
|
717
|
+
public bool Time<T>(Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
718
|
+
{
|
|
719
|
+
string request = BuildRequests.BuildTimeRequest(this.SessionUUID, this.ssl, this.Origin);
|
|
720
|
+
|
|
721
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback, ResponseType.Time, false,
|
|
722
|
+
0, false, 0, null, "");
|
|
723
|
+
return UrlProcessRequest<T>(request, requestState);
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
#endregion
|
|
727
|
+
|
|
728
|
+
#region "PAM"
|
|
729
|
+
|
|
730
|
+
#region "Grant Access"
|
|
731
|
+
|
|
732
|
+
public bool GrantAccess<T>(string channel, string authenticationKey, bool read, bool write, int ttl, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
733
|
+
{
|
|
734
|
+
if (ttl < 0)
|
|
735
|
+
ttl = 1440;
|
|
736
|
+
|
|
737
|
+
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null,
|
|
738
|
+
userCallback, null, errorCallback, null, null);
|
|
739
|
+
|
|
740
|
+
string request = BuildRequests.BuildGrantAccessRequest(channel, read, write, ttl, this.SessionUUID,
|
|
741
|
+
this.ssl, this.Origin, authenticationKey, this.publishKey, this.subscribeKey, this.cipherKey, this.secretKey);
|
|
742
|
+
|
|
743
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity, ResponseType.GrantAccess, false,
|
|
744
|
+
0, false, 0, null, "", userCallback, errorCallback);
|
|
745
|
+
|
|
746
|
+
return UrlProcessRequest<T>(request, requestState);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
#endregion
|
|
750
|
+
|
|
751
|
+
#region "Grant Presence Access"
|
|
752
|
+
|
|
753
|
+
public bool GrantPresenceAccess<T>(string channel, string authenticationKey, bool read, bool write, int ttl, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
754
|
+
{
|
|
755
|
+
string[] multiChannels = channel.Split(',');
|
|
756
|
+
if (multiChannels.Length > 0)
|
|
757
|
+
{
|
|
758
|
+
for (int index = 0; index < multiChannels.Length; index++)
|
|
759
|
+
{
|
|
760
|
+
if (!string.IsNullOrEmpty(multiChannels[index]) && multiChannels[index].Trim().Length > 0)
|
|
761
|
+
{
|
|
762
|
+
multiChannels[index] = string.Format("{0}{1}", multiChannels[index], Utility.PresenceChannelSuffix);
|
|
763
|
+
}
|
|
764
|
+
else
|
|
765
|
+
{
|
|
766
|
+
throw new MissingMemberException("Invalid channel");
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
string presenceChannel = string.Join(",", multiChannels);
|
|
771
|
+
return GrantAccess(presenceChannel, authenticationKey, read, write, ttl, userCallback, errorCallback);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
#endregion
|
|
775
|
+
|
|
776
|
+
#region "Audit Access"
|
|
777
|
+
|
|
778
|
+
public void AuditAccess<T>(string channel, string authenticationKey, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
779
|
+
{
|
|
780
|
+
string request = BuildRequests.BuildAuditAccessRequest(channel, this.SessionUUID,
|
|
781
|
+
this.ssl, this.Origin, authenticationKey, this.publishKey, this.subscribeKey, this.cipherKey, this.secretKey);
|
|
782
|
+
|
|
783
|
+
RequestState<T> requestState = null;
|
|
784
|
+
if (string.IsNullOrEmpty(channel))
|
|
785
|
+
{
|
|
786
|
+
requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback,
|
|
787
|
+
ResponseType.AuditAccess, false, 0, false, 0, null, "");
|
|
788
|
+
}
|
|
789
|
+
else
|
|
790
|
+
{
|
|
791
|
+
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null,
|
|
792
|
+
userCallback, null, errorCallback, null, null);
|
|
793
|
+
|
|
794
|
+
requestState = BuildRequests.BuildRequestState<T>(channelEntity,
|
|
795
|
+
ResponseType.AuditAccess, false, 0, false, 0, null, "", userCallback, errorCallback);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
UrlProcessRequest<T>(request, requestState);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
#endregion
|
|
802
|
+
|
|
803
|
+
#region "Audit Presence"
|
|
804
|
+
|
|
805
|
+
public void AuditPresenceAccess<T>(string channel, string authenticationKey, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
806
|
+
{
|
|
807
|
+
string[] multiChannels = channel.Split(',');
|
|
808
|
+
if (multiChannels.Length > 0)
|
|
809
|
+
{
|
|
810
|
+
for (int index = 0; index < multiChannels.Length; index++)
|
|
811
|
+
{
|
|
812
|
+
multiChannels[index] = string.Format("{0}{1}", multiChannels[index], Utility.PresenceChannelSuffix);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
string presenceChannel = string.Join(",", multiChannels);
|
|
816
|
+
AuditAccess<T>(presenceChannel, authenticationKey, userCallback, errorCallback);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
#endregion
|
|
820
|
+
|
|
821
|
+
#endregion
|
|
822
|
+
|
|
823
|
+
#region "Set User State"
|
|
824
|
+
|
|
825
|
+
public void SetUserState<T>(string channel, string channelGroup, string uuid, string jsonUserState,
|
|
826
|
+
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
827
|
+
{
|
|
828
|
+
if (!JsonPluggableLibrary.IsDictionaryCompatible(jsonUserState))
|
|
829
|
+
{
|
|
830
|
+
throw new MissingMemberException("Missing json format for user state");
|
|
831
|
+
}
|
|
832
|
+
else
|
|
833
|
+
{
|
|
834
|
+
IDictionary<string, object> deserializeUserState = JsonPluggableLibrary.DeserializeToDictionaryOfObject(jsonUserState);
|
|
835
|
+
if (deserializeUserState == null)
|
|
836
|
+
{
|
|
837
|
+
throw new MissingMemberException("Missing JSON formatted user state");
|
|
838
|
+
}
|
|
839
|
+
else
|
|
840
|
+
{
|
|
841
|
+
string userState = "";
|
|
842
|
+
List<ChannelEntity> channelEntities;
|
|
843
|
+
if (Helpers.CheckAndAddExistingUserState<T>(channel, channelGroup,
|
|
844
|
+
deserializeUserState, userCallback, errorCallback, errorLevel, false,
|
|
845
|
+
out userState, out channelEntities, _provider
|
|
846
|
+
))
|
|
847
|
+
{
|
|
848
|
+
SharedSetUserState<T>(channel, channelGroup,
|
|
849
|
+
channelEntities, uuid, userState);
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
public void SetUserState<T>(string channel, string channelGroup, string uuid,
|
|
856
|
+
KeyValuePair<string, object> keyValuePair,
|
|
857
|
+
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
858
|
+
{
|
|
859
|
+
string userState = "";
|
|
860
|
+
List<ChannelEntity> channelEntities;
|
|
861
|
+
if (Helpers.CheckAndAddExistingUserState<T>(channel, channelGroup,
|
|
862
|
+
new Dictionary<string, object> { { keyValuePair.Key, keyValuePair.Value } }, userCallback,
|
|
863
|
+
errorCallback, errorLevel, true, out userState, out channelEntities, _provider
|
|
864
|
+
))
|
|
865
|
+
{
|
|
866
|
+
|
|
867
|
+
SharedSetUserState<T>(channel, channelGroup, channelEntities, uuid, userState);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
#endregion
|
|
872
|
+
|
|
873
|
+
#region "User State"
|
|
874
|
+
private void SharedSetUserState<T>(string channel, string channelGroup,
|
|
875
|
+
List<ChannelEntity> channelEntities, string uuid, string jsonUserState
|
|
876
|
+
)
|
|
877
|
+
{
|
|
878
|
+
if (string.IsNullOrEmpty(uuid))
|
|
879
|
+
{
|
|
880
|
+
uuid = this.SessionUUID;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
string request = BuildRequests.BuildSetUserStateRequest(channel, channelGroup, jsonUserState, uuid, this.SessionUUID,
|
|
884
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
885
|
+
|
|
886
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntities, ResponseType.SetUserState, false,
|
|
887
|
+
0, false, 0, null);
|
|
888
|
+
|
|
889
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, SharedSetUserState: channelEntities count {1}, " +
|
|
890
|
+
"channelGroup: {2}, channel: {3}, uuid: {4}, sessionUUID: {5}",
|
|
891
|
+
DateTime.Now.ToString(), (channelEntities != null) ? channelEntities.Count.ToString() : "null",
|
|
892
|
+
channelGroup, channel, uuid, this.SessionUUID
|
|
893
|
+
), LoggingMethod.LevelInfo);
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
UrlProcessRequest<T>(request, requestState);
|
|
897
|
+
|
|
898
|
+
//bounce the long-polling subscribe requests to update user state
|
|
899
|
+
TerminateCurrentSubscriberRequest<T>();
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
#endregion
|
|
903
|
+
|
|
904
|
+
#region "Get User State"
|
|
905
|
+
|
|
906
|
+
public void GetUserState<T>(string channel, string channelGroup, string uuid, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
907
|
+
{
|
|
908
|
+
if (string.IsNullOrEmpty(uuid))
|
|
909
|
+
{
|
|
910
|
+
uuid = this.SessionUUID;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null,
|
|
914
|
+
userCallback, null, errorCallback, null, null);
|
|
915
|
+
|
|
916
|
+
List<ChannelEntity> channelGroupsEntity = Helpers.CreateChannelEntity(new string[] { channelGroup }, false, true, null,
|
|
917
|
+
userCallback, null, errorCallback, null, null);
|
|
918
|
+
|
|
919
|
+
channelEntity.AddRange(channelGroupsEntity);
|
|
920
|
+
|
|
921
|
+
string request = BuildRequests.BuildGetUserStateRequest(channel, channelGroup, uuid, this.SessionUUID,
|
|
922
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
923
|
+
|
|
924
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity, ResponseType.GetUserState, false,
|
|
925
|
+
0, false, 0, null);
|
|
926
|
+
|
|
927
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, GetUserState: channelEntities count {1}, " +
|
|
928
|
+
"channelGroup: {2}, channel: {3}, uuid: {4}, sessionUUID: {5} ",
|
|
929
|
+
DateTime.Now.ToString(), (channelEntity != null) ? channelEntity.Count.ToString() : "null", channelGroup, channel,
|
|
930
|
+
uuid, this.SessionUUID
|
|
931
|
+
), LoggingMethod.LevelInfo);
|
|
932
|
+
|
|
933
|
+
UrlProcessRequest<T>(request, requestState);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
#endregion
|
|
937
|
+
|
|
938
|
+
#region "MobilePush"
|
|
939
|
+
|
|
940
|
+
public void RegisterDeviceForPush<T>(string channel, PushTypeService pushType, string pushToken, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
941
|
+
{
|
|
942
|
+
string request = BuildRequests.BuildRegisterDevicePushRequest(channel, pushType, pushToken, this.SessionUUID,
|
|
943
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
944
|
+
|
|
945
|
+
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null,
|
|
946
|
+
userCallback, null, errorCallback, null, null);
|
|
947
|
+
|
|
948
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity,
|
|
949
|
+
ResponseType.PushRegister, false, 0, false, 0, null);
|
|
950
|
+
|
|
951
|
+
UrlProcessRequest<T>(request, requestState);
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
public void UnregisterDeviceForPush<T>(PushTypeService pushType, string pushToken, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
955
|
+
{
|
|
956
|
+
string request = BuildRequests.BuildUnregisterDevicePushRequest(pushType, pushToken, this.SessionUUID,
|
|
957
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
958
|
+
|
|
959
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback,
|
|
960
|
+
ResponseType.PushUnregister, false, 0, false, 0, null, "");
|
|
961
|
+
|
|
962
|
+
UrlProcessRequest<T>(request, requestState);
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
public void RemoveChannelForDevicePush<T>(string channel, PushTypeService pushType, string pushToken, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
966
|
+
{
|
|
967
|
+
string request = BuildRequests.BuildRemoveChannelPushRequest(channel, pushType, pushToken, this.SessionUUID,
|
|
968
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
969
|
+
|
|
970
|
+
List<ChannelEntity> channelEntity = Helpers.CreateChannelEntity(new string[] { channel }, false, false, null,
|
|
971
|
+
userCallback, null, errorCallback, null, null);
|
|
972
|
+
|
|
973
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelEntity,
|
|
974
|
+
ResponseType.PushRemove, false, 0, false, 0, null);
|
|
975
|
+
|
|
976
|
+
UrlProcessRequest<T>(request, requestState);
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
public void GetChannelsForDevicePush<T>(PushTypeService pushType, string pushToken, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
980
|
+
{
|
|
981
|
+
string request = BuildRequests.BuildGetChannelsPushRequest(pushType, pushToken, this.SessionUUID,
|
|
982
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
983
|
+
|
|
984
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback,
|
|
985
|
+
ResponseType.PushGet, false, 0, false, 0, null, "");
|
|
986
|
+
|
|
987
|
+
UrlProcessRequest<T>(request, requestState);
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
#endregion
|
|
991
|
+
|
|
992
|
+
#region "Channel Groups"
|
|
993
|
+
public void AddChannelsToChannelGroup<T>(string[] channels, string nameSpace, string groupName,
|
|
994
|
+
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
995
|
+
{
|
|
996
|
+
string request = BuildRequests.BuildAddChannelsToChannelGroupRequest(channels, nameSpace, groupName, this.SessionUUID,
|
|
997
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
998
|
+
|
|
999
|
+
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { groupName }, false, true, null,
|
|
1000
|
+
userCallback, null, errorCallback, null, null);
|
|
1001
|
+
|
|
1002
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1003
|
+
ResponseType.ChannelGroupAdd, false, 0, false, 0, null
|
|
1004
|
+
|
|
1005
|
+
);
|
|
1006
|
+
|
|
1007
|
+
UrlProcessRequest<T>(request, requestState);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
public void RemoveChannelsFromChannelGroup<T>(string[] channels, string nameSpace, string groupName,
|
|
1011
|
+
Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1012
|
+
{
|
|
1013
|
+
string request = BuildRequests.BuildRemoveChannelsFromChannelGroupRequest(channels, nameSpace, groupName, this.SessionUUID,
|
|
1014
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
1015
|
+
|
|
1016
|
+
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { groupName }, false, true, null,
|
|
1017
|
+
userCallback, null, errorCallback, null, null);
|
|
1018
|
+
|
|
1019
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1020
|
+
ResponseType.ChannelGroupRemove, false, 0, false, 0, null
|
|
1021
|
+
);
|
|
1022
|
+
|
|
1023
|
+
UrlProcessRequest<T>(request, requestState);
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
public void RemoveChannelGroup<T>(string nameSpace, string groupName, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1027
|
+
{
|
|
1028
|
+
string request = BuildRequests.BuildRemoveChannelsFromChannelGroupRequest(null, nameSpace, groupName, this.SessionUUID,
|
|
1029
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
1030
|
+
|
|
1031
|
+
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { groupName }, false, true, null,
|
|
1032
|
+
userCallback, null, errorCallback, null, null);
|
|
1033
|
+
|
|
1034
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1035
|
+
ResponseType.ChannelGroupRemove, false, 0, false, 0, null
|
|
1036
|
+
);
|
|
1037
|
+
|
|
1038
|
+
UrlProcessRequest<T>(request, requestState);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
public void GetChannelsForChannelGroup<T>(string nameSpace, string groupName, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1042
|
+
{
|
|
1043
|
+
string request = BuildRequests.BuildGetChannelsForChannelGroupRequest(nameSpace, groupName, false, this.SessionUUID,
|
|
1044
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
1045
|
+
|
|
1046
|
+
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { groupName }, false, true, null,
|
|
1047
|
+
userCallback, null, errorCallback, null, null);
|
|
1048
|
+
|
|
1049
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1050
|
+
ResponseType.ChannelGroupGet, false, 0, false, 0, null
|
|
1051
|
+
);
|
|
1052
|
+
|
|
1053
|
+
UrlProcessRequest<T>(request, requestState);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
public void GetAllChannelGroups<T>(string nameSpace, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1057
|
+
{
|
|
1058
|
+
string request = BuildRequests.BuildGetChannelsForChannelGroupRequest(nameSpace, "", true, this.SessionUUID,
|
|
1059
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
1060
|
+
|
|
1061
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(userCallback, errorCallback,
|
|
1062
|
+
ResponseType.ChannelGroupGet, false, 0, false, 0, null,
|
|
1063
|
+
""
|
|
1064
|
+
);
|
|
1065
|
+
|
|
1066
|
+
UrlProcessRequest<T>(request, requestState);
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
public void ChannelGroupAuditAccess<T>(string channelGroup, string authenticationKey, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1070
|
+
{
|
|
1071
|
+
string request = BuildRequests.BuildChannelGroupAuditAccessRequest(channelGroup, this.SessionUUID,
|
|
1072
|
+
this.ssl, this.Origin, authenticationKey, this.publishKey, this.subscribeKey, this.cipherKey, this.secretKey);
|
|
1073
|
+
|
|
1074
|
+
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { channelGroup }, false, true, null,
|
|
1075
|
+
userCallback, null, errorCallback, null, null);
|
|
1076
|
+
|
|
1077
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1078
|
+
ResponseType.ChannelGroupAuditAccess, false, 0, false, 0, null
|
|
1079
|
+
);
|
|
1080
|
+
|
|
1081
|
+
UrlProcessRequest<T>(request, requestState);
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
public bool ChannelGroupGrantAccess<T>(string channelGroup, string authenticationKey, bool read, bool write, bool manage,
|
|
1085
|
+
int ttl, Action<T> userCallback, Action<PubnubClientError> errorCallback)
|
|
1086
|
+
{
|
|
1087
|
+
if (ttl < 0)
|
|
1088
|
+
ttl = 1440;
|
|
1089
|
+
|
|
1090
|
+
string request = BuildRequests.BuildChannelGroupGrantAccessRequest(channelGroup, read, write, manage, ttl, this.SessionUUID,
|
|
1091
|
+
this.ssl, this.Origin, authenticationKey, this.publishKey, this.subscribeKey, this.cipherKey, this.secretKey);
|
|
1092
|
+
|
|
1093
|
+
List<ChannelEntity> channelGroupEntity = Helpers.CreateChannelEntity(new string[] { channelGroup }, false, true, null,
|
|
1094
|
+
userCallback, null, errorCallback, null, null);
|
|
1095
|
+
|
|
1096
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(channelGroupEntity,
|
|
1097
|
+
ResponseType.ChannelGroupGrantAccess, false, 0, false, 0, null
|
|
1098
|
+
);
|
|
1099
|
+
|
|
1100
|
+
return UrlProcessRequest<T>(request, requestState);
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
#endregion
|
|
1104
|
+
|
|
1105
|
+
#region "PubNub API Other Methods"
|
|
1106
|
+
|
|
1107
|
+
public void TerminateCurrentSubscriberRequest()
|
|
1108
|
+
{
|
|
1109
|
+
TerminateCurrentSubscriberRequest<object>();
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
public void TerminateCurrentSubscriberRequest<T>()
|
|
1113
|
+
{
|
|
1114
|
+
StopHeartbeat<T>();
|
|
1115
|
+
StopPresenceHeartbeat<T>();
|
|
1116
|
+
ResetInternetCheckSettings();
|
|
1117
|
+
RequestState<T> reqState = StoredRequestState.GetStoredRequestState(CurrentRequestType.Subscribe) as RequestState<T>;
|
|
1118
|
+
if (reqState == null)
|
|
1119
|
+
{
|
|
1120
|
+
if (typeof(T).Equals(typeof(object)))
|
|
1121
|
+
{
|
|
1122
|
+
RequestState<string> reqStateStr = StoredRequestState.GetStoredRequestState(CurrentRequestType.Subscribe) as RequestState<string>;
|
|
1123
|
+
coroutine.BounceRequest<string>(CurrentRequestType.Subscribe, reqStateStr, true);
|
|
1124
|
+
}
|
|
1125
|
+
else if (typeof(T).Equals(typeof(string)))
|
|
1126
|
+
{
|
|
1127
|
+
RequestState<object> reqStateObj = StoredRequestState.GetStoredRequestState(CurrentRequestType.Subscribe) as RequestState<object>;
|
|
1128
|
+
coroutine.BounceRequest<object>(CurrentRequestType.Subscribe, reqStateObj, true);
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
else
|
|
1132
|
+
{
|
|
1133
|
+
coroutine.BounceRequest<T>(CurrentRequestType.Subscribe, reqState, true);
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0} TerminateCurrentSubscriberRequest RequestState {1}", DateTime.Now.ToString(),
|
|
1137
|
+
(reqState == null) ? "null" : reqState.ID.ToString()
|
|
1138
|
+
), LoggingMethod.LevelInfo);
|
|
1139
|
+
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
public void EndPendingRequests<T>()
|
|
1143
|
+
{
|
|
1144
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, EndPendingRequests: ending open requests.", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1145
|
+
coroutine.BounceRequest<T>(CurrentRequestType.Subscribe, null, false);
|
|
1146
|
+
coroutine.BounceRequest<T>(CurrentRequestType.NonSubscribe, null, false);
|
|
1147
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, EndPendingRequests: Request bounced.", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1148
|
+
StopHeartbeat();
|
|
1149
|
+
StopPresenceHeartbeat();
|
|
1150
|
+
ResetInternetCheckSettings();
|
|
1151
|
+
Subscription.CleanUp();
|
|
1152
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, EndPendingRequests: Subscription cleanup complete.", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
public void ResetPublishMessageCounter()
|
|
1156
|
+
{
|
|
1157
|
+
publishMessageCounter.Reset();
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
/// <summary>
|
|
1161
|
+
/// must be called on reset.
|
|
1162
|
+
/// </summary>
|
|
1163
|
+
public void CleanUp()
|
|
1164
|
+
{
|
|
1165
|
+
publishMessageCounter.Reset();
|
|
1166
|
+
|
|
1167
|
+
LoggingMethod.WriteToLog("CleanUp: Destructing coroutine", LoggingMethod.LevelInfo);
|
|
1168
|
+
if (coroutine != null)
|
|
1169
|
+
{
|
|
1170
|
+
UnityEngine.Object.Destroy(coroutine);
|
|
1171
|
+
}
|
|
1172
|
+
LoggingMethod.WriteToLog("CleanUp: Destructing GameObject", LoggingMethod.LevelInfo);
|
|
1173
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0} Clean up complete.", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
#endregion
|
|
1177
|
+
|
|
1178
|
+
#region "Change UUID"
|
|
1179
|
+
|
|
1180
|
+
public void ChangeUUID<T>(string newUUID)
|
|
1181
|
+
{
|
|
1182
|
+
if (string.IsNullOrEmpty(newUUID) || this.SessionUUID == newUUID)
|
|
1183
|
+
{
|
|
1184
|
+
return;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
uuidChanged = true;
|
|
1188
|
+
|
|
1189
|
+
string oldUUID = SessionUUID;
|
|
1190
|
+
|
|
1191
|
+
SessionUUID = newUUID;
|
|
1192
|
+
|
|
1193
|
+
if (Subscription.HasChannelsOrChannelGroups)
|
|
1194
|
+
{
|
|
1195
|
+
string request = BuildRequests.BuildMultiChannelLeaveRequest(Helpers.GetNamesFromChannelEntities(Subscription.AllChannels, false),
|
|
1196
|
+
Helpers.GetNamesFromChannelEntities(Subscription.AllChannelGroups, true), oldUUID,
|
|
1197
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey, _provider);
|
|
1198
|
+
|
|
1199
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(Subscription.AllSubscribedChannelsAndChannelGroups,
|
|
1200
|
+
ResponseType.Leave, false, 0, false, 0, null);
|
|
1201
|
+
|
|
1202
|
+
UrlProcessRequest<T>(request, requestState);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
TerminateCurrentSubscriberRequest<T>();
|
|
1206
|
+
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
#endregion
|
|
1210
|
+
|
|
1211
|
+
#endregion
|
|
1212
|
+
|
|
1213
|
+
#region "Heartbeats"
|
|
1214
|
+
|
|
1215
|
+
void StopHeartbeat()
|
|
1216
|
+
{
|
|
1217
|
+
StopHeartbeat<object>();
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
void StopHeartbeat<T>()
|
|
1221
|
+
{
|
|
1222
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, Stopping Heartbeat ", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1223
|
+
keepHearbeatRunning = false;
|
|
1224
|
+
isHearbeatRunning = false;
|
|
1225
|
+
coroutine.HeartbeatCoroutineComplete -= CoroutineCompleteHandler<T>;
|
|
1226
|
+
coroutine.BounceRequest<T>(CurrentRequestType.Heartbeat, null, false);
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
void StopPresenceHeartbeat()
|
|
1230
|
+
{
|
|
1231
|
+
StopPresenceHeartbeat<object>();
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
void StopPresenceHeartbeat<T>()
|
|
1235
|
+
{
|
|
1236
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, Stopping PresenceHeartbeat ", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1237
|
+
keepPresenceHearbeatRunning = false;
|
|
1238
|
+
isPresenceHearbeatRunning = false;
|
|
1239
|
+
coroutine.PresenceHeartbeatCoroutineComplete -= CoroutineCompleteHandler<T>;
|
|
1240
|
+
coroutine.BounceRequest<T>(CurrentRequestType.PresenceHeartbeat, null, false);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
void StartPresenceHeartbeat<T>(bool pause, int pauseTime, RequestState<T> pubnubRequestState)
|
|
1244
|
+
{
|
|
1245
|
+
try
|
|
1246
|
+
{
|
|
1247
|
+
if (Subscription.AllNonPresenceChannelsOrChannelGroups.Count > 0)
|
|
1248
|
+
{
|
|
1249
|
+
isPresenceHearbeatRunning = true;
|
|
1250
|
+
string channelsJsonState = Subscription.CompiledUserState;
|
|
1251
|
+
|
|
1252
|
+
string requestUrl = BuildRequests.BuildPresenceHeartbeatRequest(
|
|
1253
|
+
Helpers.GetNamesFromChannelEntities(Subscription.AllNonPresenceChannelsOrChannelGroups, false),
|
|
1254
|
+
Helpers.GetNamesFromChannelEntities(Subscription.AllNonPresenceChannelsOrChannelGroups, true),
|
|
1255
|
+
channelsJsonState, this.SessionUUID,
|
|
1256
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey);
|
|
1257
|
+
|
|
1258
|
+
coroutine.PresenceHeartbeatCoroutineComplete += CoroutineCompleteHandler<T>;
|
|
1259
|
+
|
|
1260
|
+
//for heartbeat and presence heartbeat treat reconnect as pause
|
|
1261
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(pubnubRequestState.ChannelEntities, ResponseType.PresenceHeartbeat,
|
|
1262
|
+
pause, pubnubRequestState.ID, false, 0, null);
|
|
1263
|
+
StoredRequestState.SetRequestState(CurrentRequestType.PresenceHeartbeat, requestState);
|
|
1264
|
+
coroutine.Run<T>(requestUrl, requestState, HeartbeatTimeout, pauseTime);
|
|
1265
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, StartPresenceHeartbeat: PresenceHeartbeat running for {1}", DateTime.Now.ToString(), pubnubRequestState.ID), LoggingMethod.LevelInfo);
|
|
1266
|
+
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
catch (Exception ex)
|
|
1270
|
+
{
|
|
1271
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, StartPresenceHeartbeat: PresenceHeartbeat exception {1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1272
|
+
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
void RunPresenceHeartbeat<T>(bool pause, int pauseTime, RequestState<T> pubnubRequestState)
|
|
1277
|
+
{
|
|
1278
|
+
keepPresenceHearbeatRunning = true;
|
|
1279
|
+
if (!isPresenceHearbeatRunning)
|
|
1280
|
+
{
|
|
1281
|
+
StartPresenceHeartbeat<T>(pause, pauseTime, pubnubRequestState);
|
|
1282
|
+
}
|
|
1283
|
+
else
|
|
1284
|
+
{
|
|
1285
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RunPresenceHeartbeat: PresenceHeartbeat Already Running ", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
void StartHeartbeat<T>(bool pause, int pauseTime, RequestState<T> pubnubRequestState)
|
|
1291
|
+
{
|
|
1292
|
+
try
|
|
1293
|
+
{
|
|
1294
|
+
isHearbeatRunning = true;
|
|
1295
|
+
string requestUrl = BuildRequests.BuildTimeRequest(this.SessionUUID,
|
|
1296
|
+
this.ssl, this.Origin);
|
|
1297
|
+
|
|
1298
|
+
coroutine.HeartbeatCoroutineComplete += CoroutineCompleteHandler<T>;
|
|
1299
|
+
//for heartbeat and presence heartbeat treat reconnect as pause
|
|
1300
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(pubnubRequestState.ChannelEntities,
|
|
1301
|
+
ResponseType.Heartbeat, pause, pubnubRequestState.ID, false, 0, null);
|
|
1302
|
+
StoredRequestState.SetRequestState(CurrentRequestType.Heartbeat, requestState);
|
|
1303
|
+
coroutine.Run<T>(requestUrl, requestState, HeartbeatTimeout, pauseTime);
|
|
1304
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, StartHeartbeat: Heartbeat running for {1}", DateTime.Now.ToString(), pubnubRequestState.ID), LoggingMethod.LevelInfo);
|
|
1305
|
+
|
|
1306
|
+
}
|
|
1307
|
+
catch (Exception ex)
|
|
1308
|
+
{
|
|
1309
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, StartHeartbeat: Heartbeat exception {1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1310
|
+
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
void RunHeartbeat<T>(bool pause, int pauseTime, RequestState<T> pubnubRequestState)
|
|
1315
|
+
{
|
|
1316
|
+
keepHearbeatRunning = true;
|
|
1317
|
+
if (!isHearbeatRunning)
|
|
1318
|
+
{
|
|
1319
|
+
StartHeartbeat<T>(pause, pauseTime, pubnubRequestState);
|
|
1320
|
+
}
|
|
1321
|
+
else
|
|
1322
|
+
{
|
|
1323
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RunHeartbeat: Heartbeat Already Running ", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
#endregion
|
|
1329
|
+
|
|
1330
|
+
#region "Handlers"
|
|
1331
|
+
private void InternetConnectionAvailableHandler<T>(CustomEventArgs<T> cea)
|
|
1332
|
+
{
|
|
1333
|
+
internetStatus = true;
|
|
1334
|
+
//retriesExceeded = false;
|
|
1335
|
+
if (retryCount > 0)
|
|
1336
|
+
{
|
|
1337
|
+
string cbMessage = string.Format("DateTime {0}, InternetConnectionAvailableHandler: Internet Connection Available.", DateTime.Now.ToString());
|
|
1338
|
+
LoggingMethod.WriteToLog(cbMessage, LoggingMethod.LevelInfo);
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
PubnubCallbacks.FireErrorCallbacksForAllChannels<T>(cbMessage, cea.PubnubRequestState,
|
|
1342
|
+
PubnubErrorSeverity.Info, PubnubErrorCode.YesInternet, PubnubErrorLevel);
|
|
1343
|
+
|
|
1344
|
+
MultiplexExceptionHandler<T>(ResponseType.SubscribeV2, false, true);
|
|
1345
|
+
}
|
|
1346
|
+
retryCount = 0;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
private void HeartbeatHandler<T>(CustomEventArgs<T> cea)
|
|
1350
|
+
{
|
|
1351
|
+
if (cea.IsTimeout || cea.IsError)
|
|
1352
|
+
{
|
|
1353
|
+
RetryLoop<T>(cea.PubnubRequestState);
|
|
1354
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, HeartbeatHandler: Heartbeat timeout={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1355
|
+
|
|
1356
|
+
}
|
|
1357
|
+
else
|
|
1358
|
+
{
|
|
1359
|
+
InternetConnectionAvailableHandler<T>(cea);
|
|
1360
|
+
}
|
|
1361
|
+
isHearbeatRunning = false;
|
|
1362
|
+
if (keepHearbeatRunning)
|
|
1363
|
+
{
|
|
1364
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, HeartbeatHandler: Restarting Heartbeat {1}", DateTime.Now.ToString(), cea.PubnubRequestState.ID), LoggingMethod.LevelInfo);
|
|
1365
|
+
|
|
1366
|
+
if (internetStatus)
|
|
1367
|
+
{
|
|
1368
|
+
RunHeartbeat<T>(true, LocalClientHeartbeatInterval, cea.PubnubRequestState);
|
|
1369
|
+
}
|
|
1370
|
+
else
|
|
1371
|
+
{
|
|
1372
|
+
RunHeartbeat<T>(true, NetworkCheckRetryInterval, cea.PubnubRequestState);
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
private void PresenceHeartbeatHandler<T>(CustomEventArgs<T> cea)
|
|
1378
|
+
{
|
|
1379
|
+
isPresenceHearbeatRunning = false;
|
|
1380
|
+
|
|
1381
|
+
if (cea.IsTimeout || cea.IsError)
|
|
1382
|
+
{
|
|
1383
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, PresenceHeartbeatHandler: Presence Heartbeat timeout={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1384
|
+
}
|
|
1385
|
+
else
|
|
1386
|
+
{
|
|
1387
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, PresenceHeartbeatHandler: Presence Heartbeat response: {1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelInfo);
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
|
|
1391
|
+
if (keepPresenceHearbeatRunning)
|
|
1392
|
+
{
|
|
1393
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, PresenceHeartbeatHandler: Restarting PresenceHeartbeat ID {1}", DateTime.Now.ToString(), cea.PubnubRequestState.ID), LoggingMethod.LevelInfo);
|
|
1394
|
+
|
|
1395
|
+
RunPresenceHeartbeat<T>(true, PresenceHeartbeatInterval, cea.PubnubRequestState);
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
private void SubscribePresenceHanlder<T>(CustomEventArgs<T> cea)
|
|
1400
|
+
{
|
|
1401
|
+
|
|
1402
|
+
if (cea.IsTimeout || Utility.CheckRequestTimeoutMessageInError(cea))
|
|
1403
|
+
{
|
|
1404
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, SubscribePresenceHanlder: Sub timeout={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1405
|
+
|
|
1406
|
+
}
|
|
1407
|
+
else if (cea.IsError)
|
|
1408
|
+
{
|
|
1409
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, SubscribePresenceHanlder: Sub Error={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1410
|
+
if ((cea.Message.Contains("403"))
|
|
1411
|
+
|| (cea.Message.Contains("451"))
|
|
1412
|
+
|| (cea.Message.Contains("481"))
|
|
1413
|
+
|| (cea.Message.Contains("\"error\":true"))
|
|
1414
|
+
|| (cea.Message.Contains("error: true"))
|
|
1415
|
+
)
|
|
1416
|
+
{
|
|
1417
|
+
requestDelayTime = NetworkCheckRetryInterval;
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
UrlProcessResponseCallbackNonAsync<T>(cea);
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
private void NonSubscribeHandler<T>(CustomEventArgs<T> cea)
|
|
1425
|
+
{
|
|
1426
|
+
if (cea.IsTimeout || Utility.CheckRequestTimeoutMessageInError(cea))
|
|
1427
|
+
{
|
|
1428
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, NonSubscribeHandler: NonSub timeout={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1429
|
+
ExceptionHandlers.UrlRequestCommonExceptionHandler<T>(cea.Message.ToString(), cea.PubnubRequestState, true,
|
|
1430
|
+
false, PubnubErrorLevel);
|
|
1431
|
+
}
|
|
1432
|
+
else if (cea.IsError)
|
|
1433
|
+
{
|
|
1434
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, NonSubscribeHandler: NonSub Error={1}", DateTime.Now.ToString(), cea.Message.ToString()), LoggingMethod.LevelError);
|
|
1435
|
+
ExceptionHandlers.UrlRequestCommonExceptionHandler<T>(cea.Message.ToString(), cea.PubnubRequestState, false, false, PubnubErrorLevel);
|
|
1436
|
+
}
|
|
1437
|
+
else
|
|
1438
|
+
{
|
|
1439
|
+
List<object> result = new List<object>();
|
|
1440
|
+
Helpers.WrapResultBasedOnResponseType<T>(cea.PubnubRequestState, cea.Message,
|
|
1441
|
+
JsonPluggableLibrary, PubnubErrorLevel, this.cipherKey, ref result);
|
|
1442
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, NonSubscribeHandler: result={1}", DateTime.Now.ToString(), (result != null) ? result.Count.ToString() : "null"), LoggingMethod.LevelInfo);
|
|
1443
|
+
|
|
1444
|
+
Helpers.ProcessResponseCallbacks<T>(ref result, cea.PubnubRequestState,
|
|
1445
|
+
this.cipherKey, JsonPluggableLibrary);
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
private void ProcessCoroutineCompleteResponse<T>(CustomEventArgs<T> cea)
|
|
1450
|
+
{
|
|
1451
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ProcessCoroutineCompleteResponse: In handler of event cea {1} RequestType CoroutineCompleteHandler {2}", DateTime.Now.ToString(), cea.PubnubRequestState.RespType.ToString(), typeof(T)), LoggingMethod.LevelInfo);
|
|
1452
|
+
switch (cea.PubnubRequestState.RespType)
|
|
1453
|
+
{
|
|
1454
|
+
case ResponseType.Heartbeat:
|
|
1455
|
+
|
|
1456
|
+
HeartbeatHandler<T>(cea);
|
|
1457
|
+
|
|
1458
|
+
break;
|
|
1459
|
+
|
|
1460
|
+
case ResponseType.PresenceHeartbeat:
|
|
1461
|
+
|
|
1462
|
+
PresenceHeartbeatHandler<T>(cea);
|
|
1463
|
+
|
|
1464
|
+
break;
|
|
1465
|
+
case ResponseType.SubscribeV2:
|
|
1466
|
+
case ResponseType.PresenceV2:
|
|
1467
|
+
|
|
1468
|
+
SubscribePresenceHanlder<T>(cea);
|
|
1469
|
+
|
|
1470
|
+
break;
|
|
1471
|
+
default:
|
|
1472
|
+
|
|
1473
|
+
NonSubscribeHandler<T>(cea);
|
|
1474
|
+
|
|
1475
|
+
break;
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
private void CoroutineCompleteHandler<T>(object sender, EventArgs ea)
|
|
1480
|
+
{
|
|
1481
|
+
CustomEventArgs<T> cea = ea as CustomEventArgs<T>;
|
|
1482
|
+
|
|
1483
|
+
try
|
|
1484
|
+
{
|
|
1485
|
+
if (cea != null)
|
|
1486
|
+
{
|
|
1487
|
+
if (cea.PubnubRequestState != null)
|
|
1488
|
+
{
|
|
1489
|
+
ProcessCoroutineCompleteResponse<T>(cea);
|
|
1490
|
+
}
|
|
1491
|
+
else
|
|
1492
|
+
{
|
|
1493
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, CoroutineCompleteHandler: PubnubRequestState null", DateTime.Now.ToString()), LoggingMethod.LevelError);
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
else
|
|
1497
|
+
{
|
|
1498
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, CoroutineCompleteHandler: cea null", DateTime.Now.ToString()), LoggingMethod.LevelError);
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
catch (Exception ex)
|
|
1502
|
+
{
|
|
1503
|
+
|
|
1504
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, CoroutineCompleteHandler: Exception={1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1505
|
+
|
|
1506
|
+
ExceptionHandlers.UrlRequestCommonExceptionHandler<T>(ex.Message, cea.PubnubRequestState,
|
|
1507
|
+
false, false, PubnubErrorLevel);
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
void ResponseCallbackNonErrorHandler<T>(CustomEventArgs<T> cea, RequestState<T> requestState)
|
|
1512
|
+
{
|
|
1513
|
+
SubscribeEnvelope resultSubscribeEnvelope = null;
|
|
1514
|
+
string jsonString = cea.Message;
|
|
1515
|
+
|
|
1516
|
+
if (!jsonString.Equals("[]"))
|
|
1517
|
+
{
|
|
1518
|
+
resultSubscribeEnvelope = ParseReceiedJSONV2<T>(requestState, jsonString);
|
|
1519
|
+
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
switch (requestState.RespType)
|
|
1523
|
+
{
|
|
1524
|
+
case ResponseType.SubscribeV2:
|
|
1525
|
+
case ResponseType.PresenceV2:
|
|
1526
|
+
Helpers.ProcessResponseCallbacksV2<T>(ref resultSubscribeEnvelope, requestState, this.cipherKey, JsonPluggableLibrary, _provider);
|
|
1527
|
+
if ((resultSubscribeEnvelope != null) && (resultSubscribeEnvelope.TimetokenMeta != null))
|
|
1528
|
+
{
|
|
1529
|
+
ParseReceiedTimetoken<T>(requestState, resultSubscribeEnvelope.TimetokenMeta.Timetoken);
|
|
1530
|
+
|
|
1531
|
+
MultiChannelSubscribeRequest<T>(requestState.RespType, resultSubscribeEnvelope.TimetokenMeta.Timetoken, false);
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
else
|
|
1535
|
+
{
|
|
1536
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ResponseCallbackNonErrorHandler ERROR: Couldn't extract timetoken, initiating fresh subscribe request. \nJSON response:\n {1}",
|
|
1537
|
+
DateTime.Now.ToString(), jsonString), LoggingMethod.LevelError);
|
|
1538
|
+
|
|
1539
|
+
MultiChannelSubscribeRequest<T>(requestState.RespType, 0, false);
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
break;
|
|
1543
|
+
default:
|
|
1544
|
+
break;
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
private void UrlProcessResponseCallbackNonAsync<T>(CustomEventArgs<T> cea)
|
|
1549
|
+
{
|
|
1550
|
+
RequestState<T> requestState = cea.PubnubRequestState;
|
|
1551
|
+
|
|
1552
|
+
try
|
|
1553
|
+
{
|
|
1554
|
+
if ((cea.IsError) || (cea.IsTimeout))
|
|
1555
|
+
{
|
|
1556
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, UrlProcessResponseCallbackNonAsync Message: {1}", DateTime.Now.ToString(), cea.Message), LoggingMethod.LevelError);
|
|
1557
|
+
ExceptionHandlers.ResponseCallbackErrorOrTimeoutHandler<T>(cea, requestState, PubnubErrorLevel);
|
|
1558
|
+
|
|
1559
|
+
}
|
|
1560
|
+
else
|
|
1561
|
+
{
|
|
1562
|
+
|
|
1563
|
+
ResponseCallbackNonErrorHandler<T>(cea, requestState);
|
|
1564
|
+
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
catch (WebException webEx)
|
|
1568
|
+
{
|
|
1569
|
+
|
|
1570
|
+
ExceptionHandlers.ResponseCallbackWebExceptionHandler<T>(cea, requestState, webEx, PubnubErrorLevel);
|
|
1571
|
+
|
|
1572
|
+
}
|
|
1573
|
+
catch (Exception ex)
|
|
1574
|
+
{
|
|
1575
|
+
|
|
1576
|
+
Debug.LogException(ex);
|
|
1577
|
+
|
|
1578
|
+
ExceptionHandlers.ResponseCallbackExceptionHandler<T>(cea, requestState, ex, PubnubErrorLevel);
|
|
1579
|
+
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
protected void MultiplexExceptionHandler<T>(ResponseType type, bool reconnectMaxTried, bool reconnect)
|
|
1584
|
+
{
|
|
1585
|
+
List<ChannelEntity> channelEntities = Subscription.AllSubscribedChannelsAndChannelGroups;
|
|
1586
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiplexExceptionHandler: responsetype={1}", DateTime.Now.ToString(), type.ToString()), LoggingMethod.LevelInfo);
|
|
1587
|
+
string channelGroups = Helpers.GetNamesFromChannelEntities(channelEntities, true);
|
|
1588
|
+
string channels = Helpers.GetNamesFromChannelEntities(channelEntities, false);
|
|
1589
|
+
|
|
1590
|
+
if (reconnectMaxTried)
|
|
1591
|
+
{
|
|
1592
|
+
|
|
1593
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiplexExceptionHandler: MAX retries reached. Exiting the subscribe for channels = {1} and channelgroups = {2}",
|
|
1594
|
+
DateTime.Now.ToString(), channels, channelGroups), LoggingMethod.LevelInfo);
|
|
1595
|
+
|
|
1596
|
+
MultiChannelUnsubscribeInit<T>(ResponseType.Unsubscribe, channels, channelGroups, null, null, null, null);
|
|
1597
|
+
|
|
1598
|
+
Helpers.CheckSubscribedChannelsAndSendCallbacks<T>(Subscription.AllSubscribedChannelsAndChannelGroups,
|
|
1599
|
+
type, NetworkCheckMaxRetries, PubnubErrorLevel);
|
|
1600
|
+
//retriesExceeded = false;
|
|
1601
|
+
}
|
|
1602
|
+
else
|
|
1603
|
+
{
|
|
1604
|
+
if (!internetStatus)
|
|
1605
|
+
{
|
|
1606
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiplexExceptionHandler: Subscribe channels = {1} and channelgroups = {2} - No internet connection. ",
|
|
1607
|
+
DateTime.Now.ToString(), channels, channelGroups), LoggingMethod.LevelInfo);
|
|
1608
|
+
|
|
1609
|
+
return;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
long tt = lastSubscribeTimetoken;
|
|
1613
|
+
if (!EnableResumeOnReconnect && reconnect)
|
|
1614
|
+
{
|
|
1615
|
+
tt = 0; //send 0 time token to enable presence event
|
|
1616
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiplexExceptionHandler: Reconnect true and EnableResumeOnReconnect false sending tt = 0. ",
|
|
1617
|
+
DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
}
|
|
1621
|
+
else
|
|
1622
|
+
{
|
|
1623
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiplexExceptionHandler: sending tt = {1}. ",
|
|
1624
|
+
DateTime.Now.ToString(), tt.ToString()), LoggingMethod.LevelInfo);
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
MultiChannelSubscribeRequest<T>(type, tt, reconnect);
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
private void HandleMultiplexException<T>(object sender, EventArgs ea)
|
|
1632
|
+
{
|
|
1633
|
+
MultiplexExceptionEventArgs<T> mea = ea as MultiplexExceptionEventArgs<T>;
|
|
1634
|
+
MultiplexExceptionHandler<T>(mea.responseType, mea.reconnectMaxTried, mea.resumeOnReconnect);
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
#endregion
|
|
1638
|
+
|
|
1639
|
+
#region "Helpers"
|
|
1640
|
+
|
|
1641
|
+
SubscribeEnvelope ParseReceiedJSONV2<T>(RequestState<T> requestState, string jsonString)
|
|
1642
|
+
{
|
|
1643
|
+
if (!string.IsNullOrEmpty(jsonString))
|
|
1644
|
+
{
|
|
1645
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ParseReceiedJSONV2: jsonString = {1}", DateTime.Now.ToString(), jsonString), LoggingMethod.LevelInfo);
|
|
1646
|
+
//this doesnt work on JSONFx for Unity in case a string is passed in an variable of type object
|
|
1647
|
+
//SubscribeEnvelope resultSubscribeEnvelope = jsonPluggableLibrary.Deserialize<SubscribeEnvelope>(jsonString);
|
|
1648
|
+
object resultSubscribeEnvelope = jsonPluggableLibrary.DeserializeToObject(jsonString);
|
|
1649
|
+
SubscribeEnvelope subscribeEnvelope = new SubscribeEnvelope();
|
|
1650
|
+
|
|
1651
|
+
if (resultSubscribeEnvelope is IDictionary<string, object>)
|
|
1652
|
+
{
|
|
1653
|
+
|
|
1654
|
+
IDictionary<string, object> message = (IDictionary<string, object>)resultSubscribeEnvelope;
|
|
1655
|
+
subscribeEnvelope.TimetokenMeta = Helpers.CreateTimetokenMetadata(message["t"], "Subscribe TT: ");
|
|
1656
|
+
subscribeEnvelope.Messages = Helpers.CreateListOfSubscribeMessage(message["m"]);
|
|
1657
|
+
|
|
1658
|
+
return subscribeEnvelope;
|
|
1659
|
+
}
|
|
1660
|
+
else
|
|
1661
|
+
{
|
|
1662
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ParseReceiedJSONV2: resultSubscribeEnvelope is not dict",
|
|
1663
|
+
DateTime.Now.ToString()), LoggingMethod.LevelError);
|
|
1664
|
+
return null;
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
else
|
|
1668
|
+
{
|
|
1669
|
+
return null;
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
void ParseReceiedTimetoken<T>(RequestState<T> requestState, long receivedTimetoken)
|
|
1675
|
+
{
|
|
1676
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ParseReceiedTimetoken: receivedTimetoken = {1}",
|
|
1677
|
+
DateTime.Now.ToString(), receivedTimetoken.ToString()),
|
|
1678
|
+
LoggingMethod.LevelInfo);
|
|
1679
|
+
lastSubscribeTimetoken = receivedTimetoken;
|
|
1680
|
+
if (!enableResumeOnReconnect)
|
|
1681
|
+
{
|
|
1682
|
+
lastSubscribeTimetoken = receivedTimetoken;
|
|
1683
|
+
}
|
|
1684
|
+
else
|
|
1685
|
+
{
|
|
1686
|
+
//do nothing. keep last subscribe token
|
|
1687
|
+
}
|
|
1688
|
+
if (requestState.Reconnect)
|
|
1689
|
+
{
|
|
1690
|
+
if (enableResumeOnReconnect)
|
|
1691
|
+
{
|
|
1692
|
+
//do nothing. keep last subscribe token
|
|
1693
|
+
}
|
|
1694
|
+
else
|
|
1695
|
+
{
|
|
1696
|
+
lastSubscribeTimetoken = receivedTimetoken;
|
|
1697
|
+
}
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
private void RunRequests<T>(string requestUri, RequestState<T> pubnubRequestState)
|
|
1702
|
+
{
|
|
1703
|
+
if (pubnubRequestState.RespType.Equals(ResponseType.SubscribeV2) || pubnubRequestState.RespType.Equals(ResponseType.PresenceV2)
|
|
1704
|
+
)
|
|
1705
|
+
{
|
|
1706
|
+
RequestState<T> pubnubRequestStateHB = pubnubRequestState;
|
|
1707
|
+
pubnubRequestStateHB.ID = DateTime.Now.Ticks;
|
|
1708
|
+
|
|
1709
|
+
RunHeartbeat<T>(false, LocalClientHeartbeatInterval, pubnubRequestStateHB);
|
|
1710
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RunRequests: Heartbeat started", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1711
|
+
if (PresenceHeartbeatInterval > 0)
|
|
1712
|
+
{
|
|
1713
|
+
RunPresenceHeartbeat<T>(false, PresenceHeartbeatInterval, pubnubRequestStateHB);
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
StoredRequestState.SetRequestState(CurrentRequestType.Subscribe, pubnubRequestState);
|
|
1717
|
+
coroutine.SubCoroutineComplete += CoroutineCompleteHandler<T>;
|
|
1718
|
+
coroutine.Run<T>(requestUri, pubnubRequestState, SubscribeTimeout, requestDelayTime);
|
|
1719
|
+
if (requestDelayTime > 0)
|
|
1720
|
+
{
|
|
1721
|
+
requestDelayTime = 0;
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
else
|
|
1725
|
+
{
|
|
1726
|
+
StoredRequestState.SetRequestState(CurrentRequestType.NonSubscribe, pubnubRequestState);
|
|
1727
|
+
coroutine.NonSubCoroutineComplete += CoroutineCompleteHandler<T>;
|
|
1728
|
+
coroutine.Run<T>(requestUri, pubnubRequestState, NonSubscribeTimeout, 0);
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
private bool UrlProcessRequest<T>(string requestUri, RequestState<T> pubnubRequestState)
|
|
1733
|
+
{
|
|
1734
|
+
try
|
|
1735
|
+
{
|
|
1736
|
+
|
|
1737
|
+
RunRequests<T>(requestUri, pubnubRequestState);
|
|
1738
|
+
|
|
1739
|
+
}
|
|
1740
|
+
catch (UnityEngine.MissingReferenceException ex)
|
|
1741
|
+
{
|
|
1742
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, UrlProcessRequest: MissingReferenceException={1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1743
|
+
return false;
|
|
1744
|
+
}
|
|
1745
|
+
catch (System.NullReferenceException ex)
|
|
1746
|
+
{
|
|
1747
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, UrlProcessRequest: NullReferenceException={1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1748
|
+
return false;
|
|
1749
|
+
}
|
|
1750
|
+
catch (System.Exception ex)
|
|
1751
|
+
{
|
|
1752
|
+
if (pubnubRequestState != null && pubnubRequestState.ErrorCallback != null)
|
|
1753
|
+
{
|
|
1754
|
+
|
|
1755
|
+
PubnubCallbacks.FireErrorCallbacksForAllChannels<T>(ex, pubnubRequestState,
|
|
1756
|
+
PubnubErrorSeverity.Critical, PubnubErrorCode.None, PubnubErrorLevel);
|
|
1757
|
+
}
|
|
1758
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0} UrlProcessRequest: Exception={1}", DateTime.Now.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
1759
|
+
|
|
1760
|
+
ExceptionHandlers.UrlRequestCommonExceptionHandler<T>(ex.Message, pubnubRequestState,
|
|
1761
|
+
false, false, PubnubErrorLevel);
|
|
1762
|
+
return false;
|
|
1763
|
+
}
|
|
1764
|
+
return true;
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
private void AbortPreviousRequest<T>(List<ChannelEntity> existingChannels)
|
|
1768
|
+
{
|
|
1769
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, AbortPreviousRequest: Aborting previous subscribe/presence requests having channel(s)={1} and ChannelGroup(s) = {2}",
|
|
1770
|
+
DateTime.Now.ToString(), Helpers.GetNamesFromChannelEntities(existingChannels, false),
|
|
1771
|
+
Helpers.GetNamesFromChannelEntities(existingChannels, true)), LoggingMethod.LevelInfo);
|
|
1772
|
+
|
|
1773
|
+
coroutine.BounceRequest<T>(CurrentRequestType.Subscribe, null, false);
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
void RemoveUnsubscribedChannelsAndDeleteUserState<T>(List<ChannelEntity> channelEntities)
|
|
1777
|
+
{
|
|
1778
|
+
foreach (ChannelEntity ce in channelEntities)
|
|
1779
|
+
{
|
|
1780
|
+
string channelToBeRemoved = ce.ChannelID.ChannelOrChannelGroupName;
|
|
1781
|
+
PubnubChannelCallback<T> channelCallback = ce.ChannelParams.Callbacks as PubnubChannelCallback<T>;
|
|
1782
|
+
if (Subscription.Delete(ce))
|
|
1783
|
+
{
|
|
1784
|
+
string jsonString = string.Format("{0} Unsubscribed from {1}", (ce.ChannelID.IsPresenceChannel) ? "Presence" : "", channelToBeRemoved.Replace(Utility.PresenceChannelSuffix, ""));
|
|
1785
|
+
List<object> result = Helpers.CreateJsonResponse(jsonString, channelToBeRemoved.Replace(Utility.PresenceChannelSuffix, ""), JsonPluggableLibrary);
|
|
1786
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RemoveUnsubscribedChannelsAndDeleteUserState: JSON response={1}", DateTime.Now.ToString(), jsonString), LoggingMethod.LevelInfo);
|
|
1787
|
+
PubnubCallbacks.GoToCallback<T>(result, channelCallback.DisconnectCallback, JsonPluggableLibrary);
|
|
1788
|
+
}
|
|
1789
|
+
else
|
|
1790
|
+
{
|
|
1791
|
+
string message = string.Format("Unsubscribe Error. Please retry the unsubscribe operation. channel{0}", channelToBeRemoved);
|
|
1792
|
+
PubnubErrorCode errorType = (ce.ChannelID.IsPresenceChannel) ? PubnubErrorCode.PresenceUnsubscribeFailed : PubnubErrorCode.UnsubscribeFailed;
|
|
1793
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RemoveUnsubscribedChannelsAndDeleteUserState: channel={1} unsubscribe error", DateTime.Now.ToString(), channelToBeRemoved), LoggingMethod.LevelInfo);
|
|
1794
|
+
PubnubCallbacks.CallErrorCallback<T>(message, channelCallback.ErrorCallback,
|
|
1795
|
+
errorType, PubnubErrorSeverity.Critical, PubnubErrorLevel);
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
void ContinueToSubscribeRestOfChannels<T>(ResponseType type, Action<T> userCallback, Action<T> connectCallback, Action<PubnubClientError> errorCallback)
|
|
1803
|
+
{
|
|
1804
|
+
List<ChannelEntity> subscribedChannels = Subscription.AllSubscribedChannelsAndChannelGroups;
|
|
1805
|
+
|
|
1806
|
+
if (subscribedChannels != null && subscribedChannels.Count > 0)
|
|
1807
|
+
{
|
|
1808
|
+
ResetInternetCheckSettings();
|
|
1809
|
+
//Modify the value for type ResponseType. Presence or Subscrie is ok, but sending the close value would make sense
|
|
1810
|
+
if (Subscription.HasPresenceChannels)
|
|
1811
|
+
{
|
|
1812
|
+
type = ResponseType.PresenceV2;
|
|
1813
|
+
}
|
|
1814
|
+
else
|
|
1815
|
+
{
|
|
1816
|
+
type = ResponseType.SubscribeV2;
|
|
1817
|
+
}
|
|
1818
|
+
//Continue with any remaining channels for subscribe/presence
|
|
1819
|
+
MultiChannelSubscribeRequest<T>(type, 0, false);
|
|
1820
|
+
}
|
|
1821
|
+
else
|
|
1822
|
+
{
|
|
1823
|
+
if (isHearbeatRunning)
|
|
1824
|
+
{
|
|
1825
|
+
StopHeartbeat<T>();
|
|
1826
|
+
}
|
|
1827
|
+
if (isPresenceHearbeatRunning)
|
|
1828
|
+
{
|
|
1829
|
+
StopPresenceHeartbeat<T>();
|
|
1830
|
+
}
|
|
1831
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, ContinueToSubscribeRestOfChannels: All channels are Unsubscribed. Further subscription was stopped", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1832
|
+
ExceptionHandlers.MultiplexException -= HandleMultiplexException<T>;
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
private void MultiChannelUnsubscribeInit<T>(ResponseType respType, string channel, string channelGroups, Action<T> userCallback,
|
|
1837
|
+
Action<T> connectCallback, Action<T> disconnectCallback, Action<PubnubClientError> errorCallback)
|
|
1838
|
+
{
|
|
1839
|
+
string[] rawChannels = channel.Split(',');
|
|
1840
|
+
string[] rawChannelGroups = channelGroups.Split(',');
|
|
1841
|
+
List<ChannelEntity> subscribedChannels = Subscription.AllSubscribedChannelsAndChannelGroups;
|
|
1842
|
+
|
|
1843
|
+
List<ChannelEntity> newChannelEntities;
|
|
1844
|
+
Helpers.RemoveDuplicatesCheckAlreadySubscribedAndGetChannels<T>(respType, userCallback, connectCallback,
|
|
1845
|
+
errorCallback, null, disconnectCallback, rawChannels, rawChannelGroups, PubnubErrorLevel, true, out newChannelEntities, _provider);
|
|
1846
|
+
|
|
1847
|
+
if (newChannelEntities.Count > 0)
|
|
1848
|
+
{
|
|
1849
|
+
//Retrieve the current channels already subscribed previously and terminate them
|
|
1850
|
+
AbortPreviousRequest<T>(subscribedChannels);
|
|
1851
|
+
|
|
1852
|
+
if (respType == ResponseType.Unsubscribe)
|
|
1853
|
+
{
|
|
1854
|
+
string request = BuildRequests.BuildMultiChannelLeaveRequest(channel, channelGroups, this.SessionUUID,
|
|
1855
|
+
this.ssl, this.Origin, authenticationKey, this.subscribeKey, _provider);
|
|
1856
|
+
RequestState<T> requestState = BuildRequests.BuildRequestState<T>(newChannelEntities, ResponseType.Leave, false, 0, false, 0, null);
|
|
1857
|
+
UrlProcessRequest<T>(request, requestState);
|
|
1858
|
+
|
|
1859
|
+
}
|
|
1860
|
+
//Remove the valid channels from subscribe list for unsubscribe
|
|
1861
|
+
RemoveUnsubscribedChannelsAndDeleteUserState<T>(newChannelEntities);
|
|
1862
|
+
|
|
1863
|
+
//Get all the channels
|
|
1864
|
+
ContinueToSubscribeRestOfChannels<T>(respType, userCallback, connectCallback, errorCallback);
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
private void ResetInternetCheckSettings()
|
|
1869
|
+
{
|
|
1870
|
+
retryCount = 0;
|
|
1871
|
+
internetStatus = true;
|
|
1872
|
+
//retriesExceeded = false;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
public void MultiChannelSubscribeInit<T>(ResponseType respType, string channel, string channelGroup, long timetokenToUse,
|
|
1876
|
+
Action<T> userCallback, Action<T> connectCallback, Action<PubnubClientError> errorCallback, Action<T> wildcardPresenceCallback)
|
|
1877
|
+
{
|
|
1878
|
+
string[] rawChannels = channel.Split(',');
|
|
1879
|
+
string[] rawChannelGroups = channelGroup.Split(',');
|
|
1880
|
+
|
|
1881
|
+
List<ChannelEntity> subscribedChannels = Subscription.AllSubscribedChannelsAndChannelGroups;
|
|
1882
|
+
|
|
1883
|
+
ResetInternetCheckSettings();
|
|
1884
|
+
|
|
1885
|
+
List<ChannelEntity> newChannelEntities;
|
|
1886
|
+
bool channelsOrChannelGroupsAdded = Helpers.RemoveDuplicatesCheckAlreadySubscribedAndGetChannels<T>(respType, userCallback,
|
|
1887
|
+
connectCallback, errorCallback, wildcardPresenceCallback, null, rawChannels, rawChannelGroups,
|
|
1888
|
+
PubnubErrorLevel, false, out newChannelEntities, _provider);
|
|
1889
|
+
|
|
1890
|
+
if ((channelsOrChannelGroupsAdded) && (internetStatus))
|
|
1891
|
+
{
|
|
1892
|
+
Subscription.Add(newChannelEntities);
|
|
1893
|
+
|
|
1894
|
+
Helpers.LogChannelEntitiesDictionary(Subscription);
|
|
1895
|
+
|
|
1896
|
+
if (!timetokenToUse.Equals(0))
|
|
1897
|
+
{
|
|
1898
|
+
lastSubscribeTimetokenForNewMultiplex = timetokenToUse;
|
|
1899
|
+
}
|
|
1900
|
+
else if (subscribedChannels.Count > 0)
|
|
1901
|
+
{
|
|
1902
|
+
lastSubscribeTimetokenForNewMultiplex = lastSubscribeTimetoken;
|
|
1903
|
+
}
|
|
1904
|
+
AbortPreviousRequest<T>(subscribedChannels);
|
|
1905
|
+
MultiChannelSubscribeRequest<T>(respType, 0, false);
|
|
1906
|
+
}
|
|
1907
|
+
else
|
|
1908
|
+
{
|
|
1909
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiChannelSubscribeInit: channelsOrChannelGroupsAdded {1}, internet status {2}",
|
|
1910
|
+
DateTime.Now.ToString(), channelsOrChannelGroupsAdded.ToString(), internetStatus.ToString()), LoggingMethod.LevelInfo);
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
private bool CheckAllChannelsAreUnsubscribed<T>()
|
|
1916
|
+
{
|
|
1917
|
+
if (Subscription.AllSubscribedChannelsAndChannelGroups.Count <= 0)
|
|
1918
|
+
{
|
|
1919
|
+
StopHeartbeat<T>();
|
|
1920
|
+
if (isPresenceHearbeatRunning)
|
|
1921
|
+
{
|
|
1922
|
+
StopPresenceHeartbeat<T>();
|
|
1923
|
+
}
|
|
1924
|
+
ExceptionHandlers.MultiplexException -= HandleMultiplexException<T>;
|
|
1925
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, CheckAllChannelsAreUnsubscribed: All channels are Unsubscribed. Further subscription was stopped", DateTime.Now.ToString()), LoggingMethod.LevelInfo);
|
|
1926
|
+
|
|
1927
|
+
return true;
|
|
1928
|
+
}
|
|
1929
|
+
return false;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
long SaveLastTimetoken(long timetoken)
|
|
1933
|
+
{
|
|
1934
|
+
long lastTimetoken = 0;
|
|
1935
|
+
long sentTimetoken = timetoken;
|
|
1936
|
+
#if (ENABLE_PUBNUB_LOGGING)
|
|
1937
|
+
StringBuilder sbLogger = new StringBuilder();
|
|
1938
|
+
sbLogger.AppendFormat("SaveLastTimetoken: lastSubscribeTimetokenForNewMultiplex={0}\n", lastSubscribeTimetokenForNewMultiplex);
|
|
1939
|
+
sbLogger.AppendFormat("SaveLastTimetoken: sentTimetoken={0}\n", sentTimetoken.ToString());
|
|
1940
|
+
sbLogger.AppendFormat("SaveLastTimetoken: lastSubscribeTimetoken={0}\n", lastSubscribeTimetoken);
|
|
1941
|
+
#endif
|
|
1942
|
+
if (resetTimetoken || uuidChanged)
|
|
1943
|
+
{
|
|
1944
|
+
lastTimetoken = 0;
|
|
1945
|
+
uuidChanged = false;
|
|
1946
|
+
resetTimetoken = false;
|
|
1947
|
+
#if (ENABLE_PUBNUB_LOGGING)
|
|
1948
|
+
sbLogger.AppendFormat("SaveLastTimetoken: resetTimetoken\n");
|
|
1949
|
+
#endif
|
|
1950
|
+
}
|
|
1951
|
+
else
|
|
1952
|
+
{
|
|
1953
|
+
//override lastTimetoken when lastSubscribeTimetokenForNewMultiplex is set.
|
|
1954
|
+
//this is done to use the timetoken prior to the latest response from the server
|
|
1955
|
+
//and is true in case new channels are added to the subscribe list.
|
|
1956
|
+
if (!sentTimetoken.Equals(0) && !lastSubscribeTimetokenForNewMultiplex.Equals(0) && !lastSubscribeTimetoken.Equals(lastSubscribeTimetokenForNewMultiplex))
|
|
1957
|
+
{
|
|
1958
|
+
lastTimetoken = lastSubscribeTimetokenForNewMultiplex;
|
|
1959
|
+
lastSubscribeTimetokenForNewMultiplex = 0;
|
|
1960
|
+
#if (ENABLE_PUBNUB_LOGGING)
|
|
1961
|
+
sbLogger.AppendFormat("SaveLastTimetoken: Using lastSubscribeTimetokenForNewMultiplex={0}\n", lastTimetoken);
|
|
1962
|
+
#endif
|
|
1963
|
+
}
|
|
1964
|
+
else
|
|
1965
|
+
if (sentTimetoken.Equals(0))
|
|
1966
|
+
{
|
|
1967
|
+
lastTimetoken = sentTimetoken;
|
|
1968
|
+
#if (ENABLE_PUBNUB_LOGGING)
|
|
1969
|
+
sbLogger.AppendFormat("SaveLastTimetoken: Using sentTimetoken={0}\n", sentTimetoken);
|
|
1970
|
+
#endif
|
|
1971
|
+
}
|
|
1972
|
+
else
|
|
1973
|
+
{
|
|
1974
|
+
lastTimetoken = sentTimetoken;
|
|
1975
|
+
#if (ENABLE_PUBNUB_LOGGING)
|
|
1976
|
+
sbLogger.AppendFormat("SaveLastTimetoken: Using sentTimetoken={0}\n", sentTimetoken);
|
|
1977
|
+
#endif
|
|
1978
|
+
}
|
|
1979
|
+
if (lastSubscribeTimetoken.Equals(lastSubscribeTimetokenForNewMultiplex))
|
|
1980
|
+
{
|
|
1981
|
+
lastSubscribeTimetokenForNewMultiplex = 0;
|
|
1982
|
+
}
|
|
1983
|
+
}
|
|
1984
|
+
#if (ENABLE_PUBNUB_LOGGING)
|
|
1985
|
+
LoggingMethod.WriteToLog (string.Format ("DateTime {0}, {1} ", DateTime.Now.ToString (),
|
|
1986
|
+
sbLogger.ToString()), LoggingMethod.LevelInfo);
|
|
1987
|
+
#endif
|
|
1988
|
+
|
|
1989
|
+
return lastTimetoken;
|
|
1990
|
+
}
|
|
1991
|
+
|
|
1992
|
+
private void MultiChannelSubscribeRequest<T>(ResponseType type, long timetoken, bool reconnect)
|
|
1993
|
+
{
|
|
1994
|
+
//Exit if the channel is unsubscribed
|
|
1995
|
+
if (CheckAllChannelsAreUnsubscribed<T>())
|
|
1996
|
+
{
|
|
1997
|
+
return;
|
|
1998
|
+
}
|
|
1999
|
+
List<ChannelEntity> channelEntities = Subscription.AllSubscribedChannelsAndChannelGroups;
|
|
2000
|
+
|
|
2001
|
+
// Begin recursive subscribe
|
|
2002
|
+
try
|
|
2003
|
+
{
|
|
2004
|
+
long lastTimetoken = SaveLastTimetoken(timetoken);
|
|
2005
|
+
|
|
2006
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiChannelSubscribeRequest: Building request for {1} with timetoken={2}", DateTime.Now.ToString(),
|
|
2007
|
+
Helpers.GetNamesFromChannelEntities(channelEntities), lastTimetoken), LoggingMethod.LevelInfo);
|
|
2008
|
+
|
|
2009
|
+
// Build URL
|
|
2010
|
+
string channelsJsonState = Subscription.CompiledUserState;
|
|
2011
|
+
|
|
2012
|
+
string channels = Helpers.GetNamesFromChannelEntities(channelEntities, false);
|
|
2013
|
+
string channelGroups = Helpers.GetNamesFromChannelEntities(channelEntities, true);
|
|
2014
|
+
|
|
2015
|
+
//v2
|
|
2016
|
+
string filterExpr = (!string.IsNullOrEmpty(this.FilterExpr)) ? this.FilterExpr : string.Empty;
|
|
2017
|
+
string requestUrl = BuildRequests.BuildMultiChannelSubscribeRequestV2(channels,
|
|
2018
|
+
channelGroups, lastTimetoken.ToString(), channelsJsonState, this.SessionUUID, this.Region,
|
|
2019
|
+
filterExpr, this.ssl, this.Origin, authenticationKey, this.subscribeKey, this.PresenceHeartbeat);
|
|
2020
|
+
|
|
2021
|
+
RequestState<T> pubnubRequestState = BuildRequests.BuildRequestState<T>(channelEntities, type, reconnect,
|
|
2022
|
+
0, false, Convert.ToInt64(timetoken.ToString()), typeof(T));
|
|
2023
|
+
// Wait for message
|
|
2024
|
+
ExceptionHandlers.MultiplexException += HandleMultiplexException<T>;
|
|
2025
|
+
UrlProcessRequest<T>(requestUrl, pubnubRequestState);
|
|
2026
|
+
}
|
|
2027
|
+
catch (Exception ex)
|
|
2028
|
+
{
|
|
2029
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, MultiChannelSubscribeRequest: method:_subscribe \n channel={1} \n timetoken={2} \n Exception Details={3}",
|
|
2030
|
+
DateTime.Now.ToString(), Helpers.GetNamesFromChannelEntities(channelEntities), timetoken.ToString(), ex.ToString()), LoggingMethod.LevelError);
|
|
2031
|
+
PubnubCallbacks.CallErrorCallback<T>(ex, channelEntities,
|
|
2032
|
+
PubnubErrorCode.None, PubnubErrorSeverity.Critical, PubnubErrorLevel);
|
|
2033
|
+
|
|
2034
|
+
this.MultiChannelSubscribeRequest<T>(type, timetoken, false);
|
|
2035
|
+
}
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
private void RetryLoop<T>(RequestState<T> pubnubRequestState)
|
|
2039
|
+
{
|
|
2040
|
+
internetStatus = false;
|
|
2041
|
+
retryCount++;
|
|
2042
|
+
if (retryCount <= NetworkCheckMaxRetries)
|
|
2043
|
+
{
|
|
2044
|
+
string cbMessage = string.Format("Internet Disconnected, retrying. Retry count {0} of {1}",
|
|
2045
|
+
retryCount.ToString(), NetworkCheckMaxRetries);
|
|
2046
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RetryLoop: {1}", DateTime.Now.ToString(), cbMessage), LoggingMethod.LevelError);
|
|
2047
|
+
PubnubCallbacks.FireErrorCallbacksForAllChannels<T>(cbMessage, pubnubRequestState,
|
|
2048
|
+
PubnubErrorSeverity.Warn, PubnubErrorCode.NoInternetRetryConnect, PubnubErrorLevel);
|
|
2049
|
+
|
|
2050
|
+
}
|
|
2051
|
+
else
|
|
2052
|
+
{
|
|
2053
|
+
//retriesExceeded = true;
|
|
2054
|
+
string cbMessage = string.Format("Internet Disconnected. Retries exceeded {0}. Unsubscribing connected channels.",
|
|
2055
|
+
NetworkCheckMaxRetries);
|
|
2056
|
+
LoggingMethod.WriteToLog(string.Format("DateTime {0}, RetryLoop: {1}", DateTime.Now.ToString(), cbMessage), LoggingMethod.LevelError);
|
|
2057
|
+
|
|
2058
|
+
//stop heartbeat.
|
|
2059
|
+
StopHeartbeat<T>();
|
|
2060
|
+
//reset internetStatus
|
|
2061
|
+
ResetInternetCheckSettings();
|
|
2062
|
+
|
|
2063
|
+
coroutine.BounceRequest<T>(CurrentRequestType.Subscribe, null, false);
|
|
2064
|
+
|
|
2065
|
+
PubnubCallbacks.FireErrorCallbacksForAllChannels<T>(cbMessage, pubnubRequestState,
|
|
2066
|
+
PubnubErrorSeverity.Warn, PubnubErrorCode.NoInternetRetryConnect, PubnubErrorLevel);
|
|
2067
|
+
|
|
2068
|
+
|
|
2069
|
+
MultiplexExceptionHandler<T>(ResponseType.SubscribeV2, true, false);
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
#endregion
|
|
2074
|
+
|
|
2075
|
+
public void Dispose()
|
|
2076
|
+
{
|
|
2077
|
+
Object.Destroy(coroutine);
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
}
|