mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-09-27 10:09:32 +02:00
96 lines
2.7 KiB
Java
96 lines
2.7 KiB
Java
/**
|
|
*
|
|
* Copyright 2003-2006 Jive Software.
|
|
*
|
|
* 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.jingleold.mediaimpl.test;
|
|
|
|
import org.jivesoftware.smackx.jingleold.JingleSession;
|
|
import org.jivesoftware.smackx.jingleold.media.JingleMediaSession;
|
|
import org.jivesoftware.smackx.jingleold.media.PayloadType;
|
|
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate;
|
|
|
|
/**
|
|
* This Class implements a complete JingleMediaSession for unit testing.
|
|
*
|
|
* @author Thiago Camargo
|
|
*/
|
|
public class TestMediaSession extends JingleMediaSession {
|
|
|
|
/**
|
|
* Creates a TestMediaSession with defined payload type, remote and local candidates.
|
|
*
|
|
* @param payloadType Payload of the jmf
|
|
* @param remote the remote information. The candidate that the jmf will be sent to.
|
|
* @param local the local information. The candidate that will receive the jmf
|
|
* @param locator media locator
|
|
*/
|
|
public TestMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local,
|
|
final String locator, JingleSession jingleSession) {
|
|
super(payloadType, remote, local, "Test", jingleSession);
|
|
initialize();
|
|
}
|
|
|
|
/**
|
|
* Initialize the screen share channels.
|
|
*/
|
|
@Override
|
|
public void initialize() {
|
|
|
|
}
|
|
|
|
/**
|
|
* Starts transmission and for NAT Traversal reasons start receiving also.
|
|
*/
|
|
@Override
|
|
public void startTransmit() {
|
|
|
|
}
|
|
|
|
/**
|
|
* 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
|
|
*/
|
|
@Override
|
|
public void setTransmit(boolean active) {
|
|
|
|
}
|
|
|
|
/**
|
|
* For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf
|
|
*/
|
|
@Override
|
|
public void startReceive() {
|
|
// Do nothing
|
|
}
|
|
|
|
/**
|
|
* Stops transmission and for NAT Traversal reasons stop receiving also.
|
|
*/
|
|
@Override
|
|
public void stopTransmit() {
|
|
|
|
}
|
|
|
|
/**
|
|
* For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf
|
|
*/
|
|
@Override
|
|
public void stopReceive() {
|
|
|
|
}
|
|
}
|