Ejemplo n.º 1
0
    def setactiveclient(self, is_active, timeout_secs):
        """Set the active client.

        Raises hangups.NetworkError if the request fails.
        """
        request = hangouts_pb2.SetActiveClientRequest(
            request_header=self._get_request_header_pb(),
            is_active=is_active,
            full_jid="{}/{}".format(self._email, self._client_id),
            timeout_secs=timeout_secs,
        )
        response = hangouts_pb2.SetActiveClientResponse()
        yield from self._pb_request('clients/setactiveclient', request,
                                    response)
        return response
Ejemplo n.º 2
0
 def set_active_client(self, set_active_client_request):
     """Set the active client."""
     response = hangouts_pb2.SetActiveClientResponse()
     yield from self._pb_request('clients/setactiveclient',
                                 set_active_client_request, response)
     return response