From 132b27adeef3ab4d305facda7dd035015b00766f Mon Sep 17 00:00:00 2001 From: steckbrief Date: Sat, 5 May 2018 20:28:04 +0200 Subject: introduces new message state model --- .../xmpp/httpuploadim/HttpUploadHint.java | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'src/main/java/de/thedevstack/conversationsplus/xmpp/httpuploadim/HttpUploadHint.java') diff --git a/src/main/java/de/thedevstack/conversationsplus/xmpp/httpuploadim/HttpUploadHint.java b/src/main/java/de/thedevstack/conversationsplus/xmpp/httpuploadim/HttpUploadHint.java index 13fb5ad1..1330b18d 100644 --- a/src/main/java/de/thedevstack/conversationsplus/xmpp/httpuploadim/HttpUploadHint.java +++ b/src/main/java/de/thedevstack/conversationsplus/xmpp/httpuploadim/HttpUploadHint.java @@ -1,6 +1,7 @@ package de.thedevstack.conversationsplus.xmpp.httpuploadim; import de.thedevstack.conversationsplus.xml.Element; +import de.thedevstack.conversationsplus.xml.XmlElementContainer; /** * Representation of the HttpUploadHint. @@ -8,18 +9,23 @@ import de.thedevstack.conversationsplus.xml.Element; * * */ -public class HttpUploadHint extends Element { +public enum HttpUploadHint implements XmlElementContainer { + HTTP_UPLOAD_HINT("httpupload"); + + private Element xmlElement; + + HttpUploadHint(String elementName) { + this.xmlElement = new Element(elementName, NAMESPACE); + } + + @Override + public Element getXmlElement() { + return xmlElement; + } + /** * The namespace of message processing hints as defined in XEP-0334. * @see http://xmpp.org/extensions/xep-0334.html */ public static final String NAMESPACE = "urn:xmpp:hints"; - /** - * The element name of the hint for an http upload. - */ - public static final String ELEMENT_NAME = "httpupload"; - - public HttpUploadHint() { - super(ELEMENT_NAME, NAMESPACE); - } } -- cgit v1.2.3