1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-16 20:22:05 +01:00

Move Roster Item Exchange code to legacy project

XEP-93 has been deprecated and superseded by XEP-144.
This commit is contained in:
Florian Schmaus 2014-03-03 12:05:25 +01:00
parent fa289eac04
commit 768700b301
10 changed files with 72 additions and 8 deletions

View file

@ -13,5 +13,6 @@
<className>org.jivesoftware.smackx.ExtensionsStartupClasses</className> <className>org.jivesoftware.smackx.ExtensionsStartupClasses</className>
<className>org.jivesoftware.smackx.ExperimentalProviderInitializer</className> <className>org.jivesoftware.smackx.ExperimentalProviderInitializer</className>
<className>org.jivesoftware.smackx.WorkgroupProviderInitializer</className> <className>org.jivesoftware.smackx.WorkgroupProviderInitializer</className>
<className>org.jivesoftware.smackx.LegacyProviderInitializer</className>
</optionalStartupClasses> </optionalStartupClasses>
</smack> </smack>

View file

@ -16,13 +16,6 @@
<className>org.jivesoftware.smackx.time.packet.Time</className> <className>org.jivesoftware.smackx.time.packet.Time</className>
</iqProvider> </iqProvider>
<!-- Roster Exchange -->
<extensionProvider>
<elementName>x</elementName>
<namespace>jabber:x:roster</namespace>
<className>org.jivesoftware.smackx.xroster.provider.RosterExchangeProvider</className>
</extensionProvider>
<!-- Message Events --> <!-- Message Events -->
<extensionProvider> <extensionProvider>
<elementName>x</elementName> <elementName>x</elementName>

View file

@ -0,0 +1,27 @@
/**
*
* Copyright the original author or authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx;
import org.jivesoftware.smack.initializer.UrlProviderFileInitializer;
public class LegacyProviderInitializer extends UrlProviderFileInitializer {
@Override
protected String getFilePath() {
return "classpath:org.jivesoftware.smackx/legacy.providers";
}
}

View file

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<!-- Providers file for legacy Smack extensions -->
<smackProviders>
<!-- Roster Exchange -->
<extensionProvider>
<elementName>x</elementName>
<namespace>jabber:x:roster</namespace>
<className>org.jivesoftware.smackx.xroster.provider.RosterExchangeProvider</className>
</extensionProvider>
</smackProviders>

View file

@ -0,0 +1,31 @@
/**
*
* Copyright the original author or authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
public class LegacyProviderInitializerTest {
@Test
public void testWorkgroupProviderInitializer() {
LegacyProviderInitializer lpi = new LegacyProviderInitializer();
lpi.initialize();
assertTrue(lpi.getExceptions().size() == 0);
}
}