/** * * 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. */ public void initialize() { } /** * Starts transmission and for NAT Traversal reasons start receiving also. */ public void startTrasmit() { } /** * 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) { } /** * 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() { } /** * For NAT Reasons this method does nothing. Use startTransmit() to start transmit and receive jmf */ public void stopReceive() { } }