Hi Jon, Thanks for the reply On 6/28/07, Jon Keating wrote:
On Friday 29 June 2007 00:42, Sebastian Renzi wrote: > Now I'm working on retrieving the xtraz status message. I've > identified the packet that should be sent. The question is: should > licq retrieve the message as soon as it determines that the user has > xtraz status (this is the default behaviour of Mirabilis ICQ) or > should we have a button to retrieve it (like Away or N/A messages)? Since it describes the users current status, it should be retrieved as soon as possible. Mirabilis has the xtraz status override the actual status, so we need to get it and show it instead of the current status.
There are 2 different steps to retrieve xtraz status. First we know that the user has xtraz status enabled and we also know which one of the 32 states he has chosen. With this info, we can set the icon in the qt-gui. This is already done (not the qt-gui part, but the retrieval of the status). The other step is to retrieve the name and description of the status. In order to do this, we must send a specific package requesting it. This second step is what I was talking about. Should we retrieve the name and description of the status as soon as we determine that it's enabled or should we add and option in the menu the same way it's done with Away, N/A, DND or Free for chat? As far as I can see, Mirabilis does this as soon as they determine that xtraz is enabled, so I think we should do the same, but I'd like to know your opinion.
To retrieve the xtraz message, I need to decode an xml message. Is > there anything done already? I've seen xml in other parts of the > protocol, so I wouldn't like to code something that already exists. Nope, the current XML is not even used at all. > <ret event='OnRemoteNotification'> > <srv><id>cAwaySrv</id> > <val srv_id='cAwaySrv'> > <Root><CASXtraSetAwayMessage>< /CASXtraSetAwayMessage> > <uin>user's UIN</uin> > <index>1</index> > <title>Status Name</title> > <desc>Status Description</desc> > </Root> > </val> > </srv> > </ret> If all you need is to extract the desc field, then using a string's search capability is sufficient. But if you need more than that, we should use an XML parser perhaps.
In fact all I need is both the title and desc fields and I agree it can be implemented using only a string search function, so I'm going to do it that way.
I still haven't looked at the qt-gui code, but after retrieving the > message, I'm planning to modifiy the qt-gui in order to reflect the > status with the xtraz icons. I'm planning to use Mirabilis icons, at > least for the moment. Then each skin should have their xtraz icons, > but I figure that if we're using Mirabilis emoticons, I think that > we'll be able to use these icons as well. I'm not sure about the > licenses, though. What I would reccommend is to use the current icons as a base that are hardcoded into the Qt-GUI. That way if a skin doesn't specify an icon, we can fallback to the default in the GUI.
I'll have to take a look at the qt-gui code because I don't know what you're talking about here.
Well, this is only the beginning. Any hints will be much appreciated. I would also reccommend to breakup any work into smaller patches. Such as #1 Get xtraz status #2 Set xtraz status #3 Extra gui work #4 Anything else? That way it is easier to integrate the patches, and it should reflect the order in which you are making the code.
I fully agree. I'll start sending the patches probably tomorrow. I'm not sure what you mean in #2, but if you're talking about setting our own xtraz status, I was thinking it should be done later. I mean, in my opinion it's more important to know the "real" status of our contacts and once it's finished we can add support for setting our own xtraz statuses. The way I'm thinking it, the order would be: #1 Get xtraz status (done) #2 Retrieve name & description of the xtraz status (working on it) #3 Modify gui to reflect the changes made in #1 and #2 (show the icon, status name and description) #4 Set our own xtraz status #5 Modifiy gui to set our own xtraz status What do you think? I believe #4 and #5 need harder work on the gui, since some new windows should be created in order to choose the xtraz icon and write the name and description of your own status. Please add any comments and suggestions. Seba
