mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
More progress
This commit is contained in:
parent
cf9dc49bee
commit
df216b2141
16 changed files with 316 additions and 121 deletions
|
@ -41,6 +41,18 @@ public class JingleSession {
|
|||
return hashCode;
|
||||
}
|
||||
|
||||
public String getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public Jid getInitiator() {
|
||||
return initiator;
|
||||
}
|
||||
|
||||
public Jid getResponder() {
|
||||
return responder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (!(other instanceof JingleSession)) {
|
||||
|
|
|
@ -30,9 +30,9 @@ public abstract class JingleContentDescription implements ExtensionElement {
|
|||
|
||||
public static final String ELEMENT = "description";
|
||||
|
||||
private final List<JingleContentDescriptionPayloadType> payloads;
|
||||
private final List<JingleContentDescriptionPayloadElement> payloads;
|
||||
|
||||
protected JingleContentDescription(List<JingleContentDescriptionPayloadType> payloads) {
|
||||
protected JingleContentDescription(List<JingleContentDescriptionPayloadElement> payloads) {
|
||||
if (payloads != null) {
|
||||
this.payloads = Collections.unmodifiableList(payloads);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public abstract class JingleContentDescription implements ExtensionElement {
|
|||
return ELEMENT;
|
||||
}
|
||||
|
||||
public List<JingleContentDescriptionPayloadType> getJinglePayloadTypes() {
|
||||
public List<JingleContentDescriptionPayloadElement> getJinglePayloadTypes() {
|
||||
return payloads;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingle.element;
|
||||
|
||||
import org.jivesoftware.smack.packet.NamedElement;
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
|
||||
/**
|
||||
* An element found usually in 'description' elements.
|
||||
*
|
||||
*/
|
||||
public abstract class JingleContentDescriptionPayloadType implements NamedElement {
|
||||
public abstract class JingleContentDescriptionPayloadElement implements ExtensionElement {
|
||||
|
||||
public static final String ELEMENT = "payload-type";
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2017 Paul Schaub
|
||||
*
|
||||
* 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.jingle.provider;
|
||||
|
||||
import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
||||
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionPayloadElement;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
||||
* Provider for JingleContentDescriptionPayloadElements.
|
||||
*/
|
||||
public abstract class JingleContentDescriptionPayloadProvider<D extends JingleContentDescriptionPayloadElement>
|
||||
extends ExtensionElementProvider<D> {
|
||||
|
||||
@Override
|
||||
public abstract D parse(XmlPullParser parser, int initialDepth) throws Exception;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue