Package nu.fw.jeti.plugins.jingle.packet

Examples of nu.fw.jeti.plugins.jingle.packet.Jingle


         * @return a Jingle packet
         * @throws XMPPException an exception
         * @see org.jivesoftware.smackx.jingle.JingleNegotiator.State#eventAccept(org.jivesoftware.smackx.packet.Jingle)
         */
        public Jingle eventAccept(Jingle jin) throws XMPPException {
            Jingle response = null;

            // Parse the Jingle and get the accepted candidate
            ArrayList accepted = obtainCandidatesList(jin);
            if (!accepted.isEmpty()) {

View Full Code Here


    public JingleProvider(JingleManager manager) {
      this.manager = manager;
    }

    public void startHandling(Attributes attr){
      jingle = new Jingle(manager);
        // Get some attributes for the <jingle> element
      jingle.setSid(attr.getValue("sid"));
      jingle.setAction(Jingle.Action.getAction(attr.getValue("action")));
        try  {
          jingle.setInitiator(JID.checkedJIDFromString(attr.getValue("initiator")));
View Full Code Here

    backend.addListener(IQResultListener.class,new IQResultListener(){
      public void iqResult(InfoQuery iq) {
        for (JingleSession session : manager.getAllSessions()){
          try {
            session.respond(new Jingle(iq));
          } catch (XMPPException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
          }
        }
View Full Code Here

     * appropriate error packet.
     *
     * @param request the request to be rejected.
     */
    protected void rejectIncomingJingleSession(JingleSessionRequest request) {
        Jingle initiation = request.getJingle();

        Jingle rejection = JingleSession.createError(initiation.getPacketID(), initiation
                .getFrom(), initiation.getTo(), 403, "Declined");
        connection.send(new InfoQuery(rejection.getFrom(),rejection.getPacketID(),rejection.getError()));
    }
View Full Code Here

        /**
         * Create an invitation packet.
         */
        public Jingle eventInvite() {
            // Create an invitation packet, saving the Packet ID, for any ACK
            return new Jingle(Jingle.Action.SESSIONINITIATE);
        }
View Full Code Here

                        .getBestRemoteCandidate();

                // Ok, send a packet saying that we accept this session
                // with the audio payload type and the transport
                // candidate
                Jingle jout = new Jingle(Jingle.Action.SESSIONACCEPT);
                jout.addDescription(new JingleContentDescription.Audio(
                        new JinglePayloadType(bestCommonAudioPt)));
                jout.addTransport(getTransportNeg().getJingleTransport(
                        bestRemoteCandidate));

                // Send the "accept" and wait for the ACK
                addExpectedId(jout.getPacketID());
                sendFormattedJingle(jout);
            }
        }
View Full Code Here

        // Establish the default state
        setState(accepting);

        //updatePacketListener();

        Jingle packet = initialJingleSessionRequest.getJingle();
        if (packet != null) {

            // Initialize the session information
            setSid(packet.getSid());

            respond(packet);
        }
        else {
            throw new XMPPException(
View Full Code Here

                        .getAcceptedLocalCandidate();

                if (bestCommonAudioPt != null && bestRemoteCandidate != null
                        && acceptedLocalCandidate != null) {
                    // Ok, send a packet saying that we accept this session
                    Jingle jout = new Jingle(Jingle.Action.SESSIONACCEPT);

                    // ... with the audio payload type and the transport
                    // candidate
                    jout.addDescription(new JingleContentDescription.Audio(
                            new JinglePayloadType(bestCommonAudioPt)));
                    jout.addTransport(getTransportNeg().getJingleTransport(
                            bestRemoteCandidate));

                    addExpectedId(jout.getPacketID());
                    sendFormattedJingle(jout);
                }
            }
        }
View Full Code Here

TOP

Related Classes of nu.fw.jeti.plugins.jingle.packet.Jingle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.