1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Merge fixes (wip)

This commit is contained in:
vanitasvitae 2017-06-03 23:38:46 +02:00
commit efdf6d7db8
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
11 changed files with 25 additions and 31 deletions

View file

@ -32,7 +32,7 @@ import org.jivesoftware.smackx.jingle.JingleSessionHandler;
import org.jivesoftware.smackx.jingle.element.Jingle;
import org.jivesoftware.smackx.jingle.element.JingleAction;
import org.jivesoftware.smackx.jingle.element.JingleContent;
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionPayloadElement;
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionChildElement;
import org.jivesoftware.smackx.jingle.element.JingleContentTransport;
import org.jivesoftware.smackx.jingle.provider.JingleContentProviderManager;
import org.jivesoftware.smackx.jingle_filetransfer.callback.IncomingJingleFileTransferCallback;
@ -131,7 +131,7 @@ public final class JingleFileTransferManager extends Manager implements JingleHa
JingleFileTransferPayloadElement payload = new JingleFileTransferPayloadElement(
lastModified, "A file", hashElement,
"application/octet-stream", file.getName(), (int) file.length(), null);
ArrayList<JingleContentDescriptionPayloadElement> payloadTypes = new ArrayList<>();
ArrayList<JingleContentDescriptionChildElement> payloadTypes = new ArrayList<>();
payloadTypes.add(payload);
JingleContentDescriptionFileTransfer descriptionFileTransfer = new JingleContentDescriptionFileTransfer(payloadTypes);

View file

@ -17,7 +17,7 @@
package org.jivesoftware.smackx.jingle_filetransfer.element;
import org.jivesoftware.smackx.jingle.element.JingleContentDescription;
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionPayloadElement;
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionChildElement;
import org.jivesoftware.smackx.jingle_filetransfer.JingleFileTransferManager;
import java.util.List;
@ -27,7 +27,7 @@ import java.util.List;
*/
public class JingleContentDescriptionFileTransfer extends JingleContentDescription {
public JingleContentDescriptionFileTransfer(List<JingleContentDescriptionPayloadElement> payloadTypes) {
public JingleContentDescriptionFileTransfer(List<JingleContentDescriptionChildElement> payloadTypes) {
super(payloadTypes);
}

View file

@ -18,7 +18,7 @@ package org.jivesoftware.smackx.jingle_filetransfer.element;
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jivesoftware.smackx.hash.element.HashElement;
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionPayloadElement;
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionChildElement;
import java.io.File;
import java.util.Date;
@ -26,7 +26,7 @@ import java.util.Date;
/**
* Content of type File.
*/
public class JingleFileTransferPayloadElement extends JingleContentDescriptionPayloadElement {
public class JingleFileTransferPayloadElement extends JingleContentDescriptionChildElement {
public static final String ELEMENT = "file";
public static final String ELEM_DATE = "date";
public static final String ELEM_DESC = "desc";
@ -107,11 +107,6 @@ public class JingleFileTransferPayloadElement extends JingleContentDescriptionPa
return new Builder();
}
@Override
public String getNamespace() {
return null;
}
public static final class Builder {
private Date date;
private String desc;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.jingle_filetransfer.provider;
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionPayloadElement;
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionChildElement;
import org.jivesoftware.smackx.jingle.provider.JingleContentDescriptionProvider;
import org.jivesoftware.smackx.jingle_filetransfer.element.JingleContentDescriptionFileTransfer;
import org.jivesoftware.smackx.jingle_filetransfer.element.JingleFileTransferPayloadElement;
@ -34,7 +34,7 @@ public class JingleContentDescriptionFileTransferProvider
extends JingleContentDescriptionProvider<JingleContentDescriptionFileTransfer> {
@Override
public JingleContentDescriptionFileTransfer parse(XmlPullParser parser, int initialDepth) throws Exception {
ArrayList<JingleContentDescriptionPayloadElement> payloads = new ArrayList<>();
ArrayList<JingleContentDescriptionChildElement> payloads = new ArrayList<>();
while (true) {
int tag = parser.nextTag();
String name = parser.getName();

View file

@ -21,7 +21,6 @@ import org.jivesoftware.smack.test.util.TestUtils;
import org.jivesoftware.smackx.hash.HashManager;
import org.jivesoftware.smackx.hash.element.HashElement;
import org.jivesoftware.smackx.jingle.element.JingleContentDescription;
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionPayloadElement;
import org.jivesoftware.smackx.jingle_filetransfer.element.JingleFileTransferPayloadElement;
import org.jivesoftware.smackx.jingle_filetransfer.element.JingleContentDescriptionFileTransfer;
import org.jivesoftware.smackx.jingle_filetransfer.element.Range;