1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-26 00:02:06 +01:00

Merge pull request #190 from vanitasvitae/retainAPI

Retain old API
This commit is contained in:
Florian Schmaus 2017-12-24 14:44:13 +01:00 committed by GitHub
commit 2d102e2dd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 142 additions and 1 deletions

View file

@ -280,6 +280,16 @@ public final class SmackConfiguration {
compressionHandlers.add(xmppInputOutputStream);
}
/**
* Get compression handlers.
*
* @deprecated use {@link #getCompressionHandlers()} instead.
*/
@Deprecated
public static List<XMPPInputOutputStream> getCompresionHandlers() {
return getCompressionHandlers();
}
public static List<XMPPInputOutputStream> getCompressionHandlers() {
List<XMPPInputOutputStream> res = new ArrayList<>(compressionHandlers.size());
for (XMPPInputOutputStream ios : compressionHandlers) {

View file

@ -215,6 +215,14 @@ public abstract class IQ extends Stanza {
*/
protected abstract IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml);
/**
* @deprecated use {@link #initializeAsResultFor(IQ)} instead.
*/
@Deprecated
protected final void initialzeAsResultFor(IQ request) {
initializeAsResultFor(request);
}
protected final void initializeAsResultFor(IQ request) {
if (!(request.getType() == Type.get || request.getType() == Type.set)) {
throw new IllegalArgumentException(

View file

@ -17,6 +17,17 @@
package org.jivesoftware.smack.util;
public class ByteUtils {
/**
* Concatenate two byte arrays.
*
* @deprecated use {@link #concat(byte[], byte[])} instead.
*/
@Deprecated
public static byte[] concact(byte[] arrayOne, byte[] arrayTwo) {
return concat(arrayOne, arrayTwo);
}
public static byte[] concat(byte[] arrayOne, byte[] arrayTwo) {
int combinedLength = arrayOne.length + arrayTwo.length;
byte[] res = new byte[combinedLength];

View file

@ -22,6 +22,22 @@ import org.jivesoftware.smack.packet.ExtensionElement;
public class PacketUtil {
/**
* Get a extension element from a collection.
* @param collection
* @param element
* @param namespace
* @param <PE>
* @return the extension element
* @deprecated use {@link #extensionElementFrom(Collection, String, String)} instead.
*/
@Deprecated
public static <PE extends ExtensionElement> PE packetExtensionfromCollection(
Collection<ExtensionElement> collection, String element,
String namespace) {
return extensionElementFrom(collection, element, namespace);
}
/**
* Get a extension element from a collection.
*

View file

@ -88,6 +88,16 @@ public class AudioMediaSession extends JingleMediaSession {
audioChannel = new AudioChannel(new MediaLocator(this.getMediaLocator()), localIp, ip, localPort, remotePort, AudioFormatUtils.getAudioFormat(this.getPayloadType()),this);
}
/**
* Starts transmission and for NAT Traversal reasons start receiving also.
*
* @deprecated use {@link #startTransmit()} instead.
*/
@Deprecated
public void startTrasmit() {
startTransmit();
}
/**
* Starts transmission and for NAT Traversal reasons start receiving also.
*/
@ -97,7 +107,19 @@ public class AudioMediaSession extends JingleMediaSession {
}
/**
* Set transmit activity. If the active is true, the instance should trasmit.
* Set transmit activity. If the active is true, the instance should transmit.
* If it is set to false, the instance should pause transmit.
*
* @param active active state
* @deprecated use {@link #setTransmit(boolean)} instead.
*/
@Deprecated
public void setTrasmit(boolean active) {
setTransmit(active);
}
/**
* Set transmit activity. If the active is true, the instance should transmit.
* If it is set to false, the instance should pause transmit.
*
* @param active active state
@ -115,6 +137,16 @@ public class AudioMediaSession extends JingleMediaSession {
// Do nothing
}
/**
* Stops transmission and for NAT Traversal reasons stop receiving also.
*
* @deprecated use {@link #stopTransmit()} instead.
*/
@Deprecated
public void stopTrasmit() {
stopTransmit();
}
/**
* Stops transmission and for NAT Traversal reasons stop receiving also.
*/

View file

@ -153,6 +153,16 @@ public class AudioMediaSession extends JingleMediaSession implements MediaSessio
}
}
/**
* Starts transmission and for NAT Traversal reasons start receiving also.
*
* @deprecated use {@link #startTransmit()} instead.
*/
@Deprecated
public void startTrasmit() {
startTransmit();
}
/**
* Starts transmission and for NAT Traversal reasons start receiving also.
*/
@ -168,6 +178,18 @@ public class AudioMediaSession extends JingleMediaSession implements MediaSessio
}
}
/**
* Set transmit activity. If the active is true, the instance should transmit.
* If it is set to false, the instance should pause transmit.
*
* @param active active state
* @deprecated use {@link #setTransmit(boolean)} instead.
*/
@Deprecated
public void setTrasmit(boolean active) {
setTransmit(active);
}
/**
* Set transmit activity. If the active is true, the instance should transmit.
* If it is set to false, the instance should pause transmit.
@ -187,6 +209,16 @@ public class AudioMediaSession extends JingleMediaSession implements MediaSessio
// Do nothing
}
/**
* Stops transmission and for NAT Traversal reasons stop receiving also.
*
* @deprecated use {@link #stopTransmit()} instead.
*/
@Deprecated
public void stopTrasmit() {
stopTransmit();
}
/**
* Stops transmission and for NAT Traversal reasons stop receiving also.
*/

View file

@ -119,6 +119,16 @@ public class ScreenShareSession extends JingleMediaSession {
}
}
/**
* Starts transmission and for NAT Traversal reasons start receiving also.
*
* @deprecated use {@link #startTransmit()} instead.
*/
@Deprecated
public void startTrasmit() {
startTransmit();
}
/**
* Starts transmission and for NAT Traversal reasons start receiving also.
*/
@ -127,6 +137,18 @@ public class ScreenShareSession extends JingleMediaSession {
new Thread(transmitter).start();
}
/**
* Set transmit activity. If the active is true, the instance should transmit.
* If it is set to false, the instance should pause transmit.
*
* @param active active state
* @deprecated use {@link #setTransmit(boolean)} instead.
*/
@Deprecated
public void setTrasmit(boolean active) {
setTransmit(active);
}
/**
* Set transmit activity. If the active is true, the instance should transmit.
* If it is set to false, the instance should pause transmit.
@ -146,6 +168,16 @@ public class ScreenShareSession extends JingleMediaSession {
// Do nothing
}
/**
* Stops transmission and for NAT Traversal reasons stop receiving also.
*
* @deprecated use {@link #stopTransmit()} instead.
*/
@Deprecated
public void stopTrasmit() {
stopTransmit();
}
/**
* Stops transmission and for NAT Traversal reasons stop receiving also.
*/