⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changes

📁 A Java package (library/API) to connect and use the Yahoo Instant Messager and Chat protocols (YMSG)
💻
📖 第 1 页 / 共 3 页
字号:
Unix port of Yahoo Messenger (the legit version!) so hopefully he might passit on.  Although I am told this is a long standing bug, so don't hold yourbreath.  In the meantime, jYMSG will replicate Yahoo's buggy functionality,so there is no way to send notifications from specific identities.  (Note: it's not just notifications that don't work - see my posting below...)http://groups.yahoo.com/group/ymessenger/message/21556) IOExceptions from YMSG9InputStream.readPacket() handled   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[823559] Finally (!) IOExceptions from within readPacket() will bubble up correctly to cause SessionExceptionEvent's on input streams.  This happens even with the HTTPConnectionHandler, which doesn't have independent input and output streams.  Exceptions are captured and queued along with other incoming packets, and then re-thrown to give the appearence they are occuring on the (virtual) input stream.7) June 2004 Yahoo auth changes implemented   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~On or around June 24th 2004 Yahoo yet again changed its login protocol, this time to exploit a bug in the Trillian/Gaim implementation used asa reference by many third party Yahoo libraries, including libyahoo2and this one.  The fix was trivial for C-based libraries, as it involvedtinkering with internal values of the SHA1 hash while it was being updated.Unfortunately the standard SHA1 implementation shipped with Java does not allow access to the necessary internal variables.  Thanks to some quick coding by a jYMSG user though a custom SHA1 class was quickly at hand tosolve the problem.8) HTTPConnectionHandler fixed wrt. proxyHost and proxyPort   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~The constructors didn't appeared to work at advertised, ie. check the old pre-Java-1.3 property names for the HTTP proxy if the modern names were not set.  It appears they may never have worked as documented - although Java 1.2is so old that nobody realised.  Anyway, the code has been radically cleanedup and fixed.9) ChatLogin now handles multiple packet logins   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Yahoo chat started (?) sending login packets, type 0x98, in multiple sections.  After a quick demo session I managed to deduce that the status header is the secret to knowing when single or multiple parts are being used.  I've adjusted the chat login code to cache and merge packets until the final 0x98 packet arrives - hopefully this should solve the problem.10) List split across multiple packets    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[969977] The code for receivedList has been modified to allow formultiple packets, caused by long user lists on fields suchs groups.This has been a tricky one for me to fix, as I don't have access to anaccount with hundreds of friends in the groups field.I used the same method of detecting incomplete packets as libyahoo2:look for the cookie field and if it ain't there, assume an incompletepacket.  However, studying a similar problem with chat login (see above)I noticed that the status field changed to indicate an incomplete message.  I'm wondering if the same thing happens for split List packets,and if so, if this will be a better way of detecting incomplete packets.IF ANYONE HAS AN EXAMPLE OUTPUT DUMP, PLEASE MAIL IT TO ME!!11) Status set correctly when new conact added    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[1001334] Previously the YahooUser object was created as being on-line.This has now been changed to be off-line, until the server delivers astatus packet for this user.*************************************************************************                                                                      ** Version 0.5                                                          **                                                                      *************************************************************************The release of this package was brought forward by the sudden change in theYahoo AUTH scheme (see below).  A number of features I wanted to include forthis release were dropped: notably the addition of some code to support fancy colour-ised texts in chatrooms which someone had kindly supplied, anda fresh look at the chat login/logout code when jumping from one room to thenext.Changes this release include:1) EmoteManager   ~~~~~~~~~~~~Loads and manages Emote text from data in the standard Yahoo 'custom Emote'format.  Also has the standard Yahoo Chat Emotes built-in, which can beoptionally added to your bespoke Emotes.2) sendChatEmote() added to Session   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Supports the sending of room and user Emote text.3) isEmote() added to SessionChatEvent   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Returns whether the incoming message is an Emote or not.4) YahooChatUser has new accessors   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~isMale(), isFemale() and hasWebcam() all added.5) login() and chatLogin() both support timeouts   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Both these methods will now timeout with an IOException if the login processtakes too long to complete.  The default is 60 seconds.  This can be adjustedusing the "ymsg.network.loginTimeout" property, which accepts the timeout period in seconds.  (Set this *before* you first reference a ymsg.network class, as the value is cached.)  A value of zero or below (negative) disables the timeout.6) Bug fixed in YahooChatCategory   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~The nextTag() method failed to handle blank lines in the XML appropriately.Now fixed.7) Cookies sent by YahooChatCategory   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Yahoo apparently will not send back all group entries without the cookiesit uses to identify users (and thereby their age!)  A new overloaded versionof "loadCategories" has been added which accepts a Session object (whichmust have been logged in first, naturally, otherwise the cookies won't beavailable!)8) January 2004 AUTH now working   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~In mid-January 2004 Yahoo switched on a part of their login protocol usedto authenticate users which had previously been silent.  You''l be glad tohear this code now logs into Yahoo under the 'new' protocol arragement successfully...!The implementation used by this library is not just a carbon copy of otherlibraries.  I took time to study the workings of other libraries to write an efficient, better structured, better documented, and mpre compact solution.  For example, I managed to reduce the size of the 'operation lookup' table by nearly 25%.*************************************************************************                                                                      ** Version 0.4                                                          **                                                                      *************************************************************************Support~~~~~~~1) MessageDecoderSettings and EmoticonLoader classes   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~The decoder classes are an important part of the support API, enabling Yahoomessages to be translated into other formats, while retaining their styleinformation.  These two new classes - one an actual class and the otheran interface - allow extensive control over this decoding process.MessageDecoderSettings holds within it a list of requirements for the decoder engine.  Such things as whether emoticons (smiley's) should be translated to images, or left as text.  It is also possible to set default font and colour settings, as well as override styles contained within message bodies.  For example, using MessageDecoderSettings it is possible to specify that all fonts be kept within a given point size range - so they cannot become too small nor too big (useful for chatrooms!)EmoticonLoader is an interface with a single method, used by the decoderto find emoticon icons.  This allows you to provide your own smiley icons,which the decoder will include when necessary (subject to emoticon decodingbeing switched on, naturally!).  The API will cleverly substitute any missingicons with its own default ones - meaning you do not have to provide graphicsfor all 35 current smiley images.By separating these configuration structures out from the body of theMessageDecoder itself, it is possible not only to re-use settings across ahost of decoders, but also to alter the settings for multiple decoders in aninstant.2) AntiSpam class   ~~~~~~~~~~~~~~~Again, another class which resulted as a consequence of the recent intro-duction of chatroom support!  This class analyses messages and looks forsuspect behaviour.  Currently the only things detected are repeat messages("Help me Obi-wan, you're my only hope", "Help me Obi-wan, you're my only hope", etc.) and heavy user of caps ("I AM SHOUTING!").3) SwingModelFactory class   ~~~~~~~~~~~~~~~~~~~~~~~An ambitious (and minimally tested) class which takes the sting out ofcreating Swing models for the Session.  It registers itself with a session as a listener, and acts upon the session events to update any models itcontrols.Creating models is tricky, and this class has had only basic testings.It appears to work okay, but without a good solid test it must be assumedto leak the occassional exception, or get mis-sync'd with the real data.(Take a look at the source if you want to see what a nightmare it is!)4) New chat elements supported   ~~~~~~~~~~~~~~~~~~~~~~~~~~~Chatroom elements such as <red> and </red>, <#990099> and <b> </b> are now supported by the message decoder.Network~~~~~~~  1) chatConnectionLost(SessionEvent ev)   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~A new event has been added to the SessionListener (and adapter).  This willbe fired when the user is booted from a chatroom without formally asking to leave - typically an auto-logout after a long period of inactivity.2) chatUserUpdate(SessionChatEvent ev)   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~For when chat user details get updated.3) SERVICE_CHATPM supported   ~~~~~~~~~~~~~~~~~~~~~~~~But only on the input stream.  Packets of type 0x20 are treated as regularmessages, and delivered to messageReceived().  So far attempts to outputthese packets (created by the web-based chat system when you use the 'IM'feature) has been unsuccessful.(I have no idea why Yahoo has this alternative PM packet - given that thepayload seems to be identical to regular 0x06 SERVICE_MESSAGE packets.Perhaps they are hangover from some previous implementation?  Or maybe theyare used to send messages to those users only on Chat, not Pager?  Ideaswelcome...!)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -