[sip-comm-cvs] CVS update: /sip-communicator/src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/GeolocationMessage.java

emcho at dev.java.net emcho at dev.java.net
Mon May 14 16:10:09 CEST 2007


User: emcho   
Date: 2007-05-14 14:10:09+0000
Log:
 Committing geolocation for Jabber from Guillaume Schreiner - Louis Pasteur University, France
 
 a geolocation oriented extension of a smack xmpp message.

File Changes:

Directory: /sip-communicator/src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/
=======================================================================================================

File [added]: GeolocationMessage.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/protocol/jabber/extensions/geolocation/GeolocationMessage.java?rev=1.1&content-type=text/vnd.viewcvs-markup
Added lines: 59
---------------
/*
 * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.impl.protocol.jabber.extensions.geolocation;

import org.jivesoftware.smack.packet.Message;

/**
 * This class extends the smack Message class and allows creating a
 * GeolocationMessage automatically setting the geolocation packet extension.
 *
 * @author Guillaume Schreiner
 */
public class GeolocationMessage
    extends Message
{
    /**
     * Creates a new, "normal" message.
     *
     * @param geoloc the geolocation packet extension to add to this message.
     */
    public GeolocationMessage(GeolocationPacketExtension geoloc)
    {
        super();
        this.addExtension(geoloc);
    }

    /**
     * Creates a new "normal" message to the specified recipient and adds the
     * specified <tt>geoloc</tt> extension to it.
     *
     * @param to the recipient of the message.
     * @param geoloc the geolocation packet extension to add to this message.
     */
    public GeolocationMessage(String to, GeolocationPacketExtension geoloc)
    {
        super(to);
        this.addExtension(geoloc);
    }

    /**
     * Creates a new message with the specified type and recipient and adds the
     * specified <tt>geoloc</tt> extension to it.
     *
     * @param to the recipient of the message.
     * @param geoloc the geolocation packet extension to add to this message.
     * @param type the message type.
     */
    public GeolocationMessage(String                     to,
                              Message.Type               type,
                              GeolocationPacketExtension geoloc)
    {
        super(to, type);
        addExtension(geoloc);
    }
}




---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: cvs-help at sip-communicator.dev.java.net





More information about the commits mailing list