[sip-comm-dev] User Agent Display GSoC Progress


#1

Ok, here is my progress to date:

User Agent identification has been handled for MSN, XMPP (Jabber), and IRC
User Agent Advertising has been handled fro MSN, XMPP (Jabber), and IRC
an OperationSet has been designed and implemented by all the above protocols (UserAgentOperationSet)

I followed the EXCELLENT lead that Damian gave me and have handled sending the GetInfoCmd SNAC for OSCAR protocols (AIM/ICQ) AND parsing the response SNAC from the server. All that needs to be done for user agent identificaiton to be handled for the OSCAR protocols is to figure out what resources the example code Damian linked is using (I had a previous e-mail in the dev mailing list that better explains what I'm talking about). Once that is done, advertising the user agent for the OSCAR protocols is as easy as sending a SNAC to the OSCAR server with the correct information (easy enough, I just need to know WHAT information to send).

Currently, I'm all out of ideas on how to get the Yahoo! protocol user agent/ client info. I've asked on the mailing list once or twice and all leads didn't work out. I've also asked on some Yahoo! protocol forums and I e-mailed some INFORMAL Yahoo! protocol developers, but so far I haven't heard back.

I've asked Yana and we believe that, besides the above, all that is left is to review/clean the code and write JUnit test cases. I've attached a patch that HOPEFULLY (I'm still new to making patches :P) has all of my UserAgent related code. I've also attached some JPG's of the UserAgent being advertised and identified for the MSN, OSCAR (AIM/ICQ), XMPP (Jabber), and IRC protocols. The OSCAR picture is a picture of the response SNAC being parsed.

An implemenation note:

Currently, the user agent is being queried EACH time a message is being sent. This is just testing purposes FOR NOW. Later on my GUI plug-in will request the UserAgent and it will be queried then and then saved so it doesn't have to be queried again.

For the MSN protocol you have to send TWO messages before the UserAgent is advertised; after that it is advertised on every messsage. So, if you are talking to yourself on MSN using SIP for sending and receiving (like my example picture) then the user agent won't be parsed until the second message and every subsequent message afterward.

*whew* Long message; I hope everyone has a good day/morning/night/afternoon/whatever. Cheers!

-Brett

P.S. Thanks again for all of the help and support guys!

P.P.S Sorry if I forgot anything. e-mail and I'll send whatever you need in a jiffy. Later guys & gals!

patch.txt (108 KB)


#2

Hi Brett,

Thanks for this report. You seem to make very good progress and that's great!

I'll be looking at your patch today and will come back to you later with some comments.

Cheers,
Yana

Geren, Brett wrote:

···

Ok, here is my progress to date:

User Agent identification has been handled for MSN, XMPP (Jabber), and IRC
User Agent Advertising has been handled fro MSN, XMPP (Jabber), and IRC
an OperationSet has been designed and implemented by all the above protocols (UserAgentOperationSet)

I followed the EXCELLENT lead that Damian gave me and have handled sending the GetInfoCmd SNAC for OSCAR protocols (AIM/ICQ) AND parsing the response SNAC from the server. All that needs to be done for user agent identificaiton to be handled for the OSCAR protocols is to figure out what resources the example code Damian linked is using (I had a previous e-mail in the dev mailing list that better explains what I'm talking about). Once that is done, advertising the user agent for the OSCAR protocols is as easy as sending a SNAC to the OSCAR server with the correct information (easy enough, I just need to know WHAT information to send).

Currently, I'm all out of ideas on how to get the Yahoo! protocol user agent/ client info. I've asked on the mailing list once or twice and all leads didn't work out. I've also asked on some Yahoo! protocol forums and I e-mailed some INFORMAL Yahoo! protocol developers, but so far I haven't heard back.

I've asked Yana and we believe that, besides the above, all that is left is to review/clean the code and write JUnit test cases. I've attached a patch that HOPEFULLY (I'm still new to making patches :P) has all of my UserAgent related code. I've also attached some JPG's of the UserAgent being advertised and identified for the MSN, OSCAR (AIM/ICQ), XMPP (Jabber), and IRC protocols. The OSCAR picture is a picture of the response SNAC being parsed.

An implemenation note:

Currently, the user agent is being queried EACH time a message is being sent. This is just testing purposes FOR NOW. Later on my GUI plug-in will request the UserAgent and it will be queried then and then saved so it doesn't have to be queried again.

For the MSN protocol you have to send TWO messages before the UserAgent is advertised; after that it is advertised on every messsage. So, if you are talking to yourself on MSN using SIP for sending and receiving (like my example picture) then the user agent won't be parsed until the second message and every subsequent message afterward.

*whew* Long message; I hope everyone has a good day/morning/night/afternoon/whatever. Cheers!

-Brett

P.S. Thanks again for all of the help and support guys!

P.P.S Sorry if I forgot anything. e-mail and I'll send whatever you need in a jiffy. Later guys & gals!

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi Brett,

As promised, here are my comments on your patch.

First of all, you've made a very good progress and I want to felicitate you about the mature and _very well_ documented code!

I have though some minor remarks and suggestions. Have a look below:

- Don't forget to add the license, as well as the @author comment in the beginning of all new files:)

- In OperationSetUserAgent we can keep only getUserAgent, which would call queryUserAgent internally (in the implementation) only if no stored user agent is available. We can then notify the user interface by adding an UserAgentChangeListener to the operation set that would contain an userAgentChanged(UserAgentChangeEvent event) method. The UserAgentChangeEvent will carry information about the contact and the user agent string.

- SwingWorker is meant to be used by swing user interface and in protocol bundles you should use Thread instead.

- I saw that you use an UserAgentNotificationListener in all operation set implementations, which is not visible from the service. Could you tell us more about its role?

- You've probably used some of the auto-format functions of Eclipse or NetBeans, which makes it quite difficult to track the user agent related changes in the existing files (like for example ProtocolProviderServiceJabberImpl).

- OperationSetUserAgentXXXImpl - some minor formatting needed ("extends"/"implements" on a new line, opening bracket on a new line, code should respect column 80, etc.:slight_smile:

I think that's all for now. Don't let my comments discourage you, as I said in the beginning you've done pretty good job.

If there's anything not clear please don't hesitate to ask and I'll try to explain further.

Cheers,
Yana

Yana Stamcheva wrote:

···

Hi Brett,

Thanks for this report. You seem to make very good progress and that's great!

I'll be looking at your patch today and will come back to you later with some comments.

Cheers,
Yana

Geren, Brett wrote:

Ok, here is my progress to date:

User Agent identification has been handled for MSN, XMPP (Jabber), and IRC
User Agent Advertising has been handled fro MSN, XMPP (Jabber), and IRC
an OperationSet has been designed and implemented by all the above protocols (UserAgentOperationSet)

I followed the EXCELLENT lead that Damian gave me and have handled sending the GetInfoCmd SNAC for OSCAR protocols (AIM/ICQ) AND parsing the response SNAC from the server. All that needs to be done for user agent identificaiton to be handled for the OSCAR protocols is to figure out what resources the example code Damian linked is using (I had a previous e-mail in the dev mailing list that better explains what I'm talking about). Once that is done, advertising the user agent for the OSCAR protocols is as easy as sending a SNAC to the OSCAR server with the correct information (easy enough, I just need to know WHAT information to send).

Currently, I'm all out of ideas on how to get the Yahoo! protocol user agent/ client info. I've asked on the mailing list once or twice and all leads didn't work out. I've also asked on some Yahoo! protocol forums and I e-mailed some INFORMAL Yahoo! protocol developers, but so far I haven't heard back.
I've asked Yana and we believe that, besides the above, all that is left is to review/clean the code and write JUnit test cases. I've attached a patch that HOPEFULLY (I'm still new to making patches :P) has all of my UserAgent related code. I've also attached some JPG's of the UserAgent being advertised and identified for the MSN, OSCAR (AIM/ICQ), XMPP (Jabber), and IRC protocols. The OSCAR picture is a picture of the response SNAC being parsed.

An implemenation note:

Currently, the user agent is being queried EACH time a message is being sent. This is just testing purposes FOR NOW. Later on my GUI plug-in will request the UserAgent and it will be queried then and then saved so it doesn't have to be queried again.
For the MSN protocol you have to send TWO messages before the UserAgent is advertised; after that it is advertised on every messsage. So, if you are talking to yourself on MSN using SIP for sending and receiving (like my example picture) then the user agent won't be parsed until the second message and every subsequent message afterward.
*whew* Long message; I hope everyone has a good day/morning/night/afternoon/whatever. Cheers!

-Brett

P.S. Thanks again for all of the help and support guys!

P.P.S Sorry if I forgot anything. e-mail and I'll send whatever you need in a jiffy. Later guys & gals!

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Thanks for the kind comments and for the reminder at the end (Don't let my comments discourage you, as I
said in the beginning you've done pretty good job)!

I'll start on these fixes and make the JUnit tests. After both of these are done what next?

I have one note about one of the comments:

- You've probably used some of the auto-format functions of Eclipse or
NetBeans, which makes it quite difficult to track the user agent related
changes in the existing files (like for example
ProtocolProviderServiceJabberImpl).

In all ServiceImpls I added my UserAgentOperationSet (and nothing more)
In most of the OperationSetBasicInstantMessage... classes I edited sendMessage() to also query the UserAgent
just for testing purposes, and I didn't touch anything else since it didn't pertain to my project. The only exception to this
that I can think of is OperationSetBasicInstantMessagingMSNImpl where I *permanently* edited sendMessage because it DIRECTLY
pertained to advertising the UserAgent since in MSN the UserAgent is advertised on each message.

Also just to make sure we are on the same page, the Google mid-term evaluations are due July 6 - July 13 correct?

Thanks!

-Brett

···

________________________________________

From: Yana Stamcheva [yana.stamcheva@gmail.com] On Behalf Of Yana Stamcheva [yana@sip-communicator.org]

Sent: Monday, June 29, 2009 9:59 AM
To: dev@sip-communicator.dev.java.net
Subject: Re: [sip-comm-dev] User Agent Display GSoC Progress

Hi Brett,

As promised, here are my comments on your patch.

First of all, you've made a very good progress and I want to felicitate
you about the mature and _very well_ documented code!

I have though some minor remarks and suggestions. Have a look below:

- Don't forget to add the license, as well as the @author comment in the
beginning of all new files:)

- In OperationSetUserAgent we can keep only getUserAgent, which would
call queryUserAgent internally (in the implementation) only if no stored
user agent is available. We can then notify the user interface by adding
an UserAgentChangeListener to the operation set that would contain an
userAgentChanged(UserAgentChangeEvent event) method. The
UserAgentChangeEvent will carry information about the contact and the
user agent string.

- SwingWorker is meant to be used by swing user interface and in
protocol bundles you should use Thread instead.

- I saw that you use an UserAgentNotificationListener in all operation
set implementations, which is not visible from the service. Could you
tell us more about its role?

- You've probably used some of the auto-format functions of Eclipse or
NetBeans, which makes it quite difficult to track the user agent related
changes in the existing files (like for example
ProtocolProviderServiceJabberImpl).

- OperationSetUserAgentXXXImpl - some minor formatting needed
("extends"/"implements" on a new line, opening bracket on a new line,
code should respect column 80, etc.:slight_smile:

I think that's all for now. Don't let my comments discourage you, as I
said in the beginning you've done pretty good job.

If there's anything not clear please don't hesitate to ask and I'll try
to explain further.

Cheers,
Yana

Yana Stamcheva wrote:

Hi Brett,

Thanks for this report. You seem to make very good progress and that's
great!

I'll be looking at your patch today and will come back to you later with
some comments.

Cheers,
Yana

Geren, Brett wrote:

Ok, here is my progress to date:

User Agent identification has been handled for MSN, XMPP (Jabber), and
IRC
User Agent Advertising has been handled fro MSN, XMPP (Jabber), and IRC
an OperationSet has been designed and implemented by all the above
protocols (UserAgentOperationSet)

I followed the EXCELLENT lead that Damian gave me and have handled
sending the GetInfoCmd SNAC for OSCAR protocols (AIM/ICQ) AND parsing
the response SNAC from the server. All that needs to be done for user
agent identificaiton to be handled for the OSCAR protocols is to
figure out what resources the example code Damian linked is using (I
had a previous e-mail in the dev mailing list that better explains
what I'm talking about). Once that is done, advertising the user agent
for the OSCAR protocols is as easy as sending a SNAC to the OSCAR
server with the correct information (easy enough, I just need to know
WHAT information to send).

Currently, I'm all out of ideas on how to get the Yahoo! protocol user
agent/ client info. I've asked on the mailing list once or twice and
all leads didn't work out. I've also asked on some Yahoo! protocol
forums and I e-mailed some INFORMAL Yahoo! protocol developers, but so
far I haven't heard back.
I've asked Yana and we believe that, besides the above, all that is
left is to review/clean the code and write JUnit test cases. I've
attached a patch that HOPEFULLY (I'm still new to making patches :P)
has all of my UserAgent related code. I've also attached some JPG's of
the UserAgent being advertised and identified for the MSN, OSCAR
(AIM/ICQ), XMPP (Jabber), and IRC protocols. The OSCAR picture is a
picture of the response SNAC being parsed.

An implemenation note:

Currently, the user agent is being queried EACH time a message is
being sent. This is just testing purposes FOR NOW. Later on my GUI
plug-in will request the UserAgent and it will be queried then and
then saved so it doesn't have to be queried again.
For the MSN protocol you have to send TWO messages before the
UserAgent is advertised; after that it is advertised on every
messsage. So, if you are talking to yourself on MSN using SIP for
sending and receiving (like my example picture) then the user agent
won't be parsed until the second message and every subsequent message
afterward.
*whew* Long message; I hope everyone has a good
day/morning/night/afternoon/whatever. Cheers!

-Brett

P.S. Thanks again for all of the help and support guys!

P.P.S Sorry if I forgot anything. e-mail and I'll send whatever you
need in a jiffy. Later guys & gals!

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net