2017-06-16 22:14:42 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
2017-08-04 23:05:59 +02:00
|
|
|
package org.jivesoftware.smackx.jingle.component;
|
2017-07-21 23:05:46 +02:00
|
|
|
|
2017-07-25 20:25:36 +02:00
|
|
|
import org.jivesoftware.smackx.bytestreams.BytestreamSession;
|
2017-07-21 23:05:46 +02:00
|
|
|
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionElement;
|
2017-07-28 00:55:44 +02:00
|
|
|
import org.jivesoftware.smackx.jingle.element.JingleContentDescriptionInfoElement;
|
|
|
|
import org.jivesoftware.smackx.jingle.element.JingleElement;
|
2017-06-16 22:14:42 +02:00
|
|
|
|
|
|
|
/**
|
2017-07-21 23:05:46 +02:00
|
|
|
* Class that represents a contents description component.
|
2017-06-16 22:14:42 +02:00
|
|
|
*/
|
2017-07-21 23:51:06 +02:00
|
|
|
public abstract class JingleDescription<D extends JingleContentDescriptionElement> {
|
2017-07-21 23:05:46 +02:00
|
|
|
|
2017-07-21 23:51:06 +02:00
|
|
|
private JingleContent parent;
|
2017-07-21 23:05:46 +02:00
|
|
|
|
|
|
|
public abstract D getElement();
|
|
|
|
|
2017-07-21 23:51:06 +02:00
|
|
|
public void setParent(JingleContent parent) {
|
2017-07-21 23:05:46 +02:00
|
|
|
if (this.parent != parent) {
|
|
|
|
this.parent = parent;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-28 00:55:44 +02:00
|
|
|
public abstract JingleElement handleDescriptionInfo(JingleContentDescriptionInfoElement info);
|
|
|
|
|
2017-07-21 23:51:06 +02:00
|
|
|
public JingleContent getParent() {
|
2017-07-21 23:05:46 +02:00
|
|
|
return parent;
|
|
|
|
}
|
2017-07-25 20:25:36 +02:00
|
|
|
|
2017-07-30 15:40:04 +02:00
|
|
|
public abstract void onBytestreamReady(BytestreamSession bytestreamSession);
|
2017-07-27 23:59:26 +02:00
|
|
|
|
|
|
|
public abstract String getNamespace();
|
2017-07-21 23:05:46 +02:00
|
|
|
}
|