Exemplo n.º 1
0
    def launch_title(self, uri, location=ActiveTitleLocation.Full):
        """
        Launch title via URI

        Args:
            uri (str): Uri string
            location (:class:`ActiveTitleLocation`): Location

        Returns:
            int: Member of :class:`AckStatus`
        """
        msg = factory.title_launch(location, uri)
        return self.send_message(msg)
Exemplo n.º 2
0
    async def launch_title(
            self,
            uri: str,
            location: ActiveTitleLocation = ActiveTitleLocation.Full
    ) -> AckStatus:
        """
        Launch title via URI

        Args:
            uri: Uri string
            location: Location

        Returns: Ack status
        """
        msg = factory.title_launch(location, uri)
        return await self.send_message(msg)
Exemplo n.º 3
0
def test_title_launch(packets, crypto):
    bin_name = 'title_launch'
    msg = factory.title_launch(location=enum.ActiveTitleLocation.Fill,
                               uri='ms-xbl-0D174C79://default/')
    msg.header(sequence_number=685, source_participant_id=32)
    msg.header.flags(need_ack=True)
    packed = _pack(msg, crypto)

    assert msg.header.pkt_type == enum.PacketType.Message
    assert msg.header.flags.msg_type == enum.MessageType.TitleLaunch

    assert msg.protected_payload.location == enum.ActiveTitleLocation.Fill
    assert msg.protected_payload.uri == 'ms-xbl-0D174C79://default/'

    assert len(packed) == len(packets[bin_name])
    assert packed == packets[bin_name]