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

emcho at dev.java.net emcho at dev.java.net
Tue May 15 11:00:40 CEST 2007


User: emcho   
Date: 2007-05-15 09:00:40+0000
Log:
 refactoring - moving version and keepalive jabber extensions to their own packages in impl.provider.jabber.extension

File Changes:

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

File [added]: Version.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/protocol/jabber/extensions/version/Version.java?rev=1.1&content-type=text/vnd.viewcvs-markup
Added lines: 51
---------------
package net.java.sip.communicator.impl.protocol.jabber.extensions.version;

import org.jivesoftware.smack.packet.*;

/**
 * EXtension providing application version
 *
 * @author Damian Minkov
 */
public class Version
    implements PacketExtension
{
    public static final String ELEMENT_NAME = "c";
    public static final String NAMESPACE = "http://jabber.org/protocol/caps";

    /**
     * Returns the root element name.
     *
     * @return the element name.
     */
    public String getElementName()
    {
        return ELEMENT_NAME;
    }

    /**
     * Returns the root element XML namespace.
     *
     * @return the namespace.
     */
    public String getNamespace()
    {
        return NAMESPACE;
    }

    /**
     * Returns the XML reppresentation of the PacketExtension.
     *
     * @return the packet extension as XML.
     */
    public String toXML()
    {
        StringBuffer buf = new StringBuffer();
        buf.append("<").append(getElementName()).
            append(" xmlns=\"").append(getNamespace()).append("\"").
            append(" node=\"http://sip-communicator.org/caps\"").
            append(" ver=\"1.0-alpha1\"/>");

        return buf.toString();
    }
}




---------------------------------------------------------------------
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