Package net.sf.jml.impl

Examples of net.sf.jml.impl.AbstractMessenger


        Element contactsResults = XmlUtils.findChild(contactListResults, "contacts");

        processGroups(groupsResults);
        processContacts(contactsResults);

        AbstractMessenger messenger = (AbstractMessenger)session.getMessenger();

        messenger.fireContactListSyncCompleted(); //Sync completed

        OutgoingBLP outgoing = new OutgoingBLP(messenger.getActualMsnProtocol());
        outgoing.setOnlyNotifyAllowList(false);
        messenger.send(outgoing);
        sendContactList();
    }
View Full Code Here


        sendContactList();
    }
   
    //Solved ADL long-contact-list issue - BLuEGoD
    public void sendContactList(){
        AbstractMessenger messenger = (AbstractMessenger)session.getMessenger();
        MsnProtocol protocol = messenger.getActualMsnProtocol();

        if (protocol.after(MsnProtocol.MSNP12)){
            MsnContactListImpl contactList = (MsnContactListImpl) session
            .getMessenger().getContactList();
            MsnContact[] cs = contactList.getContacts();
            int cs_size=cs.length;
            Queue<MsnContact> csq= new LinkedList<MsnContact>();       
            try{
                //don't know why 220 instead of ~250, but MSN server don't like it
                //we should put this lower if the server disconnects after an ADL is made - BLuEGoD
                    for(int i=0, j=1;i<cs_size;i++,j++){
                        if(cs[i]!=null)
                            csq.add(cs[i]);
                        if(j==220 || i==cs_size-1){
                            //waitFor(6000);
                            OutgoingADL o1 = new OutgoingADL(messenger.getActualMsnProtocol());
                            if(firstADLReply)
                                ADLSent=(cs_size-1)==i?true:false;
                            o1.addContacts(csq.toArray(new MsnContact[j] ));
                            messenger.send(o1);
                            j=0;
                            csq.clear();
                           
                        }
                    }
View Full Code Here

         * has been modified to let all the things works together.
         *
         * James Lopez (BLuEGoD) - <bluegod at bluegod.net>
         */
       
        AbstractMessenger messenger = (AbstractMessenger)session.getMessenger();
        MsnProtocol protocol = messenger.getActualMsnProtocol();
        messenger.getOwner().setDisplayName(messenger.getOwner().getDisplayName());
       
        protocol = messenger.getActualMsnProtocol();
        if (protocol.after(MsnProtocol.MSNP9)){
            OutgoingUUX uuxmessage = new OutgoingUUX(protocol);
            uuxmessage.setPersonalMessage(messenger.getOwner().getPersonalMessage());
            uuxmessage.setMachineGuid("{F26D1F07-95E2-403C-BC18-D4BFED493428}");
            messenger.send(uuxmessage);
        }
       
        OutgoingCHG message = new OutgoingCHG(protocol);
        message.setStatus(messenger.getOwner().getInitStatus());
        message.setClientId(messenger.getOwner().getClientId());
        message.setDisplayPicture(messenger.getOwner().getDisplayPicture());
        message.setFirstSend(true);
        messenger.send(message);
       
  
    }
View Full Code Here

        {
            MsnList msnList = lists[i];
            contact.setInList(msnList, true);
        }

        AbstractMessenger messenger = (AbstractMessenger)session.getMessenger();
        OutgoingADL o1 = new OutgoingADL(messenger.getActualMsnProtocol());
        o1.setContact(contact);
        messenger.send(o1);
    }
View Full Code Here

            return;

        contactList.removeContactById(id);

        // remove from list
        AbstractMessenger messenger = (AbstractMessenger)session.getMessenger();
        OutgoingRML message = new OutgoingRML(messenger.getActualMsnProtocol());
        message.setRemoveFromList(list, contact);
        messenger.send(message);
    }
View Full Code Here

        Element contactsResults = XmlUtils.findChild(contactListResults, "contacts");

        processGroups(groupsResults);
        processContacts(contactsResults);

        AbstractMessenger messenger = (AbstractMessenger)session.getMessenger();

        messenger.fireContactListSyncCompleted(); //Sync completed

        OutgoingBLP outgoing = new OutgoingBLP(messenger.getActualMsnProtocol());
        outgoing.setOnlyNotifyAllowList(false);
        messenger.send(outgoing);
        sendContactList();
    }
View Full Code Here

        sendContactList();
    }
   
    //Solved ADL long-contact-list issue - BLuEGoD
    public void sendContactList(){
        AbstractMessenger messenger = (AbstractMessenger)session.getMessenger();
        MsnProtocol protocol = messenger.getActualMsnProtocol();

        if (protocol.after(MsnProtocol.MSNP12))
        {
            MsnContactListImpl contactList = (MsnContactListImpl) session
                .getMessenger().getContactList();
            MsnContact[] cs = contactList.getContacts();
            int cs_size = cs.length;
            Queue<MsnContact> csq = new LinkedList<MsnContact>();
            try
            {
                // don't know why 220 instead of ~250, but MSN server don't like it
                // we should put this lower if the server disconnects after an ADL is made - BLuEGoD
                // Each ADL command may contain up to 150 contacts - damencho
                    for(int i=0, j=1; i < cs_size; i++,j++)
                    {
                        if(cs[i]!=null)
                            csq.add(cs[i]);

                        if(j == 150 || i == cs_size-1)
                        {
                            //waitFor(6000);
                            OutgoingADL o1 = new OutgoingADL(messenger.getActualMsnProtocol());

                            if(firstADLReply)
                                ADLSent = (cs_size-1)==i?true:false;

                            o1.addContacts(csq.toArray(new MsnContact[j] ));
                            messenger.send(o1);
                            j=0;
                            csq.clear();
                        }
                    }
View Full Code Here

         * has been modified to let all the things works together.
         *
         * James Lopez (BLuEGoD) - <bluegod at bluegod.net>
         */
       
        AbstractMessenger messenger = (AbstractMessenger)session.getMessenger();
        MsnProtocol protocol = messenger.getActualMsnProtocol();
        messenger.getOwner().setDisplayName(messenger.getOwner().getDisplayName());
       
        protocol = messenger.getActualMsnProtocol();
        if (protocol.after(MsnProtocol.MSNP9)){
            OutgoingUUX uuxmessage = new OutgoingUUX(protocol);
            uuxmessage.setPersonalMessage(messenger.getOwner().getPersonalMessage());
            uuxmessage.setMachineGuid("{F26D1F07-95E2-403C-BC18-D4BFED493428}");
            messenger.send(uuxmessage);
        }
       
        OutgoingCHG message = new OutgoingCHG(protocol);
        message.setStatus(messenger.getOwner().getInitStatus());
        message.setClientId(messenger.getOwner().getClientId());
        message.setDisplayPicture(messenger.getOwner().getDisplayPicture());
        message.setFirstSend(true);
        messenger.send(message);
       
  
    }
View Full Code Here

        {
            MsnList msnList = lists[i];
            contact.setInList(msnList, true);
        }

        AbstractMessenger messenger = (AbstractMessenger)session.getMessenger();
        OutgoingADL o1 = new OutgoingADL(messenger.getActualMsnProtocol());
        o1.setContact(contact);
        messenger.send(o1);
    }
View Full Code Here

            return;

        contactList.removeContactById(id);

        // remove from list
        AbstractMessenger messenger = (AbstractMessenger)session.getMessenger();
        OutgoingRML message = new OutgoingRML(messenger.getActualMsnProtocol());
        message.setRemoveFromList(list, contact);
        messenger.send(message);
    }
View Full Code Here

TOP

Related Classes of net.sf.jml.impl.AbstractMessenger

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.