mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-13 22:41:08 +01:00
[urldata] Follow-up on initial merge of XEP-0103/0104 support
This is a follow-up on 198c51356d ("Add initial support for XEP-0103
and XEP-0104: URL Address Information"), which
1. adds the entries to the support XEPs table
2. registers the provider
3. renames the package from url_address_information to urldata (aka.
the shortname of XEP-0130).
This commit is contained in:
parent
8425671b31
commit
1ad394f256
17 changed files with 69 additions and 41 deletions
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.element;
|
||||
package org.jivesoftware.smackx.urldata.element;
|
||||
|
||||
import org.jivesoftware.smack.packet.NamedElement;
|
||||
import org.jivesoftware.smack.packet.XmlEnvironment;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.element;
|
||||
package org.jivesoftware.smackx.urldata.element;
|
||||
|
||||
import org.jivesoftware.smack.packet.NamedElement;
|
||||
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.element;
|
||||
package org.jivesoftware.smackx.urldata.element;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -25,10 +25,14 @@ import org.jivesoftware.smack.packet.XmlEnvironment;
|
|||
import org.jivesoftware.smack.util.EqualsUtil;
|
||||
import org.jivesoftware.smack.util.HashCode;
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
import org.jivesoftware.smackx.url_address_information.http.element.CookieElement;
|
||||
import org.jivesoftware.smackx.url_address_information.http.element.HeaderElement;
|
||||
import org.jivesoftware.smackx.url_address_information.http.element.HttpAuthElement;
|
||||
|
||||
import org.jivesoftware.smackx.urldata.http.element.CookieElement;
|
||||
import org.jivesoftware.smackx.urldata.http.element.HeaderElement;
|
||||
import org.jivesoftware.smackx.urldata.http.element.HttpAuthElement;
|
||||
|
||||
/**
|
||||
* The url-data element.
|
||||
*/
|
||||
public class UrlDataElement implements ExtensionElement {
|
||||
|
||||
public static final String ELEMENT = "url-data";
|
||||
|
|
@ -20,4 +20,4 @@
|
|||
*
|
||||
* @see <a href="https://xmpp.org/extensions/xep-0103.html"> XEP-0103 - URL Address Information</a>.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.element;
|
||||
package org.jivesoftware.smackx.urldata.element;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.http.element;
|
||||
package org.jivesoftware.smackx.urldata.http.element;
|
||||
|
||||
import org.jivesoftware.smack.packet.XmlEnvironment;
|
||||
import org.jivesoftware.smack.util.EqualsUtil;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.http.element;
|
||||
package org.jivesoftware.smackx.urldata.http.element;
|
||||
|
||||
import org.jivesoftware.smack.packet.XmlEnvironment;
|
||||
import org.jivesoftware.smack.util.EqualsUtil;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.http.element;
|
||||
package org.jivesoftware.smackx.urldata.http.element;
|
||||
|
||||
import org.jivesoftware.smack.packet.XmlEnvironment;
|
||||
import org.jivesoftware.smack.util.EqualsUtil;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.http.element;
|
||||
package org.jivesoftware.smackx.urldata.http.element;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -23,7 +23,8 @@ import org.jivesoftware.smack.packet.XmlEnvironment;
|
|||
import org.jivesoftware.smack.util.EqualsUtil;
|
||||
import org.jivesoftware.smack.util.HashCode;
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
import org.jivesoftware.smackx.url_address_information.element.MetaInformationElement;
|
||||
|
||||
import org.jivesoftware.smackx.urldata.element.MetaInformationElement;
|
||||
|
||||
public final class HttpAuthElement implements MetaInformationElement {
|
||||
|
||||
|
|
@ -14,10 +14,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.http.element;
|
||||
package org.jivesoftware.smackx.urldata.http.element;
|
||||
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
import org.jivesoftware.smackx.url_address_information.element.MetaInformationElement;
|
||||
|
||||
import org.jivesoftware.smackx.urldata.element.MetaInformationElement;
|
||||
|
||||
public abstract class NameValuePairElement implements MetaInformationElement {
|
||||
|
||||
|
|
@ -18,4 +18,4 @@
|
|||
/**
|
||||
* Element classes for XEP-0104.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.http.element;
|
||||
package org.jivesoftware.smackx.urldata.http.element;
|
||||
|
|
@ -20,4 +20,4 @@
|
|||
*
|
||||
* @see <a href="https://xmpp.org/extensions/xep-0104.html"> XEP-0104 - HTTP Scheme for URL Address Information</a>
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.http;
|
||||
package org.jivesoftware.smackx.urldata.http;
|
||||
|
|
@ -18,4 +18,4 @@
|
|||
/**
|
||||
* Smack's API for <a href="https://xmpp.org/extensions/xep-0103.html"> XEP-0103 - URL Address Information</a>.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information;
|
||||
package org.jivesoftware.smackx.urldata;
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.provider;
|
||||
package org.jivesoftware.smackx.urldata.provider;
|
||||
|
||||
import static org.jivesoftware.smackx.url_address_information.element.UrlDataElement.ATTR_SID;
|
||||
import static org.jivesoftware.smackx.url_address_information.element.UrlDataElement.ATTR_TARGET;
|
||||
import static org.jivesoftware.smackx.urldata.element.UrlDataElement.ATTR_SID;
|
||||
import static org.jivesoftware.smackx.urldata.element.UrlDataElement.ATTR_TARGET;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -29,15 +29,15 @@ import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
|||
import org.jivesoftware.smack.util.ParserUtils;
|
||||
import org.jivesoftware.smack.xml.XmlPullParser;
|
||||
import org.jivesoftware.smack.xml.XmlPullParserException;
|
||||
import org.jivesoftware.smackx.url_address_information.element.UrlDataElement;
|
||||
import org.jivesoftware.smackx.url_address_information.http.element.AuthParamElement;
|
||||
import org.jivesoftware.smackx.url_address_information.http.element.CookieElement;
|
||||
import org.jivesoftware.smackx.url_address_information.http.element.HeaderElement;
|
||||
import org.jivesoftware.smackx.url_address_information.http.element.HttpAuthElement;
|
||||
|
||||
import org.jivesoftware.smackx.urldata.element.UrlDataElement;
|
||||
import org.jivesoftware.smackx.urldata.http.element.AuthParamElement;
|
||||
import org.jivesoftware.smackx.urldata.http.element.CookieElement;
|
||||
import org.jivesoftware.smackx.urldata.http.element.HeaderElement;
|
||||
import org.jivesoftware.smackx.urldata.http.element.HttpAuthElement;
|
||||
|
||||
public class UrlDataElementProvider extends ExtensionElementProvider<UrlDataElement> {
|
||||
|
||||
public static UrlDataElementProvider INSTANCE = new UrlDataElementProvider();
|
||||
@Override
|
||||
public UrlDataElement parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
|
||||
String target = parser.getAttributeValue(ATTR_TARGET);
|
||||
|
|
@ -20,4 +20,4 @@
|
|||
*
|
||||
* @see <a href="https://xmpp.org/extensions/xep-0103.html"> XEP-0103 - URL Address Information</a>.
|
||||
*/
|
||||
package org.jivesoftware.smackx.url_address_information.provider;
|
||||
package org.jivesoftware.smackx.urldata.provider;
|
||||
|
|
@ -365,6 +365,13 @@
|
|||
<className>org.jivesoftware.smackx.si.provider.StreamInitiationProvider</className>
|
||||
</iqProvider>
|
||||
|
||||
<!-- XEP-0103: URL Address Information -->
|
||||
<extensionProvider>
|
||||
<elementName>url-data</elementName>
|
||||
<namespace>http://jabber.org/protocol/url-data</namespace>
|
||||
<className>org.jivesoftware.smackx.urldata.provider.UrlDataElementProvider</className>
|
||||
</extensionProvider>
|
||||
|
||||
<!-- XEP-0107: User Mood -->
|
||||
<extensionProvider>
|
||||
<elementName>mood</elementName>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue