2008-05-21 18:48:06 +02:00
|
|
|
/**
|
2014-02-19 10:38:30 +01:00
|
|
|
*
|
2008-05-21 18:48:06 +02:00
|
|
|
* Copyright 2003-2006 Jive Software.
|
2014-02-19 10:38:30 +01:00
|
|
|
*
|
2014-02-17 18:57:38 +01:00
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
2008-05-21 18:48:06 +02:00
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
2014-02-19 10:38:30 +01:00
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
2008-05-21 18:48:06 +02:00
|
|
|
* 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.
|
|
|
|
*/
|
2014-08-20 00:25:57 +02:00
|
|
|
package org.jivesoftware.smackx.jingleold.mediaimpl.test;
|
2008-05-21 18:48:06 +02:00
|
|
|
|
2014-08-20 00:25:57 +02:00
|
|
|
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;
|
2008-05-21 18:48:06 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This Class implements a complete JingleMediaSession for unit testing.
|
|
|
|
*
|
|
|
|
* @author Thiago Camargo
|
|
|
|
*/
|
|
|
|
public class TestMediaSession extends JingleMediaSession {
|
|
|
|
|
|
|
|
/**
|
2015-03-29 12:15:32 +02:00
|
|
|
* Creates a TestMediaSession with defined payload type, remote and local candidates.
|
2008-05-21 18:48:06 +02:00
|
|
|
*
|
|
|
|
* @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.
|
|
|
|
*/
|
|
|
|
public void initialize() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Starts transmission and for NAT Traversal reasons start receiving also.
|
|
|
|
*/
|
|
|
|
public void startTrasmit() {
|
2015-03-17 11:33:02 +01:00
|
|
|
|
2008-05-21 18:48:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set transmit activity. If the active is true, the instance should trasmit.
|
|
|
|
* If it is set to false, the instance should pause transmit.
|
|
|
|
*
|
|
|
|
* @param active active state
|
|
|
|
*/
|
|
|
|
public void setTrasmit(boolean active) {
|
2015-03-17 11:33:02 +01:00
|
|
|
|
2008-05-21 18:48:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf
|
|
|
|
*/
|
|
|
|
public void startReceive() {
|
|
|
|
// Do nothing
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Stops transmission and for NAT Traversal reasons stop receiving also.
|
|
|
|
*/
|
|
|
|
public void stopTrasmit() {
|
2015-03-17 11:33:02 +01:00
|
|
|
|
2008-05-21 18:48:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf
|
|
|
|
*/
|
|
|
|
public void stopReceive() {
|
2015-03-17 11:33:02 +01:00
|
|
|
|
2008-05-21 18:48:06 +02:00
|
|
|
}
|
|
|
|
}
|