Copyright © 2010 Collabora Ltd.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

A sidecar interface to register with XEP-0100 gateways.

Register with a gateway, as per XEP-0100 §4.1. This method does not allow for all the parameters that gateways can potentially have, and indeed doesn't even allow the required or allowed parameters to be discovered, but it should work in practice for nearly all gateways to other IM protocols.

Username and password are enough information to sign in to many IM protocols, and this method has a high "return on investment" in terms of being easy to implement and easy to write UI for.

The gateway (XMPP component) with which to register, e.g. "sip-transport.example.com".

The username with which to register, in whatever format is required by the specified gateway; for instance, this might be a number, the username part of a SIP URI, a complete SIP URI, etc.

The password with which to register.