Search in sources :

Example 6 with JingleListener

use of org.jivesoftware.smackx.jingleold.listeners.JingleListener in project Smack by igniterealtime.

the class JingleSession method triggerMediaReceived.

/**
     * Trigger a session established event.
     */
//    protected void triggerSessionEstablished() {
//        List<JingleListener> listeners = getListenersList();
//        for (JingleListener li : listeners) {
//            if (li instanceof JingleSessionListener) {
//                JingleSessionListener sli = (JingleSessionListener) li;
//                sli.sessionEstablished(this);
//            }
//        }
//    }
/**
     * Trigger a media received event.
     */
protected void triggerMediaReceived(String participant) {
    List<JingleListener> listeners = getListenersList();
    for (JingleListener li : listeners) {
        if (li instanceof JingleSessionListener) {
            JingleSessionListener sli = (JingleSessionListener) li;
            sli.sessionMediaReceived(this, participant);
        }
    }
}
Also used : JingleListener(org.jivesoftware.smackx.jingleold.listeners.JingleListener) JingleSessionListener(org.jivesoftware.smackx.jingleold.listeners.JingleSessionListener)

Example 7 with JingleListener

use of org.jivesoftware.smackx.jingleold.listeners.JingleListener in project Smack by igniterealtime.

the class MediaNegotiator method triggerMediaEstablished.

// Events
/**
     * Trigger a session established event.
     * 
     * @param bestPt
     *            payload type that has been agreed.
     * @throws NotConnectedException 
     * @throws InterruptedException 
     */
protected void triggerMediaEstablished(PayloadType bestPt) throws NotConnectedException, InterruptedException {
    List<JingleListener> listeners = getListenersList();
    for (JingleListener li : listeners) {
        if (li instanceof JingleMediaListener) {
            JingleMediaListener mli = (JingleMediaListener) li;
            mli.mediaEstablished(bestPt);
        }
    }
}
Also used : JingleListener(org.jivesoftware.smackx.jingleold.listeners.JingleListener) JingleMediaListener(org.jivesoftware.smackx.jingleold.listeners.JingleMediaListener)

Example 8 with JingleListener

use of org.jivesoftware.smackx.jingleold.listeners.JingleListener in project Smack by igniterealtime.

the class MediaNegotiator method triggerMediaClosed.

/**
     * Trigger a jmf closed event.
     * 
     * @param currPt
     *            current payload type that is cancelled.
     */
protected void triggerMediaClosed(PayloadType currPt) {
    List<JingleListener> listeners = getListenersList();
    for (JingleListener li : listeners) {
        if (li instanceof JingleMediaListener) {
            JingleMediaListener mli = (JingleMediaListener) li;
            mli.mediaClosed(currPt);
        }
    }
}
Also used : JingleListener(org.jivesoftware.smackx.jingleold.listeners.JingleListener) JingleMediaListener(org.jivesoftware.smackx.jingleold.listeners.JingleMediaListener)

Aggregations

JingleListener (org.jivesoftware.smackx.jingleold.listeners.JingleListener)8 JingleSessionListener (org.jivesoftware.smackx.jingleold.listeners.JingleSessionListener)4 JingleMediaListener (org.jivesoftware.smackx.jingleold.listeners.JingleMediaListener)2 JingleTransportListener (org.jivesoftware.smackx.jingleold.listeners.JingleTransportListener)2 TransportCandidate (org.jivesoftware.smackx.jingleold.nat.TransportCandidate)2 JingleMediaManager (org.jivesoftware.smackx.jingleold.media.JingleMediaManager)1