[sip-comm-dev] Jabber impl


#1

Hi Emil,

I have few questions and suggestions about the implementation and testing.

1. I'm looking at IcqStatusEnum should I create one for the Jabber implementation ?
    The statuses are almost the same (except OCCUPIED)

2. Lets export some generic Protocol Provider Tests.
    Currently I used your sip tests and the changes so I can used for the jabber implementation were minimal.
    The only tricky thing we must think are how to run this generic test over particular implementation.

More to come :))

damencho

···

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


#2

Another question came up. This time its for the contact list.
I was looking at the icq implementation.
When subscribing (adding buddy to the list ) and parent is not specified the first persistent group is taken - which is the parent for the new entry.
But what happens if such group doesn't exist ?

damencho

···

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


#3

Damencho,

An old mail that I've forgotten to reply to.

Damian Minkov wrote:

1. I'm looking at IcqStatusEnum should I create one for the Jabber implementation ?
    The statuses are almost the same (except OCCUPIED)

Yes, you could do that.

2. Lets export some generic Protocol Provider Tests.
    Currently I used your sip tests and the changes so I can used for the jabber implementation were minimal.
    The only tricky thing we must think are how to run this generic test over particular implementation.

Indeed this is going to be tricky. I was thinking of storing all generic tests in the slick.protocol package. Activators of specific protocol packages could instantiating (with necessary parameters) those that they plan to run. We could wait until we have more generic tests until we do that though.

Emil


#4

Hi Damencho,

I used the first persistent group in icq because the server would not allow you to add contacts outside of a group.

Theoretically, when no parent is specified we should add contacts inside the root group. If Jabber allows that - then this is the way to go. If not - then we could use some default group (as we do in ICQ). If no default group is available then we could create one (e.g. SIP Communicator).

Does this answer your question?

Emil

Damian Minkov wrote:

···

Another question came up. This time its for the contact list.
I was looking at the icq implementation.
When subscribing (adding buddy to the list ) and parent is not specified the first persistent group is taken - which is the parent for the new entry.
But what happens if such group doesn't exist ?

damencho

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


#5

Yes thanks ,
apparently a new group must be created if no group exists .
Jabber (or smack lib itself) does not create a user if you do not specify a parent group.

damencho

Emil Ivov wrote:

···

Hi Damencho,

I used the first persistent group in icq because the server would not allow you to add contacts outside of a group.

Theoretically, when no parent is specified we should add contacts inside the root group. If Jabber allows that - then this is the way to go. If not - then we could use some default group (as we do in ICQ). If no default group is available then we could create one (e.g. SIP Communicator).

Does this answer your question?

Emil

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


#6

Hi,

I'm experiencing some problems implementing management of groups in Jabber protocol.
Here the groups have some differences regarding the ICQ groups.

1. If a group is empty after logging out and logging in back this group is disappeared.
2. Contact can be in many groups
3. Events are received only for changed entries (buddies in the contact list)
     From them you must consider what to do.
    For example renaming a group - what happens.
    - if this group does not have entries in it - nothing happens.
    - if it has - you got entriesUpdated event for every entry in the group
       from there you must see that a new group is created
       and after that must see if any group has no members - that must be deleted.
    Here is the doc of the method group.setName()
         Changing the group's name is like moving all the group entries
         of the group to a new group specified by the new name. Since this group won't have entries
         it will be removed from the roster. This means that all the references to this object will
         be invalid and will need to be updated to the new group specified by the new name.

I think this is for now.

For now when I create a group I fire event for that immediately, without waiting for notification from server (there is no such)
Notification will come after you add an entry in this group but this cannot happen if you do not have a group.
The problem for now is the renaming of groups. What I think is to rename the group. Then when I receive the events for updated entries
will detect name change and in the ContactGroupImpl will change the old group object comming from smack lib with the new one.

What you think ?

damencho

···

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


#7

Hi again,
And something I forgot - will we implement the possibility a contact to exist in two groups ?

damencho

···

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


#8

Hi again and again,
Other interesting thing is that you can have unfiled entries, entry that doesn't belong to any groups :))

damencho

···

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


#9

Emil Ivov wrote:

Damencho,

An old mail that I've forgotten to reply to.

Damian Minkov wrote:

1. I'm looking at IcqStatusEnum should I create one for the Jabber implementation ?
    The statuses are almost the same (except OCCUPIED)

Yes, you could do that.

Yes but I saw in the gui package that everywhere is used the IcqStatusEnum statuses ?
What to do :slight_smile:

Now I'm trying to run the implementation from the gui as
the account create wizard , OperationSetPresence, OperationSetPersistentPresence and OperationSetBasicInstantMessaging
are ready. There is still some work to be done of course.
Also the tests for OperationSetPresence, OperationSetPersistentPresence are done and working,

damencho

···

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


#10

Damian Minkov wrote:

Hi,

I'm experiencing some problems implementing management of groups in Jabber protocol.
Here the groups have some differences regarding the ICQ groups.

1. If a group is empty after logging out and logging in back this group is disappeared.

Well, if someone has created a unresolved group - we could issue a GroupRemoved event. Otherwise - we don't care.

2. Contact can be in many groups

OK. we could simply not support this feature in the sip-communicator to simplify things. (This is also in answer to your other mail).

3. Events are received only for changed entries (buddies in the contact list)
     From them you must consider what to do.
    For example renaming a group - what happens.
    - if this group does not have entries in it - nothing happens.
    - if it has - you got entriesUpdated event for every entry in the group
       from there you must see that a new group is created
       and after that must see if any group has no members - that must be deleted.

I think you could simply mimic the same behavior in the sip-communicator.

1. When you get an entryUpdate event you check whether the new group exists.
2. If that is not the case you fire a new group event.
3. Next you move your local contact instance to the new group and fire a contact moved event.
4. After every ContactMovedEvent you verify whether there are other buddies left in the old parent group and if this is not the case you fire a group removed event and remove your local ContactGroup instance.

Is this ok?

    Here is the doc of the method group.setName()
         Changing the group's name is like moving all the group entries
         of the group to a new group specified by the new name. Since this group won't have entries
         it will be removed from the roster. This means that all the references to this object will
         be invalid and will need to be updated to the new group specified by the new name.

I think this should also work if you follow the scheme from above.

For now when I create a group I fire event for that immediately, without waiting for notification from server (there is no such)

ok

Other interesting thing is that you can have unfiled entries, entry that doesn't belong to any groups :))

Great, then you could store as unfiled all contacts created with a null parent group.

Does this make sense?

Emil

···

What you think ?

damencho

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


#11

Hi Damian,

Damian Minkov wrote:

Yes but I saw in the gui package that everywhere is used the IcqStatusEnum statuses ?

The reason for this is that for each status I need to find the corresponding icon. If there is a way to obtain the status icon from the status itself I won't need to use the IcqStatusEnum.

Yana

···

What to do :slight_smile:

Now I'm trying to run the implementation from the gui as
the account create wizard , OperationSetPresence, OperationSetPersistentPresence and OperationSetBasicInstantMessaging
are ready. There is still some work to be done of course.
Also the tests for OperationSetPresence, OperationSetPersistentPresence are done and working,

damencho

---------------------------------------------------------------------
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


#12

Hey,

OK then. I'll add a getStatusImage() method in service.protocol.PresenceStatus. Would that solve the problem?

I will try to do so as soon as possible but it may take me a day or two cause there something else that came up.

Emil

Yana Stamcheva wrote:

···

Hi Damian,

Damian Minkov wrote:

Yes but I saw in the gui package that everywhere is used the IcqStatusEnum statuses ?

The reason for this is that for each status I need to find the corresponding icon. If there is a way to obtain the status icon from the status itself I won't need to use the IcqStatusEnum.

Yana

What to do :slight_smile:

Now I'm trying to run the implementation from the gui as
the account create wizard , OperationSetPresence, OperationSetPersistentPresence and OperationSetBasicInstantMessaging
are ready. There is still some work to be done of course.
Also the tests for OperationSetPresence, OperationSetPersistentPresence are done and working,

damencho

---------------------------------------------------------------------
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


#13

Hi all,

I've just added a status icon method inside the PresenceStatus class:

     public byte[] getStatusIcon()

and an extra constructor that allows to configure the icon:

     protected PresenceStatus(int status, String statusName, byte[] statusIcon)

The way I see it, we should modify IcqStatusEnum to init its states using icons that Yana has so far kept in the UI. I guess we could move them in resources (sip-communicator/resources).

We should do the same for JabberStatusEnum.

How does this sound?
Emil

Emil Ivov wrote:

···

Hey,

OK then. I'll add a getStatusImage() method in service.protocol.PresenceStatus. Would that solve the problem?

I will try to do so as soon as possible but it may take me a day or two cause there something else that came up.

Emil

Yana Stamcheva wrote:

Hi Damian,

Damian Minkov wrote:

Yes but I saw in the gui package that everywhere is used the IcqStatusEnum statuses ?

The reason for this is that for each status I need to find the corresponding icon. If there is a way to obtain the status icon from the status itself I won't need to use the IcqStatusEnum.

Yana

What to do :slight_smile:

Now I'm trying to run the implementation from the gui as
the account create wizard , OperationSetPresence, OperationSetPersistentPresence and OperationSetBasicInstantMessaging
are ready. There is still some work to be done of course.
Also the tests for OperationSetPresence, OperationSetPersistentPresence are done and working,

damencho

---------------------------------------------------------------------
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


#14

Hi Emil,

It sounds great for me. I'll replace the icons. I could also modify the IcqStatusEnum?

Yana

Emil Ivov wrote:

···

Hi all,

I've just added a status icon method inside the PresenceStatus class:

    public byte[] getStatusIcon()

and an extra constructor that allows to configure the icon:

    protected PresenceStatus(int status, String statusName, byte[] statusIcon)

The way I see it, we should modify IcqStatusEnum to init its states using icons that Yana has so far kept in the UI. I guess we could move them in resources (sip-communicator/resources).

We should do the same for JabberStatusEnum.

How does this sound?
Emil

Emil Ivov wrote:

Hey,

OK then. I'll add a getStatusImage() method in service.protocol.PresenceStatus. Would that solve the problem?

I will try to do so as soon as possible but it may take me a day or two cause there something else that came up.

Emil

Yana Stamcheva wrote:

Hi Damian,

Damian Minkov wrote:

Yes but I saw in the gui package that everywhere is used the IcqStatusEnum statuses ?

The reason for this is that for each status I need to find the corresponding icon. If there is a way to obtain the status icon from the status itself I won't need to use the IcqStatusEnum.

Yana

What to do :slight_smile:

Now I'm trying to run the implementation from the gui as
the account create wizard , OperationSetPresence, OperationSetPersistentPresence and OperationSetBasicInstantMessaging
are ready. There is still some work to be done of course.
Also the tests for OperationSetPresence, OperationSetPersistentPresence are done and working,

damencho

---------------------------------------------------------------------
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


#15

Hi,

I have some problems with typing info. I saw that the typing info comes like messages and can be parsed in the listener of messages.
Now I uses one MessageEventManager which is in smackx.jar which actually is the library with smack extensions and its 300 KB of size.
For now I will remove it and parse the typing info in our implementation. What you think ?
Also there is one more thing - typing info cannot be received before a message have been sent from our side.

damencho

···

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


#16

Hi Emil,
I gave up mi idea of removing the smack extension library since we will use it and for the offline messages.
And there are other things we can use.
The problem with typing info was that the Gaim client isn't sending some ids for the info so breaking the jabber protocol
so typing info is not working with this client. I tested with combination Gaim to Kopete the typing info there is also not working.
I'm ready to commit the implementation but before that some accounts must be put on the cc machine for the test.
Here is what is needed :

accounts.jabber.account1.USER_ID=
accounts.jabber.account1.PASSWORD=
accounts.jabber.account2.USER_ID=
accounts.jabber.account2.PASSWORD=
accounts.jabber.CONTACT_LIST=
accounts.reporting.JABBER_REPORT_LIST=

damencho

···

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


#17

Hello Damencho,

Great work! Can't wait to test it myself!

Have a few questions:

The problem with typing info was that the Gaim client isn't sending some ids for the info so breaking the jabber protocol
so typing info is not working with this client. I tested with combination Gaim to Kopete the typing info there is also not working.

Does this mean that the problem only appears with gaim? What if I use sip-communicator and I have a buddy using kopete. Will I see the typing notifications?

accounts.jabber.account1.USER_ID=
accounts.jabber.account1.PASSWORD=
accounts.jabber.account2.USER_ID=
accounts.jabber.account2.PASSWORD=
accounts.jabber.CONTACT_LIST=
accounts.reporting.JABBER_REPORT_LIST=

I don't see any server field in there. Should it be part of the user_id? It would be better if we used the SERVER_ADDRESS and SERVER_PORT fields to specify it.

And a last question. Have you also committed your plugin for creating jabber accounts? I don't see it enabled in my sandbox.

Cheers
Emil

···

damencho

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


#18

Emil Ivov wrote:

Hello Damencho,

Great work! Can't wait to test it myself!

Have a few questions:

The problem with typing info was that the Gaim client isn't sending some ids for the info so breaking the jabber protocol
so typing info is not working with this client. I tested with combination Gaim to Kopete the typing info there is also not working.

Does this mean that the problem only appears with gaim? What if I use sip-communicator and I have a buddy using kopete. Will I see the typing notifications?

Yes only with gaim. With kopete you can see typing info.

accounts.jabber.account1.USER_ID=
accounts.jabber.account1.PASSWORD=
accounts.jabber.account2.USER_ID=
accounts.jabber.account2.PASSWORD=
accounts.jabber.CONTACT_LIST=
accounts.reporting.JABBER_REPORT_LIST=

I don't see any server field in there. Should it be part of the user_id? It would be better if we used the SERVER_ADDRESS and SERVER_PORT fields to specify it.

For now server is taken from the server part of the account id

And a last question. Have you also committed your plugin for creating jabber accounts? I don't see it enabled in my sandbox.

I have not committed the build tasks and the run properties. I'm committing them now.

damencho

···

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