internal static Message ParseMessageHandle(IntPtr messageHandle, Message.MessageType messageType)
        {
            Message message = null;

            switch ((PlatformInternal.MessageTypeInternal)messageType)
            {
            case MessageTypeInternal.User_StartRecordingForReportFlow:
                message = new MessageWithAbuseReportRecording(messageHandle);
                break;

            case MessageTypeInternal.Cal_FinalizeApplication:
                message = new MessageWithCalApplicationFinalized(messageHandle);
                break;

            case MessageTypeInternal.Cal_GetSuggestedApplications:
                message = new MessageWithCalApplicationSuggestionList(messageHandle);
                break;

            case MessageTypeInternal.Application_ExecuteCoordinatedLaunch:
            case MessageTypeInternal.Cal_ProposeApplication:
            case MessageTypeInternal.Colocation_RequestMap:
            case MessageTypeInternal.Colocation_ShareMap:
            case MessageTypeInternal.Livestreaming_StopPartyStream:
            case MessageTypeInternal.Livestreaming_UpdateMicStatus:
            case MessageTypeInternal.NetSync_SetVoipAttenuation:
            case MessageTypeInternal.NetSync_SetVoipAttenuationModel:
            case MessageTypeInternal.NetSync_SetVoipChannelCfg:
            case MessageTypeInternal.NetSync_SetVoipGroup:
            case MessageTypeInternal.NetSync_SetVoipListentoChannels:
            case MessageTypeInternal.NetSync_SetVoipMicSource:
            case MessageTypeInternal.NetSync_SetVoipSpeaktoChannels:
            case MessageTypeInternal.Party_Leave:
            case MessageTypeInternal.RichPresence_SetDestination:
            case MessageTypeInternal.RichPresence_SetIsJoinable:
            case MessageTypeInternal.RichPresence_SetLobbySession:
            case MessageTypeInternal.RichPresence_SetMatchSession:
            case MessageTypeInternal.User_CancelRecordingForReportFlow:
            case MessageTypeInternal.User_TestUserCreateDeviceManifest:
                message = new Message(messageHandle);
                break;

            case MessageTypeInternal.Application_GetInstalledApplications:
                message = new MessageWithInstalledApplicationList(messageHandle);
                break;

            case MessageTypeInternal.User_LaunchBlockFlow:
                message = new MessageWithLaunchBlockFlowResult(messageHandle);
                break;

            case MessageTypeInternal.AbuseReport_LaunchAdvancedReportFlow:
            case MessageTypeInternal.User_LaunchReportFlow2:
                message = new MessageWithLaunchReportFlowResult(messageHandle);
                break;

            case MessageTypeInternal.User_LaunchUnblockFlow:
                message = new MessageWithLaunchUnblockFlowResult(messageHandle);
                break;

            case MessageTypeInternal.User_GetLinkedAccounts:
                message = new MessageWithLinkedAccountList(messageHandle);
                break;

            case MessageTypeInternal.Livestreaming_IsAllowedForApplication:
                message = new MessageWithLivestreamingApplicationStatus(messageHandle);
                break;

            case MessageTypeInternal.Livestreaming_StartPartyStream:
            case MessageTypeInternal.Livestreaming_StartStream:
                message = new MessageWithLivestreamingStartResult(messageHandle);
                break;

            case MessageTypeInternal.Livestreaming_UpdateCommentsOverlayVisibility:
                message = new MessageWithLivestreamingStatus(messageHandle);
                break;

            case MessageTypeInternal.Livestreaming_StopStream:
                message = new MessageWithLivestreamingVideoStats(messageHandle);
                break;

            case MessageTypeInternal.NetSync_Connect:
            case MessageTypeInternal.NetSync_Disconnect:
                message = new MessageWithNetSyncConnection(messageHandle);
                break;

            case MessageTypeInternal.NetSync_GetSessions:
                message = new MessageWithNetSyncSessionList(messageHandle);
                break;

            case MessageTypeInternal.NetSync_SetVoipSessionMuted:
            case MessageTypeInternal.NetSync_SetVoipStreamMode:
                message = new MessageWithNetSyncSetSessionPropertyResult(messageHandle);
                break;

            case MessageTypeInternal.NetSync_GetVoipAttenuation:
            case MessageTypeInternal.NetSync_GetVoipAttenuationDefault:
                message = new MessageWithNetSyncVoipAttenuationValueList(messageHandle);
                break;

            case MessageTypeInternal.Party_Get:
                message = new MessageWithParty(messageHandle);
                break;

            case MessageTypeInternal.Party_GetCurrentForUser:
                message = new MessageWithPartyUnderCurrentParty(messageHandle);
                break;

            case MessageTypeInternal.Party_Create:
            case MessageTypeInternal.Party_GatherInApplication:
            case MessageTypeInternal.Party_Invite:
            case MessageTypeInternal.Party_Join:
                message = new MessageWithPartyID(messageHandle);
                break;

            case MessageTypeInternal.Room_CreateOrUpdateAndJoinNamed:
                message = new MessageWithRoomUnderViewerRoom(messageHandle);
                break;

            case MessageTypeInternal.Room_GetNamedRooms:
            case MessageTypeInternal.Room_GetSocialRooms:
                message = new MessageWithRoomList(messageHandle);
                break;

            case MessageTypeInternal.Avatar_UpdateMetaData:
            case MessageTypeInternal.Colocation_GetCurrentMapUuid:
            case MessageTypeInternal.GraphAPI_Get:
            case MessageTypeInternal.GraphAPI_Post:
            case MessageTypeInternal.HTTP_Get:
            case MessageTypeInternal.HTTP_GetToFile:
            case MessageTypeInternal.HTTP_MultiPartPost:
            case MessageTypeInternal.HTTP_Post:
            case MessageTypeInternal.User_NewEntitledTestUser:
            case MessageTypeInternal.User_NewTestUser:
            case MessageTypeInternal.User_NewTestUserFriends:
                message = new MessageWithString(messageHandle);
                break;

            case MessageTypeInternal.SystemPermissions_GetStatus:
            case MessageTypeInternal.SystemPermissions_LaunchDeeplink:
                message = new MessageWithSystemPermission(messageHandle);
                break;

            case MessageTypeInternal.User_LaunchReportFlow:
            case MessageTypeInternal.User_StopRecordingAndLaunchReportFlow:
            case MessageTypeInternal.User_StopRecordingAndLaunchReportFlow2:
                message = new MessageWithUserReportID(messageHandle);
                break;
            }
            return(message);
        }
Пример #2
0
        internal static Message ParseMessageHandle(IntPtr messageHandle, Message.MessageType messageType)
        {
            Message message = null;

            switch ((PlatformInternal.MessageTypeInternal)messageType)
            {
            case MessageTypeInternal.User_StartRecordingForReportFlow:
                message = new MessageWithAbuseReportRecording(messageHandle);
                break;

            case MessageTypeInternal.Cal_FinalizeApplication:
                message = new MessageWithCalApplicationFinalized(messageHandle);
                break;

            case MessageTypeInternal.Cal_GetSuggestedApplications:
                message = new MessageWithCalApplicationSuggestionList(messageHandle);
                break;

            case MessageTypeInternal.Application_ExecuteCoordinatedLaunch:
            case MessageTypeInternal.Cal_ProposeApplication:
            case MessageTypeInternal.Livestreaming_StopPartyStream:
            case MessageTypeInternal.Livestreaming_UpdateMicStatus:
            case MessageTypeInternal.Party_Leave:
            case MessageTypeInternal.User_CancelRecordingForReportFlow:
            case MessageTypeInternal.User_TestUserCreateDeviceManifest:
                message = new Message(messageHandle);
                break;

            case MessageTypeInternal.Application_GetInstalledApplications:
                message = new MessageWithInstalledApplicationList(messageHandle);
                break;

            case MessageTypeInternal.User_LaunchBlockFlow:
                message = new MessageWithLaunchBlockFlowResult(messageHandle);
                break;

            case MessageTypeInternal.User_LaunchReportFlow2:
                message = new MessageWithLaunchReportFlowResult(messageHandle);
                break;

            case MessageTypeInternal.User_LaunchUnblockFlow:
                message = new MessageWithLaunchUnblockFlowResult(messageHandle);
                break;

            case MessageTypeInternal.User_GetLinkedAccounts:
                message = new MessageWithLinkedAccountList(messageHandle);
                break;

            case MessageTypeInternal.Livestreaming_IsAllowedForApplication:
                message = new MessageWithLivestreamingApplicationStatus(messageHandle);
                break;

            case MessageTypeInternal.Livestreaming_StartPartyStream:
            case MessageTypeInternal.Livestreaming_StartStream:
                message = new MessageWithLivestreamingStartResult(messageHandle);
                break;

            case MessageTypeInternal.Livestreaming_UpdateCommentsOverlayVisibility:
                message = new MessageWithLivestreamingStatus(messageHandle);
                break;

            case MessageTypeInternal.Livestreaming_StopStream:
                message = new MessageWithLivestreamingVideoStats(messageHandle);
                break;

            case MessageTypeInternal.Party_Get:
                message = new MessageWithParty(messageHandle);
                break;

            case MessageTypeInternal.Party_GetCurrentForUser:
                message = new MessageWithPartyUnderCurrentParty(messageHandle);
                break;

            case MessageTypeInternal.Party_Create:
            case MessageTypeInternal.Party_GatherInApplication:
            case MessageTypeInternal.Party_Invite:
            case MessageTypeInternal.Party_Join:
                message = new MessageWithPartyID(messageHandle);
                break;

            case MessageTypeInternal.Room_CreateOrUpdateAndJoinNamed:
                message = new MessageWithRoomUnderViewerRoom(messageHandle);
                break;

            case MessageTypeInternal.Room_GetNamedRooms:
            case MessageTypeInternal.Room_GetSocialRooms:
                message = new MessageWithRoomList(messageHandle);
                break;

            case MessageTypeInternal.Avatar_UpdateMetaData:
            case MessageTypeInternal.GraphAPI_Get:
            case MessageTypeInternal.GraphAPI_Post:
            case MessageTypeInternal.HTTP_Get:
            case MessageTypeInternal.HTTP_GetToFile:
            case MessageTypeInternal.HTTP_MultiPartPost:
            case MessageTypeInternal.HTTP_Post:
            case MessageTypeInternal.User_NewEntitledTestUser:
            case MessageTypeInternal.User_NewTestUser:
            case MessageTypeInternal.User_NewTestUserFriends:
                message = new MessageWithString(messageHandle);
                break;

            case MessageTypeInternal.SystemPermissions_GetStatus:
            case MessageTypeInternal.SystemPermissions_LaunchDeeplink:
                message = new MessageWithSystemPermission(messageHandle);
                break;

            case MessageTypeInternal.User_LaunchReportFlow:
            case MessageTypeInternal.User_StopRecordingAndLaunchReportFlow:
            case MessageTypeInternal.User_StopRecordingAndLaunchReportFlow2:
                message = new MessageWithUserReportID(messageHandle);
                break;
            }
            return(message);
        }